commit xulrunner.478 for openSUSE:12.1:Update
Hello community, here is the log from the commit of package xulrunner.478 for openSUSE:12.1:Update checked in at 2012-04-27 14:51:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.1:Update/xulrunner.478 (Old) and /work/SRC/openSUSE:12.1:Update/.xulrunner.478.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "xulrunner.478", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2012-04-12 17:09:43.803558694 +0200 +++ /work/SRC/openSUSE:12.1:Update/.xulrunner.478.new/xulrunner.changes 2012-04-27 14:51:54.000000000 +0200 @@ -0,0 +1,187 @@ +------------------------------------------------------------------- +Sat Apr 21 10:03:42 UTC 2012 - wr@rosenauer.org + +- update to 12.0 (bnc#758408) + * rebased patches + * MFSA 2012-20/CVE-2012-0467/CVE-2012-0468 + Miscellaneous memory safety hazards + * MFSA 2012-22/CVE-2012-0469 (bmo#738985) + use-after-free in IDBKeyRange + * MFSA 2012-23/CVE-2012-0470 (bmo#734288) + Invalid frees causes heap corruption in gfxImageSurface + * MFSA 2012-24/CVE-2012-0471 (bmo#715319) + Potential XSS via multibyte content processing errors + * MFSA 2012-25/CVE-2012-0472 (bmo#744480) + Potential memory corruption during font rendering using cairo-dwrite + * MFSA 2012-26/CVE-2012-0473 (bmo#743475) + WebGL.drawElements may read illegal video memory due to + FindMaxUshortElement error + * MFSA 2012-27/CVE-2012-0474 (bmo#687745, bmo#737307) + Page load short-circuit can lead to XSS + * MFSA 2012-28/CVE-2012-0475 (bmo#694576) + Ambiguous IPv6 in Origin headers may bypass webserver access + restrictions + * MFSA 2012-29/CVE-2012-0477 (bmo#718573) + Potential XSS through ISO-2022-KR/ISO-2022-CN decoding issues + * MFSA 2012-30/CVE-2012-0478 (bmo#727547) + Crash with WebGL content using textImage2D + * MFSA 2012-31/CVE-2011-3062 (bmo#739925) + Off-by-one error in OpenType Sanitizer + * MFSA 2012-32/CVE-2011-1187 (bmo#624621) + HTTP Redirections and remote content can be read by javascript errors + * MFSA 2012-33/CVE-2012-0479 (bmo#714631) + Potential site identity spoofing when loading RSS and Atom feeds +- added mozilla-libnotify.patch to allow fallback from libnotify + to xul based events if no notification-daemon is running +- gcc 4.7 fixes + * mozilla-gcc47.patch + * disabled crashreporter temporarily for Factory + +------------------------------------------------------------------- +Fri Mar 9 21:49:05 UTC 2012 - wr@rosenauer.org + +- update to version 11.0 (bnc#750044) + * MFSA 2012-13/CVE-2012-0455 (bmo#704354) + XSS with Drag and Drop and Javascript: URL + * MFSA 2012-14/CVE-2012-0456/CVE-2012-0457 (bmo#711653, #720103) + SVG issues found with Address Sanitizer + * MFSA 2012-15/CVE-2012-0451 (bmo#717511) + XSS with multiple Content Security Policy headers + * MFSA 2012-16/CVE-2012-0458 + Escalation of privilege with Javascript: URL as home page + * MFSA 2012-17/CVE-2012-0459 (bmo#723446) + Crash when accessing keyframe cssText after dynamic modification + * MFSA 2012-18/CVE-2012-0460 (bmo#727303) + window.fullScreen writeable by untrusted content + * MFSA 2012-19/CVE-2012-0461/CVE-2012-0462/CVE-2012-0464/ + CVE-2012-0463 + Miscellaneous memory safety hazards +- fix build on ARM +- disable jemalloc on s390(x) + +------------------------------------------------------------------- +Thu Feb 16 08:51:42 UTC 2012 - wr@rosenauer.org + +- update to version 10.0.2 (bnc#747328) + * CVE-2011-3026 (bmo#727401) + libpng: integer overflow leading to heap-buffer overflow + +------------------------------------------------------------------- +Thu Feb 9 10:20:49 UTC 2012 - wr@rosenauer.org + +- update to version 10.0.1 (bnc#746616) + * MFSA 2012-10/CVE-2012-0452 (bmo#724284) + use after free in nsXBLDocumentInfo::ReadPrototypeBindings + +------------------------------------------------------------------- +Tue Feb 7 10:40:58 UTC 2012 - dvaleev@suse.com + +- Use YARR interpreter instead of PCRE on platforms where YARR JIT + is not supported, since PCRE doesnt build (bmo#691898) +- fix ppc64 build (bmo#703534) + +------------------------------------------------------------------- +Mon Jan 30 09:43:21 UTC 2012 - wr@rosenauer.org + +- update to version 10.0 (bnc#744275) + * MFSA 2012-01/CVE-2012-0442/CVE-2012-0443 + Miscellaneous memory safety hazards + * MFSA 2012-03/CVE-2012-0445 (bmo#701071) + <iframe> element exposed across domains via name attribute + * MFSA 2012-04/CVE-2011-3659 (bmo#708198) + Child nodes from nsDOMAttribute still accessible after removal + of nodes + * MFSA 2012-05/CVE-2012-0446 (bmo#705651) + Frame scripts calling into untrusted objects bypass security + checks + * MFSA 2012-06/CVE-2012-0447 (bmo#710079) + Uninitialized memory appended when encoding icon images may + cause information disclosure + * MFSA 2012-07/CVE-2012-0444 (bmo#719612) + Potential Memory Corruption When Decoding Ogg Vorbis files + * MFSA 2012-08/CVE-2012-0449 (bmo#701806, bmo#702466) + Crash with malformed embedded XSLT stylesheets +- removed obsolete ppc64 patch +- disable neon for ARM as it doesn't build correctly + +------------------------------------------------------------------- +Fri Dec 23 17:02:01 UTC 2011 - wr@rosenauer.org + +- update to Firefox 9.0.1 + * (strongparent) parentNode of element gets lost (bmo#335998) + +------------------------------------------------------------------- +Sun Dec 18 09:28:02 UTC 2011 - wr@rosenauer.org + +- update to release 9.0 (bnc#737533) + * MFSA 2011-53/CVE-2011-3660 + Miscellaneous memory safety hazards (rv:9.0) + * MFSA 2011-54/CVE-2011-3661 (bmo#691299) + Potentially exploitable crash in the YARR regular expression + library + * MFSA 2011-55/CVE-2011-3658 (bmo#708186) + nsSVGValue out-of-bounds access + * MFSA 2011-56/CVE-2011-3663 (bmo#704482) + Key detection without JavaScript via SVG animation + * MFSA 2011-58/VE-2011-3665 (bmo#701259) + Crash scaling <video> to extreme sizes + +------------------------------------------------------------------- +Sat Nov 12 15:20:49 UTC 2011 - wr@rosenauer.org + +- fix ppc64 build + +------------------------------------------------------------------- +Sun Nov 6 08:23:04 UTC 2011 - wr@rosenauer.org + +- update to release 8.0 (bnc#728520) + * MFSA 2011-47/CVE-2011-3648 (bmo#690225) + Potential XSS against sites using Shift-JIS + * MFSA 2011-48/CVE-2011-3651/CVE-2011-3652/CVE-2011-3654 + Miscellaneous memory safety hazards + * MFSA 2011-49/CVE-2011-3650 (bmo#674776) + Memory corruption while profiling using Firebug + * MFSA 2011-52/CVE-2011-3655 (bmo#672182) + Code execution via NoWaiverWrapper +- rebased patches + +------------------------------------------------------------------- +Fri Sep 30 10:59:54 UTC 2011 - wr@rosenauer.org + +- update to minor release 7.0.1 + * fixed staged addon updates + +------------------------------------------------------------------- +Fri Sep 23 11:36:04 UTC 2011 - wr@rosenauer.org + +- update to version 7.0 (bnc#720264) + * MFSA 2011-36/CVE-2011-2995/CVE-2011-2996/CVE-2011-2997 + Miscellaneous memory safety hazards + * MFSA 2011-39/CVE-2011-3000 (bmo#655389) + Defense against multiple Location headers due to CRLF Injection + * MFSA 2011-40/CVE-2011-2372/CVE-2011-3001 + Code installation through holding down Enter + * MFSA 2011-41/CVE-2011-3002/CVE-2011-3003 (bmo#680840, bmo#682335) + Potentially exploitable WebGL crashes + * MFSA 2011-42/CVE-2011-3232 (bmo#653672) + Potentially exploitable crash in the YARR regular expression + library + * MFSA 2011-43/CVE-2011-3004 (bmo#653926) + loadSubScript unwraps XPCNativeWrapper scope parameter + * MFSA 2011-44/CVE-2011-3005 (bmo#675747) + Use after free reading OGG headers + * MFSA 2011-45 + Inferring keystrokes from motion data +- removed obsolete mozilla-cairo-lcd.patch +- rebased patches + +------------------------------------------------------------------- +Tue Sep 20 11:54:28 UTC 2011 - wr@rosenauer.org + +- install xpt.py into SDK (mozilla-639554.patch) (bnc#639554) + +------------------------------------------------------------------- +Wed Sep 14 13:07:39 UTC 2011 - wr@rosenauer.org + +- initial xulrunner package + New: ---- add-plugins.sh.in baselibs.conf compare-locales.tar.bz2 create-tar.sh find-external-requires.sh idldir.patch l10n-12.0.tar.bz2 mozilla-arm-cpu-detection.patch mozilla-dump_syms-static.patch mozilla-gcc47.patch mozilla-language.patch mozilla-libnotify.patch mozilla-linux3.patch mozilla-nongnome-proxies.patch mozilla-ntlm-full-path.patch mozilla-pkgconfig.patch mozilla-prefer_plugin_pref.patch mozilla-revert_621446.patch mozilla-sle11.patch mozilla-yarr-pcre.patch source-stamp.txt toolkit-download-folder.patch xulrunner-12.0-source.tar.bz2 xulrunner-openSUSE-prefs.js xulrunner-rpmlintrc xulrunner.changes xulrunner.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xulrunner.spec ++++++ # # spec file for package xulrunner # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # 2006-2012 Wolfgang Rosenauer # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: xulrunner BuildRequires: Mesa-devel BuildRequires: autoconf213 BuildRequires: dbus-1-glib-devel BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: hunspell-devel BuildRequires: libcurl-devel BuildRequires: libgnomeui-devel BuildRequires: libidl-devel BuildRequires: libnotify-devel BuildRequires: nss-shared-helper-devel BuildRequires: pkg-config BuildRequires: python BuildRequires: startup-notification-devel BuildRequires: unzip BuildRequires: xorg-x11-libXt-devel BuildRequires: yasm BuildRequires: zip %if %suse_version > 1110 BuildRequires: libiw-devel BuildRequires: libproxy-devel %else BuildRequires: wireless-tools %endif BuildRequires: mozilla-nspr-devel >= 4.9.0 BuildRequires: mozilla-nss-devel >= 3.13.3 Version: 12.0 Release: 0 %define releasedate 2012042100 %define version_internal 12.0 %define apiversion 12 %define uaweight 1200000 Summary: Mozilla Runtime Environment License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+ Group: Productivity/Other Url: http://www.mozilla.org/ Provides: gecko %ifarch %ix86 Provides: xulrunner-32bit = %{version}-%{release} %endif Source: xulrunner-%{version}-source.tar.bz2 Source1: l10n-%{version}.tar.bz2 Source2: find-external-requires.sh Source3: %{name}-rpmlintrc Source4: xulrunner-openSUSE-prefs.js Source5: add-plugins.sh.in Source6: create-tar.sh Source7: baselibs.conf Source8: source-stamp.txt Source9: compare-locales.tar.bz2 Patch1: toolkit-download-folder.patch Patch2: mozilla-pkgconfig.patch Patch3: idldir.patch Patch4: mozilla-nongnome-proxies.patch Patch5: mozilla-prefer_plugin_pref.patch Patch9: mozilla-language.patch Patch11: mozilla-ntlm-full-path.patch Patch12: mozilla-dump_syms-static.patch Patch13: mozilla-sle11.patch Patch14: mozilla-linux3.patch Patch15: mozilla-arm-cpu-detection.patch Patch16: mozilla-revert_621446.patch Patch17: mozilla-yarr-pcre.patch Patch18: mozilla-libnotify.patch Patch19: mozilla-gcc47.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: mozilla-js = %{version} Requires(post): update-alternatives coreutils Requires(preun): update-alternatives coreutils ### build configuration ### %define has_system_nspr 1 %define has_system_nss 1 %define has_system_cairo 0 %define localize 0 %ifarch ppc ppc64 s390 s390x ia64 %define crashreporter 0 %define plugincontainer 0 %else %define crashreporter 1 %define plugincontainer 1 %endif # temporary (gcc 4.7) %if %suse_version > 1210 %define crashreporter 0 %endif ### configuration end ### %define _use_internal_dependency_generator 0 %define __find_requires sh %{SOURCE2} %global provfind sh -c "grep -Ev 'mozsqlite3|dbusservice|unixprint' | %__find_provides" %global __find_provides %provfind %if %has_system_nspr Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) %endif %if %has_system_nss Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) %endif %description XULRunner is a single installable package that can be used to bootstrap multiple XUL+XPCOM applications that are as rich as Firefox and Thunderbird. %package -n mozilla-js Summary: Mozilla JS engine Group: Productivity/Other %description -n mozilla-js JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard. %package devel Summary: XULRunner/Gecko SDK Group: Development/Libraries/Other %if %has_system_nspr Requires: mozilla-nspr-devel >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr-devel) %endif %if %has_system_nss Requires: mozilla-nss-devel >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss-devel) %endif Requires: %{name} = %{version} %description devel Software Development Kit to embed XUL or Gecko into other applications. %if %localize %package translations-common Summary: Common translations for XULRunner Group: System/Localization Requires: %{name} = %{version} Provides: locale(%{name}:ar;ca;cs;da;de;en_GB;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW) Obsoletes: %{name}-translations < %{version}-%{release} %description translations-common XULRunner is a single installable package that can be used to bootstrap multiple XUL+XPCOM applications that are as rich as Firefox and Thunderbird. This package contains the most common languages but en-US which is delivered in the main package. %package translations-other Summary: Extra translations for XULRunner Group: System/Localization Requires: %{name} = %{version} Provides: locale(%{name}:af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;el;en_ZA;eo;es_MX;et;eu;fa;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mn;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;sw;ta;ta_LK;te;th;tr;uk;vi;zu) Obsoletes: %{name}-translations < %{version}-%{release} %description translations-other XULRunner is a single installable package that can be used to bootstrap multiple XUL+XPCOM applications that are as rich as Firefox and Thunderbird. This package contains rarely used languages. %endif %if %crashreporter %package buildsymbols Summary: Breakpad buildsymbols for %{name} Group: Development/Debug %description buildsymbols This subpackage contains the Breakpad created and compatible debugging symbols meant for upload to Mozilla's crash collector database. %endif %prep %setup -n mozilla -q -b 1 -b 9 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch9 -p1 %patch11 -p1 %patch12 -p1 %if %suse_version < 1120 %patch13 -p1 %endif %patch14 -p1 %patch15 -p1 %patch16 -p1 #%patch17 -p1 %patch18 -p1 %patch19 -p1 %build # no need to add build time to binaries modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" TIME="\"$(date -d "${modified}" "+%%R")\"" find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + # MOZ_APP_DIR=%{_libdir}/xulrunner-%{version_internal} export MOZ_BUILD_DATE=%{releasedate} export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" %ifarch ppc64 export CFLAGS="$CFLAGS -mminimal-toc" %endif export CXXFLAGS="$CFLAGS" export LDFLAGS="-Wl,-rpath -Wl,${MOZ_APP_DIR}" export MOZCONFIG=$RPM_BUILD_DIR/mozconfig export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 export MOZ_MILESTONE_RELEASE=1 # cat << EOF > $MOZCONFIG mk_add_options MOZILLA_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZ_MILESTONE_RELEASE=1 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj . \$topsrcdir/xulrunner/config/mozconfig ac_add_options --prefix=%{_prefix} ac_add_options --libdir=%{_libdir} ac_add_options --sysconfdir=%{_sysconfdir} ac_add_options --mandir=%{_mandir} ac_add_options --includedir=%{_includedir} ac_add_options --enable-optimize ac_add_options --enable-extensions=default #ac_add_options --with-system-jpeg # mozilla uses internal libjpeg-turbo now #ac_add_options --with-system-png # no APNG support ac_add_options --with-system-zlib ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n ac_add_options --disable-tests ac_add_options --disable-mochitest ac_add_options --disable-installer ac_add_options --disable-updater ac_add_options --disable-javaxpcom ac_add_options --enable-system-hunspell ac_add_options --enable-startup-notification ac_add_options --enable-shared-js #ac_add_options --enable-debug EOF %if %suse_version > 1130 cat << EOF >> $MOZCONFIG ac_add_options --disable-gnomevfs ac_add_options --enable-gio EOF %endif %if %has_system_nspr cat << EOF >> $MOZCONFIG ac_add_options --with-system-nspr EOF %endif %if %has_system_nss cat << EOF >> $MOZCONFIG ac_add_options --with-system-nss EOF %endif %if %has_system_cairo cat << EOF >> $MOZCONFIG ac_add_options --enable-system-cairo EOF %endif %if %suse_version > 1110 cat << EOF >> $MOZCONFIG ac_add_options --enable-libproxy EOF %endif %if ! %crashreporter cat << EOF >> $MOZCONFIG ac_add_options --disable-crashreporter EOF %endif %if ! %plugincontainer cat << EOF >> $MOZCONFIG ac_add_options --disable-ipc EOF %endif # S/390 %ifarch s390 s390x cat << EOF >> $MOZCONFIG ac_add_options --disable-jemalloc EOF %endif # ARM %ifarch %arm cat << EOF >> $MOZCONFIG %ifarch armv7l ac_add_options --with-arch=armv7-a ac_add_options --with-float-abi=hard ac_add_options --with-fpu=vfpv3-d16 ac_add_options --with-thumb=yes %endif %ifarch armv5tel ac_add_options --with-arch=armv5te ac_add_options --with-float-abi=soft ac_add_options --with-thumb=no %endif EOF %endif make -f client.mk build %install cd ../obj # preferences (to package in omni.jar) cp %{SOURCE4} dist/bin/defaults/pref/all-openSUSE.js %makeinstall STRIP=/bin/true # xpt.py is not executable chmod a+x $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/bin/*.py # remove some executable permissions find $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal} \ -type f -perm -111 -exec chmod a-x {} \; find $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/ \ -name "*.js" -o -name "*.xpm" -o -name "*.png" | xargs chmod a-x mkdir -p $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions # fixing SDK dynamic libs (symlink instead of copy) rm $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/*.so ln -sf ../../../xulrunner-%{version_internal}/libmozjs.so \ $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/ ln -sf ../../../xulrunner-%{version_internal}/libxpcom.so \ $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/ ln -sf ../../../xulrunner-%{version_internal}/libxul.so \ $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/ # include basic buildenv for xulapps to use mkdir -p $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal} pushd .. # this list has been compiled by trial and error for prism tar --exclude=*.cpp --exclude=*.mm \ -cvjf $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}/mozilla-src.tar.bz2 \ mozilla/configure.in mozilla/Makefile.in mozilla/client.py mozilla/allmakefiles.sh \ mozilla/config mozilla/client.mk mozilla/aclocal.m4 mozilla/build mozilla/js/src/* \ mozilla/testing mozilla/toolkit/mozapps/installer mozilla/probes mozilla/memory \ mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build popd # install add-plugins.sh sed "s:%%PROGDIR:%{_libdir}/xulrunner-%{version_internal}:g" \ %{SOURCE5} > $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh chmod 755 $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/add-plugins.sh # ghosts touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/global.reginfo # install additional locales %if %localize rm -f %{_tmppath}/translations.* touch %{_tmppath}/translations.{common,other} for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do case $locale in ja-JP-mac|en-US) ;; *) pushd $RPM_BUILD_DIR/compare-locales PYTHONPATH=lib \ scripts/compare-locales -m ../l10n-merged/$locale \ ../mozilla/toolkit/locales/l10n.ini ../l10n $locale popd LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ make -C toolkit/locales langpack-$locale cp dist/xpi-stage/locale-$locale \ $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions/langpack-$locale@firefox.mozilla.org # remove prefs and profile defaults from langpack rm -rf $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/extensions/langpack-$locale@firefox.mozilla.org/defaults # check against the fixed common list and sort into the right filelist _matched=0 for _match in ar ca cs da de en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do [ "$_match" = "$locale" ] && _matched=1 done [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other echo %{_libdir}/xulrunner-%{version_internal}/extensions/langpack-$locale@firefox.mozilla.org \ \ >> %{_tmppath}/translations.$_l10ntarget esac done %endif # API symlink ln -sf xulrunner-%{version_internal} $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{apiversion} # compat links %if 0%{?ga_version:1} touch $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{ga_version} %endif # excludes %if %suse_version < 1120 rm -f $RPM_BUILD_ROOT%{_bindir}/xulrunner %endif rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/updater rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/update.locale rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/LICENSE rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/README.txt rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/dictionaries/en-US* rm -f $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/nspr-config rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/mozilla-plugin.pc # fdupes %fdupes $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal}/ %fdupes $RPM_BUILD_ROOT%{_libdir}/xulrunner-%{version_internal}/ # create breakpad debugsymbols %if %crashreporter SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" make buildsymbols \ SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \ SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \ SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" if [ -e dist/*symbols.zip ]; then mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/ cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ fi %endif %clean rm -rf $RPM_BUILD_ROOT %if %localize rm -rf %{_tmppath}/translations.* %endif %post /usr/sbin/update-alternatives --install %{_bindir}/xulrunner \ xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner %{uaweight} || : %{_libdir}/xulrunner-%{apiversion}/add-plugins.sh > /dev/null 2>&1 exit 0 %posttrans # needed for updates which transition directory to symlink %if 0%{?ga_version:1} test -d %{_libdir}/xulrunner-%{ga_version} && rm -rf %{_libdir}/xulrunner-%{ga_version} ln -sf xulrunner-%{version_internal} %{_libdir}/xulrunner-%{ga_version} %endif [ -e %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh ] && \ %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1 exit 0 %preun if [ "$1" = "0" ]; then # deinstallation # that's not quite nice since old versions should be removed on update as well # but that's problematic for updates w/o raising the version number /usr/sbin/update-alternatives --remove xulrunner %{_libdir}/xulrunner-%{apiversion}/xulrunner fi rm -f %{_libdir}/xulrunner-%{version_internal}/dictionaries/* exit 0 %triggerin -- myspell-dictionary %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1 exit 0 %triggerpostun -- myspell-dictionary %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh > /dev/null 2>&1 exit 0 %files %defattr(-,root,root) %dir %{_libdir}/xulrunner-%{version_internal}/ %dir %{_libdir}/xulrunner-%{version_internal}/chrome/ %dir %{_libdir}/xulrunner-%{version_internal}/dictionaries/ %dir %{_libdir}/xulrunner-%{version_internal}/extensions/ %{_libdir}/xulrunner-%{version_internal}/chrome/icons/ %{_libdir}/xulrunner-%{version_internal}/components/ %{_libdir}/xulrunner-%{version_internal}/plugins/ %{_libdir}/xulrunner-%{version_internal}/*.so %exclude %{_libdir}/xulrunner-%{version_internal}/libmozjs.so %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh %{_libdir}/xulrunner-%{version_internal}/chrome.manifest %{_libdir}/xulrunner-%{version_internal}/dependentlibs.list %{_libdir}/xulrunner-%{version_internal}/mozilla-xremote-client %if %plugincontainer %{_libdir}/xulrunner-%{version_internal}/plugin-container %endif %{_libdir}/xulrunner-%{version_internal}/run-mozilla.sh %{_libdir}/xulrunner-%{version_internal}/xulrunner %{_libdir}/xulrunner-%{version_internal}/xulrunner-bin %{_libdir}/xulrunner-%{version_internal}/xulrunner-stub %{_libdir}/xulrunner-%{version_internal}/platform.ini %{_libdir}/xulrunner-%{version_internal}/omni.ja # crashreporter files %if %crashreporter %{_libdir}/xulrunner-%{version_internal}/crashreporter %{_libdir}/xulrunner-%{version_internal}/crashreporter.ini %{_libdir}/xulrunner-%{version_internal}/Throbber-small.gif %endif # ghosts %ghost %{_libdir}/xulrunner-%{version_internal}/global.reginfo %if %suse_version >= 1120 %ghost %{_bindir}/xulrunner %endif # API symlink (already in mozilla-js) #%{_libdir}/xulrunner-%{apiversion} # compat symlinks %if 0%{?ga_version:1} %ghost %{_libdir}/xulrunner-%{ga_version} %endif %files -n mozilla-js %defattr(-,root,root) %dir %{_libdir}/xulrunner-%{version_internal}/ %{_libdir}/xulrunner-%{apiversion} %{_libdir}/xulrunner-%{version_internal}/libmozjs.so %files devel %defattr(-,root,root) %{_libdir}/xulrunner-%{version_internal}/xpcshell %{_libdir}/xulrunner-devel-%{version_internal}/ # FIXME symlink dynamic libs below sdk/lib %attr(644,root,root) %{_libdir}/pkgconfig/* %{_includedir}/xulrunner-%{version_internal}/ %{_datadir}/xulrunner-%{version_internal}/ %if %localize %files translations-common -f %{_tmppath}/translations.common %defattr(-,root,root) %dir %{_libdir}/xulrunner-%{version_internal}/ %dir %{_libdir}/xulrunner-%{version_internal}/chrome/ %files translations-other -f %{_tmppath}/translations.other %defattr(-,root,root) %dir %{_libdir}/xulrunner-%{version_internal}/ %dir %{_libdir}/xulrunner-%{version_internal}/chrome/ %endif %if %crashreporter %files buildsymbols %defattr(-,root,root) %{_datadir}/mozilla/ %endif %changelog ++++++ add-plugins.sh.in ++++++ #! /bin/sh # Copyright (c) 2008 Wolfgang Rosenauer. All rights reserved. # # check if we are started as root # only one of UID and USER must be set correctly if test "$UID" != 0 -a "$USER" != root; then echo "You must be root to start $0." exit 1 fi PREFIX="%PROGDIR" # dictionaries MYSPELL=/usr/share/myspell MOZ_SPELL=$PREFIX/dictionaries if [ -d $MOZ_SPELL ] ; then if [ -d $MYSPELL ] ; then for dict in $MYSPELL/??[-_]??.aff ; do # check is it is really the file or it is a string which contain '??_??' if ! [ -e $dict ] ; then continue fi # the dict file name dict_file=`echo ${dict##*/}` # the dict file has a valid name lang=`echo ${dict_file:0:2}` country=`echo ${dict_file:3:2}` # check for .dic file if [ ! -r $MYSPELL/${lang}[-_]${country}.dic ] ; then continue fi # create links if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.aff ] ; then ln -sf $MYSPELL/${lang}[-_]${country}.aff \ $MOZ_SPELL/${lang}-${country}.aff fi if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.dic ] ; then ln -sf $MYSPELL/${lang}[-_]${country}.dic \ $MOZ_SPELL/${lang}-${country}.dic fi done echo "-> added myspell dictionaries" fi # remove broken links for dict in $MOZ_SPELL/*.{aff,dic} ; do if ! [ -r $dict ] ; then rm -f $dict fi done fi ++++++ baselibs.conf ++++++ xulrunner +/usr/lib(64)?/xulrunner-.* +/etc/gre.d/.* requires "mozilla-js-<targettype>" mozilla-js xulrunner-translations-common +/usr/lib(64)?/xulrunner-.* requires "xulrunner-<targettype> = <version>" supplements "packageand(xulrunner-translations-common:xulrunner-<targettype>)" xulrunner-translations-other +/usr/lib(64)?/xulrunner-.* requires "xulrunner-<targettype> = <version>" supplements "packageand(xulrunner-translations-other:xulrunner-<targettype>)" ++++++ create-tar.sh ++++++ #!/bin/bash CHANNEL="release" BRANCH="releases/mozilla-$CHANNEL" RELEASE_TAG="FIREFOX_12_0_RELEASE" VERSION="12.0" # mozilla hg clone http://hg.mozilla.org/$BRANCH mozilla pushd mozilla [ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG # get repo and source stamp echo -n "REV=" > ../source-stamp.txt hg -R . parent --template="{node|short}\n" >> ../source-stamp.txt echo -n "REPO=" >> ../source-stamp.txt hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt popd tar cjf xulrunner-$VERSION-source.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla # l10n test ! -d l10n && mkdir l10n for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do case $locale in ja-JP-mac|en-US) ;; *) hg clone http://hg.mozilla.org/releases/l10n/mozilla-$CHANNEL/$locale l10n/$locale [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $RELEASE_TAG ;; esac done tar cjf l10n-$VERSION.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n # compare-locales hg clone http://hg.mozilla.org/build/compare-locales tar cjf compare-locales.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales ++++++ find-external-requires.sh ++++++ #!/bin/sh # Finds requirements provided outside of the current file set filelist=$( sed "s/[]['\"*?{}]/\\\\\&/g" ) provides=$( echo "$filelist" | /usr/lib/rpm/find-provides ) echo "$filelist" \ | /usr/lib/rpm/find-requires \ | grep -F -v "$provides" \ | sort -u ++++++ idldir.patch ++++++ From: Wolfgang Rosenauer <stark@suse.de> Subject: fix IDL installation dir This is only needed to get the correct path in xulrunner-config Index: config/autoconf.mk.in =================================================================== RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v retrieving revision 3.449 diff -u -r3.449 autoconf.mk.in --- config/autoconf.mk.in 16 Feb 2008 22:23:08 -0000 3.449 +++ b/config/autoconf.mk.in 19 Feb 2008 14:07:13 -0000 @@ -62,7 +62,7 @@ libdir = @libdir@ datadir = @datadir@ mandir = @mandir@ -idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +idldir = $(includedir) installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++++++ mozilla-arm-cpu-detection.patch ++++++ # HG changeset patch # Parent 80b3a069c028690886ade5fdeb0f5d8b435ea368 diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk --- a/xpcom/glue/objs.mk +++ b/xpcom/glue/objs.mk @@ -71,13 +71,13 @@ XPCOM_GLUENS_SRC_LCPPSRCS = \ SSE.cpp \ unused.cpp \ nsProxyRelease.cpp \ nsTextFormatter.cpp \ GenericFactory.cpp \ FileUtils.cpp \ $(NULL) -ifeq (arm,$(TARGET_CPU)) +ifneq (,$(filter arm%,$(TARGET_CPU))) XPCOM_GLUENS_SRC_LCPPSRCS += arm.cpp endif XPCOM_GLUENS_SRC_CPPSRCS = $(addprefix $(topsrcdir)/xpcom/glue/,$(XPCOM_GLUENS_SRC_LCPPSRCS)) ++++++ mozilla-dump_syms-static.patch ++++++ # HG changeset patch # Parent 364802dc5df3b480143a54d318ceef74f32453fb NO-BUG: Ignore a hack which is not needed in distribution build environments. diff --git a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in b/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in --- a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in +++ b/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in @@ -58,11 +58,11 @@ HOST_LIBS += \ $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/dwarf/$(LIB_PREFIX)host_breakpad_dwarf_s.$(LIB_SUFFIX) \ $(NULL) # force C++ linking CPP_PROG_LINK = 1 #XXX: bug 554854 causes us to be unable to run binaries on the build slaves # due to them having an older libstdc++ -HOST_LDFLAGS += -static +#HOST_LDFLAGS += -static include $(topsrcdir)/config/rules.mk ++++++ mozilla-gcc47.patch ++++++ # HG changeset patch # Parent debab900e37fdd4f8981c06beef6f193a04bd2b7 Patch to make Mozilla build with gcc 4.7, including - Bug 725655 - gcc 4.7 build failures (missing headers) (TM: Mozilla13) - Bug 734490 - "no viable overloaded 'PRIxPTR'" when building with Clang or GCC 4.7 (TM: Mozilla14) diff --git a/ipc/chromium/src/base/file_util_linux.cc b/ipc/chromium/src/base/file_util_linux.cc --- a/ipc/chromium/src/base/file_util_linux.cc +++ b/ipc/chromium/src/base/file_util_linux.cc @@ -1,15 +1,18 @@ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/file_util.h" #include <fcntl.h> +#if defined(ANDROID) || defined(OS_POSIX) +#include <unistd.h> +#endif #include <string> #include <vector> #include "base/eintr_wrapper.h" #include "base/file_path.h" #include "base/string_util.h" diff --git a/ipc/chromium/src/base/message_pump_libevent.cc b/ipc/chromium/src/base/message_pump_libevent.cc --- a/ipc/chromium/src/base/message_pump_libevent.cc +++ b/ipc/chromium/src/base/message_pump_libevent.cc @@ -1,16 +1,19 @@ // Copyright (c) 2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/message_pump_libevent.h" #include <errno.h> #include <fcntl.h> +#if defined(ANDROID) || defined(OS_POSIX) +#include <unistd.h> +#endif #include "eintr_wrapper.h" #include "base/logging.h" #include "base/scoped_nsautorelease_pool.h" #include "base/scoped_ptr.h" #include "base/time.h" #include "third_party/libevent/event.h" diff --git a/ipc/chromium/src/base/time_posix.cc b/ipc/chromium/src/base/time_posix.cc --- a/ipc/chromium/src/base/time_posix.cc +++ b/ipc/chromium/src/base/time_posix.cc @@ -8,16 +8,19 @@ #include <mach/mach_time.h> #endif #include <sys/time.h> #ifdef ANDROID #include <time64.h> #else #include <time.h> #endif +#if defined(ANDROID) || defined(OS_POSIX) +#include <unistd.h> +#endif #include <limits> #include "base/basictypes.h" #include "base/logging.h" namespace base { diff --git a/layout/base/tests/TestPoisonArea.cpp b/layout/base/tests/TestPoisonArea.cpp --- a/layout/base/tests/TestPoisonArea.cpp +++ b/layout/base/tests/TestPoisonArea.cpp @@ -392,53 +392,53 @@ ReservePoisonArea() { if (sizeof(uintptr_t) == 8) { // Use the hardware-inaccessible region. // We have to avoid 64-bit constants and shifts by 32 bits, since this // code is compiled in 32-bit mode, although it is never executed there. uintptr_t result = (((uintptr_t(0x7FFFFFFFu) << 31) << 1 | uintptr_t(0xF0DEAFFFu)) & ~uintptr_t(PAGESIZE-1)); - printf("INFO | poison area assumed at 0x%.*"PRIxPTR"\n", SIZxPTR, result); + printf("INFO | poison area assumed at 0x%.*" PRIxPTR "\n", SIZxPTR, result); return result; } else { // First see if we can allocate the preferred poison address from the OS. uintptr_t candidate = (0xF0DEAFFF & ~(PAGESIZE-1)); void *result = ReserveRegion(candidate, false); if (result == (void *)candidate) { // success - inaccessible page allocated - printf("INFO | poison area allocated at 0x%.*"PRIxPTR + printf("INFO | poison area allocated at 0x%.*" PRIxPTR " (preferred addr)\n", SIZxPTR, (uintptr_t)result); return candidate; } // That didn't work, so see if the preferred address is within a range // of permanently inacessible memory. if (ProbeRegion(candidate)) { // success - selected page cannot be usable memory if (result != MAP_FAILED) ReleaseRegion(result); - printf("INFO | poison area assumed at 0x%.*"PRIxPTR + printf("INFO | poison area assumed at 0x%.*" PRIxPTR " (preferred addr)\n", SIZxPTR, candidate); return candidate; } // The preferred address is already in use. Did the OS give us a // consolation prize? if (result != MAP_FAILED) { - printf("INFO | poison area allocated at 0x%.*"PRIxPTR + printf("INFO | poison area allocated at 0x%.*" PRIxPTR " (consolation prize)\n", SIZxPTR, (uintptr_t)result); return (uintptr_t)result; } // It didn't, so try to allocate again, without any constraint on // the address. result = ReserveRegion(0, false); if (result != MAP_FAILED) { - printf("INFO | poison area allocated at 0x%.*"PRIxPTR + printf("INFO | poison area allocated at 0x%.*" PRIxPTR " (fallback)\n", SIZxPTR, (uintptr_t)result); return (uintptr_t)result; } printf("ERROR | no usable poison area found\n"); return 0; } } @@ -450,17 +450,17 @@ static uintptr_t ReservePositiveControl() { void *result = ReserveRegion(0, false); if (result == MAP_FAILED) { printf("ERROR | allocating positive control | %s\n", LastErrMsg()); return 0; } - printf("INFO | positive control allocated at 0x%.*"PRIxPTR"\n", + printf("INFO | positive control allocated at 0x%.*" PRIxPTR "\n", SIZxPTR, (uintptr_t)result); return (uintptr_t)result; } /* The "negative control" area confirms that our probe logic does detect a * page that is readable, writable, or executable. */ static uintptr_t @@ -481,17 +481,17 @@ ReserveNegativeControl() // Now mark it executable as well as readable and writable. // (mmap(PROT_EXEC) may fail when applied to anonymous memory.) if (MakeRegionExecutable(result)) { printf("ERROR | making negative control executable | %s\n", LastErrMsg()); return 0; } - printf("INFO | negative control allocated at 0x%.*"PRIxPTR"\n", + printf("INFO | negative control allocated at 0x%.*" PRIxPTR "\n", SIZxPTR, (uintptr_t)result); return (uintptr_t)result; } static void JumpTo(uintptr_t opaddr) { #ifdef __ia64 ++++++ mozilla-language.patch ++++++ # HG changeset patch # User Wolfgang Rosenauer <wr@rosenauer.org> # Parent 0d6917b8f28f6e0398dbf329dda4932ba4f997c2 Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp --- a/intl/locale/src/nsLocaleService.cpp +++ b/intl/locale/src/nsLocaleService.cpp @@ -160,16 +160,17 @@ nsLocaleService::nsLocaleService(void) nsRefPtr<nsLocale> resultLocale(new nsLocale()); NS_ENSURE_TRUE(resultLocale, ); #ifdef MOZ_WIDGET_QT const char* lang = QLocale::system().name().toAscii(); #else // Get system configuration const char* lang = getenv("LANG"); + const char* language = getenv("LANGUAGE"); #endif nsAutoString xpLocale, platformLocale; nsAutoString category, category_platform; int i; for( i = 0; i < LocaleListLength; i++ ) { nsresult result; @@ -188,16 +189,21 @@ nsLocaleService::nsLocaleService(void) } else { CopyASCIItoUTF16(lang, platformLocale); result = nsPosixLocale::GetXPLocale(lang, xpLocale); } } if (NS_FAILED(result)) { return; } + // LANGUAGE is overriding LC_MESSAGES + if (i == LC_MESSAGES && language && *language) { + CopyASCIItoUTF16(language, platformLocale); + result = nsPosixLocale::GetXPLocale(language, xpLocale); + } resultLocale->AddCategory(category, xpLocale); resultLocale->AddCategory(category_platform, platformLocale); } mSystemLocale = do_QueryInterface(resultLocale); mApplicationLocale = do_QueryInterface(resultLocale); #endif // XP_UNIX #ifdef XP_OS2 ++++++ mozilla-libnotify.patch ++++++ # HG changeset patch # User Wolfgang Rosenauer <wr@rosenauer.org> # Parent c684863b1eb3bcae92ef24bc2ac511985b1ad7e4 Bug 737646 - no biff notification if notification-daemon not running diff --git a/toolkit/system/gnome/nsAlertsIconListener.cpp b/toolkit/system/gnome/nsAlertsIconListener.cpp --- a/toolkit/system/gnome/nsAlertsIconListener.cpp +++ b/toolkit/system/gnome/nsAlertsIconListener.cpp @@ -47,16 +47,17 @@ #include <gdk/gdk.h> // Compatibility macro for <libnotify-0.7 #ifndef NOTIFY_CHECK_VERSION #define NOTIFY_CHECK_VERSION(x,y,z) 0 #endif static bool gHasActions = false; +static bool gHasCaps = false; static void notify_action_cb(NotifyNotification *notification, gchar *action, gpointer user_data) { nsAlertsIconListener* alert = static_cast<nsAlertsIconListener*> (user_data); alert->SendCallback(); } @@ -338,27 +339,34 @@ nsAlertsIconListener::InitAlertAsync(con appShortName.AssignLiteral("Mozilla"); } if (!notify_init(appShortName.get())) return NS_ERROR_FAILURE; GList *server_caps = notify_get_server_caps(); if (server_caps) { + gHasCaps = true; for (GList* cap = server_caps; cap != NULL; cap = cap->next) { if (!strcmp((char*) cap->data, "actions")) { gHasActions = true; break; } } g_list_foreach(server_caps, (GFunc)g_free, NULL); g_list_free(server_caps); } } + if (!gHasCaps) { + // if notify_get_server_caps() failed above we need to assume + // there is no notification-server to display anything + return NS_ERROR_FAILURE; + } + if (!gHasActions && aAlertTextClickable) return NS_ERROR_FAILURE; // No good, fallback to XUL nsCOMPtr<nsIObserverService> obsServ = do_GetService("@mozilla.org/observer-service;1"); if (obsServ) obsServ->AddObserver(this, "quit-application", true); ++++++ mozilla-linux3.patch ++++++ # HG changeset patch # Parent bf7c3e1c6174630743f9f94808c4dd3a2edc0c6b diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py --- a/toolkit/crashreporter/tools/symbolstore.py +++ b/toolkit/crashreporter/tools/symbolstore.py @@ -376,16 +376,17 @@ def GetVCSFilename(file, srcdirs): return (file.replace("\\", "/"), root) def GetPlatformSpecificDumper(**kwargs): """This function simply returns a instance of a subclass of Dumper that is appropriate for the current platform.""" return {'win32': Dumper_Win32, 'cygwin': Dumper_Win32, 'linux2': Dumper_Linux, + 'linux3': Dumper_Linux, 'sunos5': Dumper_Solaris, 'darwin': Dumper_Mac}[sys.platform](**kwargs) def SourceIndex(fileStream, outputPath, vcs_root): """Takes a list of files, writes info to a data block in a .stream file""" # Creates a .pdb.stream file in the mozilla\objdir to be used for source indexing # Create the srcsrv data block that indexes the pdb file result = True ++++++ mozilla-nongnome-proxies.patch ++++++ From: Wolfgang Rosenauer Subject: Do not use gconf for proxy settings if not running within Gnome Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp =================================================================== RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v retrieving revision 1.1 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp @@ -71,18 +71,24 @@ private: nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); }; NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) nsresult nsUnixSystemProxySettings::Init() { - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + // If this is a GNOME session, load gconf and try to use its preferences. + // If gconf is not available (which would be stupid) we'll proceed as if + // this was not a GNOME session, using *_PROXY environment variables. + const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); + if (sessionType && !strcmp(sessionType, "gnome")) { + mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + } return NS_OK; } bool nsUnixSystemProxySettings::IsProxyMode(const char* aMode) { nsCAutoString mode; return NS_SUCCEEDED(mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) && ++++++ mozilla-ntlm-full-path.patch ++++++ # HG changeset patch # User Petr Cerny <pcerny@novell.com> # Parent a843037ea4cee813a68dd529e7a503d1e40b81e4 Bug 634334 - call to the ntlm_auth helper fails diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp --- a/extensions/auth/nsAuthSambaNTLM.cpp +++ b/extensions/auth/nsAuthSambaNTLM.cpp @@ -200,17 +200,17 @@ static PRUint8* ExtractMessage(const nsA nsresult nsAuthSambaNTLM::SpawnNTLMAuthHelper() { const char* username = PR_GetEnv("USER"); if (!username) return NS_ERROR_FAILURE; char* args[] = { - "ntlm_auth", + "/usr/bin/ntlm_auth", "--helper-protocol", "ntlmssp-client-1", "--use-cached-creds", "--username", const_cast<char*>(username), nsnull }; bool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD); if (!isOK) ++++++ mozilla-pkgconfig.patch ++++++ From: Wolfgang Rosenauer Subject: pkgconfig tuning diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in --- a/xulrunner/installer/Makefile.in +++ b/xulrunner/installer/Makefile.in @@ -69,16 +69,19 @@ ifndef MOZ_PLATFORM_MAEMO GENERATE_CACHE = 1 endif include $(topsrcdir)/toolkit/mozapps/installer/signing.mk include $(topsrcdir)/toolkit/mozapps/installer/packager.mk # Add pkg-config files to the install:: target +# the apilibdir always ends with 1.9 as every patch update will provide a link +apilibdir = $(dir $(installdir))xulrunner-12 + pkg_config_files = \ libxul.pc \ libxul-embedding.pc \ mozilla-js.pc \ mozilla-plugin.pc \ $(NULL) ifdef MOZ_NATIVE_NSPR @@ -106,16 +109,17 @@ pkg_config_files += mozilla-nss.pc endif %.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS) cat $< | sed \ -e "s|%prefix%|$(prefix)|" \ -e "s|%includedir%|$(includedir)|" \ -e "s|%idldir%|$(idldir)|" \ -e "s|%sdkdir%|$(sdkdir)|" \ + -e "s|%libdir%|$(apilibdir)|" \ -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \ -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \ -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \ -e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \ diff --git a/xulrunner/installer/libxul-embedding.pc.in b/xulrunner/installer/libxul-embedding.pc.in --- a/xulrunner/installer/libxul-embedding.pc.in +++ b/xulrunner/installer/libxul-embedding.pc.in @@ -1,10 +1,11 @@ prefix=%prefix% sdkdir=%sdkdir% includedir=%includedir% idldir=%idldir% Name: libxul-embedding Description: Static library for version-independent embedding of the Mozilla runtime Version: %MOZILLA_VERSION% -Libs: -L${sdkdir}/lib -lxpcomglue -ldl +Requires: %NSPR_NAME% >= %NSPR_VERSION% +Libs: -L${sdkdir}/sdk/lib -lxpcomglue -ldl Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/xulrunner/installer/libxul.pc.in b/xulrunner/installer/libxul.pc.in --- a/xulrunner/installer/libxul.pc.in +++ b/xulrunner/installer/libxul.pc.in @@ -1,10 +1,11 @@ prefix=%prefix% sdkdir=%sdkdir% +libdir=%libdir% includedir=%includedir% idldir=%idldir% Name: libxul Description: The Mozilla Runtime and Embedding Engine Version: %MOZILLA_VERSION% Requires: %NSPR_NAME% >= %NSPR_VERSION% Libs: -L${sdkdir}/lib %MOZ_XUL_LINK% diff --git a/xulrunner/installer/mozilla-js.pc.in b/xulrunner/installer/mozilla-js.pc.in --- a/xulrunner/installer/mozilla-js.pc.in +++ b/xulrunner/installer/mozilla-js.pc.in @@ -1,10 +1,11 @@ prefix=%prefix% sdkdir=%sdkdir% +libdir=%libdir% includedir=%includedir% Name: JavaScript Description: The Mozilla JavaScript Library Version: %MOZILLA_VERSION% Requires: %NSPR_NAME% >= %NSPR_VERSION% -Libs: -L${sdkdir}/lib %MOZ_JS_LINK% +Libs: -Wl,-rpath,${libdir} -L${sdkdir}/lib %MOZ_JS_LINK% Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE ++++++ mozilla-prefer_plugin_pref.patch ++++++ From: Ubuntu Subject: introduce a pref to prefer certain plugins for mime-types diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -1580,17 +1580,48 @@ nsPluginHost::FindPluginForType(const ch bool aCheckEnabled) { if (!aMimeType) { return nsnull; } LoadPlugins(); + nsresult res; + nsCOMPtr<nsIPrefBranch> prefB (do_QueryInterface(mPrefService)); + + char *preferredPluginPath = NULL; + nsCAutoString mimetypePrefString ("modules.plugins.mimetype."); + mimetypePrefString.Append(aMimeType); + const char *mimetypePrefChar = mimetypePrefString.get(); + res = prefB->GetCharPref(mimetypePrefChar, &preferredPluginPath); + + if(!NS_SUCCEEDED(res)) preferredPluginPath = NULL; + nsPluginTag *plugin = mPlugins; + if(preferredPluginPath) { + while (nsnull != plugin) { + if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) || + 0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) { + return plugin; + } + plugin = plugin->mNext; + } + + // now lets search for substrings + plugin = mPlugins; + while (nsnull != plugin) { + if (nsnull != PL_strstr(plugin->mFileName.get(), preferredPluginPath) || + nsnull != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) { + return plugin; + } + plugin = plugin->mNext; + } + } + while (plugin) { if (!aCheckEnabled || plugin->IsEnabled()) { PRInt32 mimeCount = plugin->mMimeTypes.Length(); for (PRInt32 i = 0; i < mimeCount; i++) { if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) { return plugin; } } ++++++ mozilla-revert_621446.patch ++++++ # HG changeset patch # Parent 8da41a2cee774ce4d00b9ac1032a495b8bc560a0 Revert investigation patch for bmo#621446; as it is useless on desktop and breaks the build for certain compilers diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -52,29 +52,25 @@ #include "nsIBadCertListener2.h" #include "nsICacheEntryDescriptor.h" #include "nsSerializationHelper.h" #include "nsISerializable.h" #include "nsIAssociatedContentSecurity.h" #include "nsIApplicationCacheService.h" #include "nsIOfflineCacheUpdate.h" #include "nsIRedirectChannelRegistrar.h" -#include "prinit.h" namespace mozilla { namespace net { HttpChannelParent::HttpChannelParent(PBrowserParent* iframeEmbedding) : mIPCClosed(false) , mStoredStatus(0) , mStoredProgress(0) , mStoredProgressMax(0) - , mSentRedirect1Begin(false) - , mSentRedirect1BeginFailed(false) - , mReceivedRedirect2Verify(false) { // Ensure gHttpHandler is initialized: we need the atom table up and running. nsIHttpProtocolHandler* handler; CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &handler); NS_ASSERTION(handler, "no http handler"); mTabParent = do_QueryObject(static_cast<TabParent*>(iframeEmbedding)); } @@ -326,21 +322,16 @@ HttpChannelParent::RecvUpdateAssociatedC mAssociatedContentSecurity->SetCountSubRequestsHighSecurity(high); mAssociatedContentSecurity->SetCountSubRequestsLowSecurity(low); mAssociatedContentSecurity->SetCountSubRequestsBrokenSecurity(broken); mAssociatedContentSecurity->SetCountSubRequestsNoSecurity(no); } return true; } -// Bug 621446 investigation, we don't want conditional PR_Aborts bellow to be -// merged to a single address. -#pragma warning(disable : 4068) -#pragma GCC optimize ("O0") - bool HttpChannelParent::RecvRedirect2Verify(const nsresult& result, const RequestHeaderTuples& changedHeaders) { if (NS_SUCCEEDED(result)) { nsCOMPtr<nsIHttpChannel> newHttpChannel = do_QueryInterface(mRedirectChannel); @@ -348,40 +339,21 @@ HttpChannelParent::RecvRedirect2Verify(c for (PRUint32 i = 0; i < changedHeaders.Length(); i++) { newHttpChannel->SetRequestHeader(changedHeaders[i].mHeader, changedHeaders[i].mValue, changedHeaders[i].mMerge); } } } - if (!mRedirectCallback) { - // Bug 621446 investigation (optimization turned off above) - if (mReceivedRedirect2Verify) - NS_RUNTIMEABORT("Duplicate fire"); - if (mSentRedirect1BeginFailed) - NS_RUNTIMEABORT("Send to child failed"); - if (mSentRedirect1Begin && NS_FAILED(result)) - NS_RUNTIMEABORT("Redirect failed"); - if (mSentRedirect1Begin && NS_SUCCEEDED(result)) - NS_RUNTIMEABORT("Redirect succeeded"); - if (!mRedirectChannel) - NS_RUNTIMEABORT("Missing redirect channel"); - } - - mReceivedRedirect2Verify = true; - mRedirectCallback->OnRedirectVerifyCallback(result); mRedirectCallback = nsnull; return true; } -// Bug 621446 investigation -#pragma GCC reset_options - bool HttpChannelParent::RecvDocumentChannelCleanup() { // From now on only using mAssociatedContentSecurity. Free everything else. mChannel = 0; // Reclaim some memory sooner. mCacheDescriptor = 0; // Else we'll block other channels reading same URI return true; } @@ -583,24 +555,18 @@ HttpChannelParent::StartRedirect(PRUint3 nsHttpChannel *httpChan = static_cast<nsHttpChannel *>(mChannel.get()); nsHttpResponseHead *responseHead = httpChan->GetResponseHead(); bool result = SendRedirect1Begin(newChannelId, IPC::URI(newURI), redirectFlags, responseHead ? *responseHead : nsHttpResponseHead()); - if (!result) { - // Bug 621446 investigation - mSentRedirect1BeginFailed = true; + if (!result) return NS_BINDING_ABORTED; - } - - // Bug 621446 investigation - mSentRedirect1Begin = true; // Result is handled in RecvRedirect2Verify above mRedirectChannel = newChannel; mRedirectCallback = callback; return NS_OK; } diff --git a/netwerk/protocol/http/HttpChannelParent.h b/netwerk/protocol/http/HttpChannelParent.h --- a/netwerk/protocol/http/HttpChannelParent.h +++ b/netwerk/protocol/http/HttpChannelParent.h @@ -128,18 +128,14 @@ private: nsCOMPtr<nsIChannel> mRedirectChannel; nsCOMPtr<nsIAsyncVerifyRedirectCallback> mRedirectCallback; // state for combining OnStatus/OnProgress with OnDataAvailable // into one IPDL call to child. nsresult mStoredStatus; PRUint64 mStoredProgress; PRUint64 mStoredProgressMax; - - bool mSentRedirect1Begin : 1; - bool mSentRedirect1BeginFailed : 1; - bool mReceivedRedirect2Verify : 1; }; } // namespace net } // namespace mozilla #endif // mozilla_net_HttpChannelParent_h ++++++ mozilla-sle11.patch ++++++ Subject: Patches needed to build on SLE11/11.1 References: https://bugzilla.mozilla.org/show_bug.cgi?id=513422 diff --git a/xpcom/glue/SSE.cpp b/xpcom/glue/SSE.cpp --- a/xpcom/glue/SSE.cpp +++ b/xpcom/glue/SSE.cpp @@ -44,26 +44,77 @@ namespace { // SSE.h has parallel #ifs which declare MOZILLA_SSE_HAVE_CPUID_DETECTION. // We can't declare these functions in the header file, however, because // <intrin.h> conflicts with <windows.h> on MSVC 2005, and some files want to // include both SSE.h and <windows.h>. #ifdef HAVE_CPUID_H // cpuid.h is available on gcc 4.3 and higher on i386 and x86_64 -#include <cpuid.h> +//#include <cpuid.h> enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 }; +#ifdef __i386__ +#define _my_cpuid(level, a, b, c, d) \ + __asm__ ("xchg{l}\t{%%}ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchg{l}\t{%%}ebx, %1\n\t" \ + : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ + : "0" (level)) +#else +#define _my_cpuid(level, a, b, c, d) \ + __asm__ ("cpuid\n\t" \ + : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ + : "0" (level)) +#endif + +static __inline unsigned int +my_cpuid_max (unsigned int __ext, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; + +#ifdef __i386__ + __asm__ ("pushf{l|d}\n\t" + "pushf{l|d}\n\t" + "pop{l}\t%0\n\t" + "mov{l}\t{%0, %1|%1, %0}\n\t" + "xor{l}\t{%2, %0|%0, %2}\n\t" + "push{l}\t%0\n\t" + "popf{l|d}\n\t" + "pushf{l|d}\n\t" + "pop{l}\t%0\n\t" + "popf{l|d}\n\t" + : "=&r" (__eax), "=&r" (__ebx) + : "i" (0x00200000)); + + if (!((__eax ^ __ebx) & 0x00200000)) + return 0; +#endif + + /* Host supports cpuid. Return highest supported cpuid input value. */ + _my_cpuid (__ext, __eax, __ebx, __ecx, __edx); + + if (__sig) + *__sig = __ebx; + + return __eax; +} + static bool has_cpuid_bit(unsigned int level, CPUIDRegister reg, unsigned int bit) { unsigned int regs[4]; - return __get_cpuid(level, ®s[0], ®s[1], ®s[2], ®s[3]) && - (regs[reg] & bit); + + unsigned int __ext = level & 0x80000000; + if (my_cpuid_max(__ext, 0) < level) + return false; + + _my_cpuid(level, regs[0], regs[1], regs[2], regs[3]); + return !!(unsigned(regs[reg]) & bit); } #elif defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(_M_IX86) || defined(_M_AMD64)) // MSVC 2005 or newer on x86-32 or x86-64 #include <intrin.h> enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 }; ++++++ mozilla-yarr-pcre.patch ++++++ # HG changeset patch # Parent 58dd942011a81f3149d9bc34e808806bda099056 # User Landry Breuil <landry@openbsd.org> Use YARR interpreter instead of PCRE on platforms where YARR JIT is not supported diff --git a/js/src/Makefile.in b/js/src/Makefile.in --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -335,25 +335,29 @@ CPPSRCS += checks.cc \ # END enclude sources for V8 dtoa ############################################# # For architectures without YARR JIT, PCRE is faster than the YARR # interpreter (bug 684559). ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -VPATH += $(srcdir)/yarr/pcre \ +VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ + $(srcdir)/yarr \ $(NULL) CPPSRCS += \ - pcre_compile.cpp \ - pcre_exec.cpp \ - pcre_tables.cpp \ - pcre_xclass.cpp \ - pcre_ucp_searchfuncs.cpp \ + OSAllocatorOS2.cpp \ + OSAllocatorPosix.cpp \ + OSAllocatorWin.cpp \ + PageBlock.cpp \ + YarrInterpreter.cpp \ + YarrPattern.cpp \ + YarrSyntaxChecker.cpp \ $(NULL) else ############################################### # BEGIN include sources for the Nitro assembler # ENABLE_YARR_JIT = 1 @@ -878,20 +882,20 @@ endif ############################################### # BEGIN kludges for the Nitro assembler # # Needed to "configure" it correctly. Unfortunately these # flags wind up being applied to all code in js/src, not just # the code in js/src/assembler. -CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 +CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_METHODJIT)) -CXXFLAGS += -DENABLE_JIT=1 +CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1 endif INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr ifdef ENABLE_METHODJIT # Build a standalone test program that exercises the assembler # sources a bit. TESTMAIN_OBJS = \ diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -696,17 +696,19 @@ JS_IsBuiltinFunctionConstructor(JSFuncti static JSBool js_NewRuntimeWasCalled = JS_FALSE; JSRuntime::JSRuntime() : atomsCompartment(NULL), #ifdef JS_THREADSAFE ownerThread_(NULL), #endif tempLifoAlloc(TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE), +#if ENABLE_ASSEMBLER execAlloc_(NULL), +#endif bumpAlloc_(NULL), nativeStackBase(0), nativeStackQuota(0), interpreterFrames(NULL), cxCallback(NULL), compartmentCallback(NULL), activityCallback(NULL), activityCallbackArg(NULL), @@ -851,17 +853,19 @@ JSRuntime::init(uint32_t maxbytes) nativeStackBase = GetNativeStackBase(); return true; } JSRuntime::~JSRuntime() { JS_ASSERT(onOwnerThread()); +#if ENABLE_ASSEMBLER delete_<JSC::ExecutableAllocator>(execAlloc_); +#endif delete_<WTF::BumpPointerAllocator>(bumpAlloc_); #ifdef DEBUG /* Don't hurt everyone in leaky ol' Mozilla with a fatal JS_ASSERT! */ if (!JS_CLIST_IS_EMPTY(&contextList)) { JSContext *cx, *iter = NULL; uintN cxcount = 0; while ((cx = js_ContextIterator(this, JS_TRUE, &iter)) != NULL) { diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -100,19 +100,21 @@ JSRuntime::sizeOfExcludingThis(JSMallocS if (normal) *normal = mallocSizeOf(dtoaState); if (temporary) *temporary = tempLifoAlloc.sizeOfExcludingThis(mallocSizeOf); if (regexpCode) { size_t method = 0, regexp = 0, unused = 0; +#if ENABLE_ASSEMBLER if (execAlloc_) execAlloc_->sizeOfCode(&method, ®exp, &unused); JS_ASSERT(method == 0); /* this execAlloc is only used for regexp code */ +#endif *regexpCode = regexp + unused; } if (stackCommitted) *stackCommitted = stackSpace.sizeOfCommitted(); } JS_FRIEND_API(void) @@ -124,33 +126,37 @@ JSRuntime::triggerOperationCallback() */ JS_ATOMIC_SET(&interrupt, 1); } void JSRuntime::setJitHardening(bool enabled) { jitHardening = enabled; +#if ENABLE_ASSEMBLER if (execAlloc_) execAlloc_->setRandomize(enabled); +#endif } +#if ENABLE_ASSEMBLER JSC::ExecutableAllocator * JSRuntime::createExecutableAllocator(JSContext *cx) { JS_ASSERT(!execAlloc_); JS_ASSERT(cx->runtime == this); JSC::AllocationBehavior randomize = jitHardening ? JSC::AllocationCanRandomize : JSC::AllocationDeterministic; execAlloc_ = new_<JSC::ExecutableAllocator>(randomize); if (!execAlloc_) js_ReportOutOfMemory(cx); return execAlloc_; } +#endif WTF::BumpPointerAllocator * JSRuntime::createBumpPointerAllocator(JSContext *cx) { JS_ASSERT(!bumpAlloc_); JS_ASSERT(cx->runtime == this); bumpAlloc_ = new_<WTF::BumpPointerAllocator>(); diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -219,26 +219,32 @@ struct JSRuntime : js::RuntimeFriendFiel static const size_t TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 1 << 12; js::LifoAlloc tempLifoAlloc; private: /* * Both of these allocators are used for regular expression code which is shared at the * thread-data level. */ +#if ENABLE_ASSEMBLER JSC::ExecutableAllocator *execAlloc_; +#endif WTF::BumpPointerAllocator *bumpAlloc_; +#if ENABLE_ASSEMBLER JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx); +#endif WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx); public: +#if ENABLE_ASSEMBLER JSC::ExecutableAllocator *getExecutableAllocator(JSContext *cx) { return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx); } +#endif WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) { return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx); } /* Base address of the native stack for the current thread. */ uintptr_t nativeStackBase; /* The native stack size limit that runtime should not exceed. */ diff --git a/js/src/jsprvtd.h b/js/src/jsprvtd.h --- a/js/src/jsprvtd.h +++ b/js/src/jsprvtd.h @@ -313,22 +313,23 @@ typedef Handle<BaseShape*> Handl typedef Handle<types::TypeObject*> HandleTypeObject; typedef Handle<JSString*> HandleString; typedef Handle<JSAtom*> HandleAtom; typedef Handle<jsid> HandleId; typedef Handle<Value> HandleValue; } /* namespace js */ +#if ENABLE_ASSEMBLER namespace JSC { class ExecutableAllocator; } /* namespace JSC */ - +#endif namespace WTF { class BumpPointerAllocator; } /* namespace WTF */ } /* export "C++" */ diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h --- a/js/src/vm/RegExpObject-inl.h +++ b/js/src/vm/RegExpObject-inl.h @@ -132,26 +132,28 @@ RegExpObject::setMultiline(bool enabled) } inline void RegExpObject::setSticky(bool enabled) { setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); } +#if ENABLE_YARR_JIT /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ inline bool detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx) { #if defined(ANDROID) && defined(JS_METHODJIT) return cx->methodJitEnabled; #else return true; #endif } +#endif inline bool RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) { JS_ASSERT(ObjectClassIs(obj, ESClass_RegExp, cx)); if (obj.isRegExp()) return obj.asRegExp().getShared(cx, g); return Proxy::regexp_toShared(cx, &obj, g); diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp --- a/js/src/vm/RegExpObject.cpp +++ b/js/src/vm/RegExpObject.cpp @@ -162,17 +162,16 @@ MatchPairs::checkAgainst(size_t inputLen continue; JS_ASSERT(size_t(p.limit) <= inputLength); } #endif } /* detail::RegExpCode */ -#if ENABLE_YARR_JIT void RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) { switch (error) { case JSC::Yarr::NoError: JS_NOT_REACHED("Called reportYarrError with value for no error"); return; #define COMPILE_EMSG(__code, __msg) \ @@ -194,73 +193,36 @@ RegExpCode::reportYarrError(JSContext *c COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER); COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH); #undef COMPILE_EMSG default: JS_NOT_REACHED("Unknown Yarr error code"); } } -#else /* !ENABLE_YARR_JIT */ - -void -RegExpCode::reportPCREError(JSContext *cx, int error) -{ -#define REPORT(msg_) \ - JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ - return - switch (error) { - case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); - case 1: REPORT(JSMSG_TRAILING_SLASH); - case 2: REPORT(JSMSG_TRAILING_SLASH); - case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 4: REPORT(JSMSG_BAD_QUANTIFIER); - case 5: REPORT(JSMSG_BAD_QUANTIFIER); - case 6: REPORT(JSMSG_BAD_CLASS_RANGE); - case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 8: REPORT(JSMSG_BAD_CLASS_RANGE); - case 9: REPORT(JSMSG_BAD_QUANTIFIER); - case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); - case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); - case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 14: REPORT(JSMSG_MISSING_PAREN); - case 15: REPORT(JSMSG_BAD_BACKREF); - case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - default: - JS_NOT_REACHED("Precondition violation: unknown PCRE error code."); - } -#undef REPORT -} - -#endif /* ENABLE_YARR_JIT */ - bool RegExpCode::compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags) { -#if ENABLE_YARR_JIT /* Parse the pattern. */ ErrorCode yarrError; YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), &yarrError); if (yarrError) { reportYarrError(cx, NULL, yarrError); return false; } *parenCount = yarrPattern.m_numSubpatterns; /* * The YARR JIT compiler attempts to compile the parsed pattern. If * it cannot, it informs us via |codeBlock.isFallBack()|, in which * case we have to bytecode compile it. */ -#ifdef JS_METHODJIT +#if ENABLE_YARR_JIT && defined(JS_METHODJIT) if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); if (!execAlloc) { js_ReportOutOfMemory(cx); return false; } JSGlobalData globalData(execAlloc); @@ -271,58 +233,41 @@ RegExpCode::compile(JSContext *cx, JSLin #endif WTF::BumpPointerAllocator *bumpAlloc = cx->runtime->getBumpPointerAllocator(cx); if (!bumpAlloc) { js_ReportOutOfMemory(cx); return false; } +#if ENABLE_YARR_JIT codeBlock.setFallBack(true); +#endif byteCode = byteCompile(yarrPattern, bumpAlloc).get(); return true; -#else /* !defined(ENABLE_YARR_JIT) */ - int error = 0; - compiled = jsRegExpCompile(pattern.chars(), pattern.length(), - ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, - multiline() ? JSRegExpMultiline : JSRegExpSingleLine, - parenCount, &error); - if (error) { - reportPCREError(cx, error); - return false; - } - return true; -#endif } RegExpRunStatus RegExpCode::execute(JSContext *cx, const jschar *chars, size_t length, size_t start, int *output, size_t outputCount) { int result; #if ENABLE_YARR_JIT (void) cx; /* Unused. */ if (codeBlock.isFallBack()) result = JSC::Yarr::interpret(byteCode, chars, start, length, output); else result = JSC::Yarr::execute(codeBlock, chars, start, length, output); #else - result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); + result = JSC::Yarr::interpret(byteCode, chars, start, length, output); #endif if (result == -1) return RegExpRunStatus_Success_NotFound; -#if !ENABLE_YARR_JIT - if (result < 0) { - reportPCREError(cx, result); - return RegExpRunStatus_Error; - } -#endif - JS_ASSERT(result >= 0); return RegExpRunStatus_Success; } /* RegExpObject */ static void regexp_trace(JSTracer *trc, JSObject *obj) diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h --- a/js/src/vm/RegExpObject.h +++ b/js/src/vm/RegExpObject.h @@ -46,20 +46,18 @@ #include <stddef.h> #include "jsobj.h" #include "js/TemplateLib.h" #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" +#endif #include "yarr/YarrSyntaxChecker.h" -#else -#include "yarr/pcre/pcre.h" -#endif /* * JavaScript Regular Expressions * * There are several engine concepts associated with a single logical regexp: * * RegExpObject - The JS-visible object whose .[[Class]] equals "RegExp" * @@ -107,78 +105,61 @@ class RegExpObjectBuilder JSObject * CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto); namespace detail { class RegExpCode { -#if ENABLE_YARR_JIT typedef JSC::Yarr::BytecodePattern BytecodePattern; typedef JSC::Yarr::ErrorCode ErrorCode; + typedef JSC::Yarr::YarrPattern YarrPattern; +#if ENABLE_YARR_JIT typedef JSC::Yarr::JSGlobalData JSGlobalData; typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; - typedef JSC::Yarr::YarrPattern YarrPattern; /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */ YarrCodeBlock codeBlock; +#endif BytecodePattern *byteCode; -#else - JSRegExp *compiled; -#endif public: RegExpCode() : #if ENABLE_YARR_JIT codeBlock(), +#endif byteCode(NULL) -#else - compiled(NULL) -#endif { } ~RegExpCode() { #if ENABLE_YARR_JIT codeBlock.release(); +#endif if (byteCode) Foreground::delete_<BytecodePattern>(byteCode); -#else - if (compiled) - jsRegExpFree(compiled); -#endif } static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { -#if ENABLE_YARR_JIT ErrorCode error = JSC::Yarr::checkSyntax(*source); if (error == JSC::Yarr::NoError) return true; reportYarrError(cx, tokenStream, error); return false; -#else -# error "Syntax checking not implemented for !ENABLE_YARR_JIT" -#endif } #if ENABLE_YARR_JIT static inline bool isJITRuntimeEnabled(JSContext *cx); +#endif static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); -#else - static void reportPCREError(JSContext *cx, int error); -#endif static size_t getOutputSize(size_t pairCount) { -#if ENABLE_YARR_JIT return pairCount * 2; -#else - return pairCount * 3; /* Should be x2, but PCRE has... needs. */ -#endif } bool compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags); RegExpRunStatus execute(JSContext *cx, const jschar *chars, size_t length, size_t start, int *output, size_t outputCount); diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h --- a/js/src/yarr/wtfbridge.h +++ b/js/src/yarr/wtfbridge.h @@ -44,19 +44,17 @@ * WTF compatibility layer. This file provides various type and data * definitions for use by Yarr. */ #include "jsstr.h" #include "jsprvtd.h" #include "vm/String.h" #include "assembler/wtf/Platform.h" -#if ENABLE_YARR_JIT #include "assembler/jit/ExecutableAllocator.h" -#endif namespace JSC { namespace Yarr { /* * Basic type definitions. */ typedef jschar UChar; ++++++ source-stamp.txt ++++++ REV=a294a5b4f12d REPO=http://hg.mozilla.org/releases/mozilla-release ++++++ toolkit-download-folder.patch ++++++ From: Wolfgang Rosenauer Subject: Don't use localized Downloads unless XDG is set up References: https://bugzilla.novell.com/show_bug.cgi?id=501724 diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js --- a/browser/components/preferences/main.js +++ b/browser/components/preferences/main.js @@ -344,7 +344,7 @@ var gMainPane = { // With 3.0, a new desktop folder - 'Downloads' was introduced for // platforms and versions that don't support a default system downloads // folder. See nsDownloadManager for details. - downloadFolder.label = bundlePreferences.getString("downloadsFolderName"); + downloadFolder.label = "Downloads"; iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1)); } else { // 'Desktop' diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -1269,8 +1269,10 @@ nsDownloadManager::GetDefaultDownloadsDi // XDG user dir spec, with a fallback to Home/Downloads nsXPIDLString folderName; - mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(), - getter_Copies(folderName)); + // We don't want localized "Downloads" unless XDG is used + //mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(), + // getter_Copies(folderName)); + folderName.AssignLiteral("Downloads"); #if defined (XP_MACOSX) rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR, ++++++ xulrunner-openSUSE-prefs.js ++++++ // openSUSE overrides for default settings pref("layout.word_select.stop_at_punctuation", false); pref("intl.locale.matchOS", true); ++++++ xulrunner-rpmlintrc ++++++ addFilter("no-jar-manifest") -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de