Hello community, here is the log from the commit of package seamonkey.1355 for openSUSE:12.2:Update checked in at 2013-02-22 13:34:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2:Update/seamonkey.1355 (Old) and /work/SRC/openSUSE:12.2:Update/.seamonkey.1355.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "seamonkey.1355", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2013-02-09 11:18:20.872010756 +0100 +++ /work/SRC/openSUSE:12.2:Update/.seamonkey.1355.new/seamonkey.changes 2013-02-22 13:34:37.000000000 +0100 @@ -0,0 +1,2737 @@ +------------------------------------------------------------------- +Mon Feb 18 07:41:44 UTC 2013 - wr@rosenauer.org + +- update to SeaMonkey 2.16 (bnc#804248) + * MFSA 2013-21/CVE-2013-0783/2013-0784 + Miscellaneous memory safety hazards + * MFSA 2013-22/CVE-2013-0772 (bmo#801366) + Out-of-bounds read in image rendering + * MFSA 2013-23/CVE-2013-0765 (bmo#830614) + Wrapped WebIDL objects can be wrapped again + * MFSA 2013-24/CVE-2013-0773 (bmo#809652) + Web content bypass of COW and SOW security wrappers + * MFSA 2013-25/CVE-2013-0774 (bmo#827193) + Privacy leak in JavaScript Workers + * MFSA 2013-26/CVE-2013-0775 (bmo#831095) + Use-after-free in nsImageLoadingContent + * MFSA 2013-27/CVE-2013-0776 (bmo#796475) + Phishing on HTTPS connection through malicious proxy + * MFSA 2013-28/CVE-2013-0780/CVE-2013-0782/CVE-2013-0777/ + CVE-2013-0778/CVE-2013-0779/CVE-2013-0781 + Use-after-free, out of bounds read, and buffer overflow issues + found using Address Sanitizer +- removed obsolete patches + * mozilla-webrtc.patch + * mozilla-gstreamer-803287.patch + +------------------------------------------------------------------- +Mon Feb 4 12:27:38 UTC 2013 - wr@rosenauer.org + +- update to SeaMonkey 2.15.2 + * Applications could not be removed from the "Application details" + dialog under Preferences, Helper Applications (bmo#826771). + * View / Message Body As could show menu items out of context + (bmo#831348) + +------------------------------------------------------------------- +Sun Jan 20 09:15:53 UTC 2013 - wr@rosenauer.org + +- update to SeaMonkey 2.15.1 + * backed out bmo#677092 (removed patch) + * fixed problems involving HTTP proxy transactions + +------------------------------------------------------------------- +Sun Jan 13 16:38:35 UTC 2013 - wr@rosenauer.org + +- backed out restartless language packs as it broke multi-locale + setup (bmo#677092, bmo#818468) + +------------------------------------------------------------------- +Tue Jan 8 18:32:43 UTC 2013 - wr@rosenauer.org + +- update to SeaMonkey 2.15 (bnc#796895) + * MFSA 2013-01/CVE-2013-0749/CVE-2013-0769/CVE-2013-0770 + Miscellaneous memory safety hazards + * MFSA 2013-02/CVE-2013-0760/CVE-2013-0762/CVE-2013-0766/CVE-2013-0767 + CVE-2013-0761/CVE-2013-0763/CVE-2013-0771/CVE-2012-5829 + Use-after-free and buffer overflow issues found using Address Sanitizer + * MFSA 2013-03/CVE-2013-0768 (bmo#815795) + Buffer Overflow in Canvas + * MFSA 2013-04/CVE-2012-0759 (bmo#802026) + URL spoofing in addressbar during page loads + * MFSA 2013-05/CVE-2013-0744 (bmo#814713) + Use-after-free when displaying table with many columns and column groups + * MFSA 2013-06/CVE-2013-0751 (bmo#790454) + Touch events are shared across iframes + * MFSA 2013-07/CVE-2013-0764 (bmo#804237) + Crash due to handling of SSL on threads + * MFSA 2013-08/CVE-2013-0745 (bmo#794158) + AutoWrapperChanger fails to keep objects alive during garbage collection + * MFSA 2013-09/CVE-2013-0746 (bmo#816842) + Compartment mismatch with quickstubs returned values + * MFSA 2013-10/CVE-2013-0747 (bmo#733305) + Event manipulation in plugin handler to bypass same-origin policy + * MFSA 2013-11/CVE-2013-0748 (bmo#806031) + Address space layout leaked in XBL objects + * MFSA 2013-12/CVE-2013-0750 (bmo#805121) + Buffer overflow in Javascript string concatenation + * MFSA 2013-13/CVE-2013-0752 (bmo#805024) + Memory corruption in XBL with XML bindings containing SVG + * MFSA 2013-14/CVE-2013-0757 (bmo#813901) + Chrome Object Wrapper (COW) bypass through changing prototype + * MFSA 2013-15/CVE-2013-0758 (bmo#813906) + Privilege escalation through plugin objects + * MFSA 2013-16/CVE-2013-0753 (bmo#814001) + Use-after-free in serializeToStream + * MFSA 2013-17/CVE-2013-0754 (bmo#814026) + Use-after-free in ListenerManager + * MFSA 2013-18/CVE-2013-0755 (bmo#814027) + Use-after-free in Vibrate + * MFSA 2013-19/CVE-2013-0756 (bmo#814029) + Use-after-free in Javascript Proxy objects +- requires NSS 3.14.1 (MFSA 2013-20, CVE-2013-0743) +- reenable WebRTC +- added mozilla-libproxy-compat.patch for libproxy API compat + on openSUSE 11.2 and earlier + +------------------------------------------------------------------- +Tue Dec 18 13:08:40 UTC 2012 - wr@rosenauer.org + +- update to SeaMonkey 2.14.1 + * fix regressions from 2.14 release + +------------------------------------------------------------------- +Tue Nov 20 20:44:06 UTC 2012 - wr@rosenauer.org + +- update to SeaMonkey 2.14 (bnc#790140) + * MFSA 2012-91/CVE-2012-5842/CVE-2012-5843 + Miscellaneous memory safety hazards + * MFSA 2012-92/CVE-2012-4202 (bmo#758200) + Buffer overflow while rendering GIF images + * MFSA 2012-93/CVE-2012-4201 (bmo#747607) + evalInSanbox location context incorrectly applied + * MFSA 2012-94/CVE-2012-5836 (bmo#792857) + Crash when combining SVG text on path with CSS + * MFSA 2012-96/CVE-2012-4204 (bmo#778603) + Memory corruption in str_unescape + * MFSA 2012-97/CVE-2012-4205 (bmo#779821) + XMLHttpRequest inherits incorrect principal within sandbox + * MFSA 2012-99/CVE-2012-4208 (bmo#798264) + XrayWrappers exposes chrome-only properties when not in chrome + compartment + * MFSA 2012-100/CVE-2012-5841 (bmo#805807) + Improper security filtering for cross-origin wrappers + * MFSA 2012-101/CVE-2012-4207 (bmo#801681) + Improper character decoding in HZ-GB-2312 charset + * MFSA 2012-103/CVE-2012-4209 (bmo#792405) + Frames can shadow top.location + * MFSA 2012-105/CVE-2012-4214/CVE-2012-4215/CVE-2012-4216/ + CVE-2012-5829/CVE-2012-5839/CVE-2012-5840/CVE-2012-4212/ + CVE-2012-4213/CVE-2012-4217/CVE-2012-4218 + Use-after-free and buffer overflow issues found using Address + Sanitizer + * MFSA 2012-106/CVE-2012-5830/CVE-2012-5833/CVE-2012-5835/CVE-2012-5838 + Use-after-free, buffer overflow, and memory corruption issues + found using Address Sanitizer +- rebased patches +- disabled WebRTC since build is broken (bmo#776877) + +------------------------------------------------------------------- +Sat Oct 27 08:59:58 UTC 2012 - wr@rosenauer.org + +- update to SeaMonkey 2.13.2 (bnc#786522) + * MFSA 2012-90/CVE-2012-4194/CVE-2012-4195/CVE-2012-4196 + (bmo#800666, bmo#793121, bmo#802557) + Fixes for Location object issues + +------------------------------------------------------------------- +Fri Oct 12 07:33:18 UTC 2012 - wr@rosenauer.org + +- update to SeaMonkey 2.13.1 (bnc#783533) + * MFSA 2012-88/CVE-2012-4191 (bmo#798045) + Miscellaneous memory safety hazards + * MFSA 2012-89/CVE-2012-4192/CVE-2012-4193 (bmo#799952, bmo#720619) + defaultValue security checks not applied + +------------------------------------------------------------------- +Mon Oct 8 20:32:50 UTC 2012 - wr@rosenauer.org + +- update to SeaMonkey 2.13 (bnc#783533) + * MFSA 2012-74/CVE-2012-3982/CVE-2012-3983 + Miscellaneous memory safety hazards + * MFSA 2012-75/CVE-2012-3984 (bmo#575294) + select element persistance allows for attacks + * MFSA 2012-76/CVE-2012-3985 (bmo#655649) + Continued access to initial origin after setting document.domain + * MFSA 2012-77/CVE-2012-3986 (bmo#775868) + Some DOMWindowUtils methods bypass security checks + * MFSA 2012-79/CVE-2012-3988 (bmo#725770) + DOS and crash with full screen and history navigation + * MFSA 2012-80/CVE-2012-3989 (bmo#783867) + Crash with invalid cast when using instanceof operator + * MFSA 2012-81/CVE-2012-3991 (bmo#783260) + GetProperty function can bypass security checks + * MFSA 2012-82/CVE-2012-3994 (bmo#765527) + top object and location property accessible by plugins + * MFSA 2012-83/CVE-2012-3993/CVE-2012-4184 (bmo#768101, bmo#780370) + Chrome Object Wrapper (COW) does not disallow acces to privileged + functions or properties + * MFSA 2012-84/CVE-2012-3992 (bmo#775009) + Spoofing and script injection through location.hash + * MFSA 2012-85/CVE-2012-3995/CVE-2012-4179/CVE-2012-4180/ + CVE-2012-4181/CVE-2012-4182/CVE-2012-4183 + Use-after-free, buffer overflow, and out of bounds read issues + found using Address Sanitizer + * MFSA 2012-86/CVE-2012-4185/CVE-2012-4186/CVE-2012-4187/ + CVE-2012-4188 + Heap memory corruption issues found using Address Sanitizer + * MFSA 2012-87/CVE-2012-3990 (bmo#787704) + Use-after-free in the IME State Manager +- requires NSPR 4.9.2 +- improve GStreamer integration (bmo#760140) + +------------------------------------------------------------------- +Mon Sep 10 20:18:35 UTC 2012 - wr@rosenauer.org + +- update to SeaMonkey 2.12.1 (bnc#779936) + * Sites visited while in Private Browsing mode could be found ++++ 2540 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.2:Update/.seamonkey.1355.new/seamonkey.changes New: ---- _constraints add-plugins.sh.in compare-locales.tar.bz2 create-tar.sh find-external-requires.sh l10n-2.16.tar.bz2 mozilla-gstreamer-760140.patch mozilla-language.patch mozilla-libproxy-compat.patch mozilla-nongnome-proxies.patch mozilla-ntlm-full-path.patch mozilla-ppc.patch mozilla-prefer_plugin_pref.patch mozilla-shared-nss-db.patch mozilla-sle11.patch mozilla-ua-locale.patch mozilla-webrtc-ppc.patch mozilla.sh.in seamonkey-2.16-source.tar.bz2 seamonkey-desktop.tar.bz2 seamonkey-rpmlintrc seamonkey-shared-nss-db.patch seamonkey-ua-locale.patch seamonkey.changes seamonkey.spec search-addons.tar.bz2 suse-default-prefs.js ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ seamonkey.spec ++++++ # # spec file for package seamonkey # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # 2006-2013 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: seamonkey BuildRequires: Mesa-devel BuildRequires: autoconf213 BuildRequires: dbus-1-glib-devel BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: hunspell-devel BuildRequires: libgnomeui-devel BuildRequires: libidl-devel BuildRequires: libnotify-devel BuildRequires: nss-shared-helper-devel BuildRequires: python BuildRequires: startup-notification-devel BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: xorg-x11-libXt-devel BuildRequires: yasm BuildRequires: zip %if %suse_version > 1110 BuildRequires: libiw-devel BuildRequires: libproxy-devel %else BuildRequires: wireless-tools %endif %if %suse_version > 1140 BuildRequires: pkgconfig(gstreamer-0.10) BuildRequires: pkgconfig(gstreamer-app-0.10) BuildRequires: pkgconfig(gstreamer-plugins-base-0.10) %endif Provides: web_browser Provides: browser(npapi) Version: 2.16 Release: 0 %define releasedate 2013021700 Summary: The successor of the Mozilla Application Suite License: MPL-2.0 Group: Productivity/Networking/Web/Browsers Url: http://www.mozilla.org/projects/seamonkey Source: seamonkey-%{version}-source.tar.bz2 Source1: seamonkey-desktop.tar.bz2 Source2: add-plugins.sh.in Source3: mozilla.sh.in Source4: suse-default-prefs.js Source5: l10n-%{version}.tar.bz2 Source6: search-addons.tar.bz2 Source7: seamonkey-rpmlintrc Source8: find-external-requires.sh Source9: create-tar.sh Source10: compare-locales.tar.bz2 Patch1: mozilla-nongnome-proxies.patch Patch2: mozilla-prefer_plugin_pref.patch Patch3: mozilla-shared-nss-db.patch Patch4: mozilla-sle11.patch Patch5: mozilla-language.patch Patch7: mozilla-ntlm-full-path.patch Patch8: mozilla-ua-locale.patch Patch9: mozilla-ppc.patch Patch10: mozilla-gstreamer-760140.patch Patch11: mozilla-webrtc-ppc.patch Patch12: mozilla-libproxy-compat.patch Patch20: seamonkey-ua-locale.patch Patch21: seamonkey-shared-nss-db.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: /bin/sh coreutils Provides: seamonkey-mail = %{version} Obsoletes: seamonkey-mail <= 2.0 Provides: seamonkey-spellchecker = %{version} Obsoletes: seamonkey-spellchecker <= 2.0 %define progname %{name} %define prefix /usr %define progdir %_libdir/%{progname} %define libgssapi libgssapi_krb5.so.2 ### build options %define has_system_cairo 0 %define localize 1 ### build options end %define _use_internal_dependency_generator 0 %define __find_requires sh %{SOURCE8} %global provfind sh -c "grep -v '.so' | %__find_provides" %global __find_provides %provfind # the following conditions are always met in Factory by definition # so using %opensuse_bs is secure for now BuildRequires: mozilla-nspr-devel PreReq: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) BuildRequires: mozilla-nss-devel >= 3.14.1 PreReq: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) %description Originally based on the Netscape Communicator source, the SeaMonkey project grew to be the most advanced web browser currently available. It supports new techniques like CSS2, MathML, SVG, XML, transparent PNGs, and its look is fully theme-able. %package irc Summary: IRC for SeaMonkey Group: Productivity/Networking/IRC PreReq: %{name} = %{version} %description irc An IRC Client (Chatzilla) for SeaMonkey. %package venkman Summary: The SeaMonkey JavaScript Debugger Group: Development/Tools/Debuggers PreReq: %{name} = %{version} %description venkman A javascript debugger for the SeaMonkey web browser. %package dom-inspector Summary: The SeaMonkey DOM Inspector Group: Development/Tools/Navigators PreReq: %{name} = %{version} %description dom-inspector This is a tool that allows you to inspect the DOM for web pages in SeaMonkey. This is of great use to people who are doing SeaMonkey chrome development or web page development. %if %localize %package translations-common Summary: Common translations for SeaMonkey Group: System/Localization Provides: locale(%{name}:ca;cs;de;en_GB;es_AR;es_ES;fi;fr;hu;it;ja;nb_NO;nl;pl;pt_PT;ru;sv_SE;zh_CN) PreReq: %{name} = %{version} %description translations-common This package contains several optional languages for the user interface of SeaMonkey. %package translations-other Summary: Extra translations for SeaMonkey Group: System/Localization Provides: locale(%{name}:be;gl;lt;sk;tr;uk) PreReq: %{name} = %{version} %description translations-other This package contains several optional languages for the user interface of SeaMonkey. %endif %prep %setup -n seamonkey -b 1 -b 5 -b 10 -q # mozilla patches pushd mozilla %patch1 -p1 %patch2 -p1 %patch3 -p1 %if %suse_version < 1120 %patch4 -p1 %endif %patch5 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 popd # comm patches %patch20 -p1 %patch21 -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" {} + # export SUSE_ASNEEDED=0 export MOZ_BUILD_DATE=%{releasedate} export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" export CXXFLAGS="$CFLAGS" export MOZCONFIG=$RPM_BUILD_DIR/mozconfig # 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 ac_add_options --enable-application=suite ac_add_options --libdir=%{progdir} ac_add_options --prefix=%{prefix} ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n ac_add_options --disable-tests ac_add_options --enable-optimize ac_add_options --disable-debug --disable-dtd-debug ac_add_options --enable-libxul ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-zlib #ac_add_options --with-system-jpeg # ac_add_options--with-system-png # no apng support ac_add_options --enable-ldap-experimental ac_add_options --disable-installer ac_add_options --disable-mochitest ac_add_options --disable-crashreporter ac_add_options --disable-updater ac_add_options --enable-startup-notification ac_add_options --enable-system-hunspell #ac_add_options --enable-system-mozldap EOF %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 %suse_version > 1140 cat << EOF >> $MOZCONFIG ac_add_options --enable-gstreamer EOF %endif make -f client.mk build # %install cd ../obj make -C suite/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 # copy tree into RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{progdir} cp -rf $RPM_BUILD_DIR/obj/mozilla/dist/seamonkey/* $RPM_BUILD_ROOT%{progdir} # remove some executable permissions find $RPM_BUILD_ROOT%{progdir} \ -name "*.js" -o \ -name "*.jsm" -o \ -name "*.rdf" -o \ -name "*.properties" -o \ -name "*.dtd" -o \ -name "*.txt" -o \ -name "*.xml" -o \ -name "*.css" | xargs chmod a-x # remove mkdir.done files from installed base find $RPM_BUILD_ROOT%{progdir} -name ".mkdir.done" | xargs rm %if %localize rm -f %{_tmppath}/translations.* touch %{_tmppath}/translations.{common,other} for locale in $(awk '{ print $1; }' ../seamonkey/suite/locales/shipped-locales); do case $locale in ja-JP-mac|en-US|gl) ;; *) pushd $RPM_BUILD_DIR/compare-locales PYTHONPATH=lib \ scripts/compare-locales -m ../l10n-merged/$locale \ ../seamonkey/suite/locales/l10n-moz2.0.ini ../l10n $locale popd LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ make -C suite/locales langpack-$locale || continue cp -rL mozilla/dist/xpi-stage/locale-$locale \ $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@seamonkey.mozilla.org rm $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@seamonkey.mozilla.org/chrome/.mkdir.done # remove prefs and profile defaults from langpack rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@seamonkey.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 %{progdir}/extensions/langpack-$locale@seamonkey.mozilla.org \ >> %{_tmppath}/translations.$_l10ntarget esac done %endif # overwrite the mozilla start-script and link it to /usr/bin mkdir --parents $RPM_BUILD_ROOT%{_bindir} sed "s:%%PREFIX:%{prefix}:g s:%%PROGDIR:%{progdir}:g s:%%APPNAME:seamonkey:g" \ %{SOURCE3} > $RPM_BUILD_ROOT%{progdir}/%{progname}.sh chmod 755 $RPM_BUILD_ROOT%{progdir}/%{progname}.sh ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT%{_bindir}/%{progname} # apply SUSE defaults sed -e 's,RPM_VERSION,%{version}-%{release},g #s,GSSAPI,%{libgssapi},g' \ %{SOURCE4} > suse-default-prefs cp suse-default-prefs $RPM_BUILD_ROOT%{progdir}/defaults/pref/all-openSUSE.js rm suse-default-prefs # Desktop definition mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications install -m 644 $RPM_BUILD_DIR/*.desktop \ $RPM_BUILD_ROOT%{_datadir}/applications mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/ install -m 644 $RPM_BUILD_DIR/*.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/ # install add-plugins.sh sed "s:%%PROGDIR:%{progdir}:g s:%%APPNAME:%{progname}:g" \ %{SOURCE2} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh # %suse_update_desktop_file seamonkey Network WebBrowser GTK %suse_update_desktop_file seamonkey-mail Network Email GTK %suse_update_desktop_file seamonkey-composer Network WebDevelopment GTK # excludes rm -f $RPM_BUILD_ROOT%{progdir}/license.txt rm -f $RPM_BUILD_ROOT%{progdir}/README rm -f $RPM_BUILD_ROOT%{progdir}/removed-files rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh rm -f $RPM_BUILD_ROOT%{progdir}/seamonkey rm -f $RPM_BUILD_ROOT%{progdir}/precomplete rm -f $RPM_BUILD_ROOT%{progdir}/updater rm -f $RPM_BUILD_ROOT%{progdir}/updater.ini rm -f $RPM_BUILD_ROOT%{progdir}/update.locale rm -f $RPM_BUILD_ROOT%{progdir}/update-settings.ini rm -f $RPM_BUILD_ROOT%{progdir}/icons/updater.png rm -f $RPM_BUILD_ROOT%{progdir}/dictionaries/* # Some sites use different partitions for /usr/(lib|lib64) and /usr/share. Since you # can't create hardlinks across partitions, we'll do this more than once. %fdupes $RPM_BUILD_ROOT%{progdir} %fdupes $RPM_BUILD_ROOT%{_datadir} %clean rm -rf $RPM_BUILD_ROOT rm -rf %{_tmppath}/translations.* %post %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %preun rm -f %{progdir}/dictionaries/* exit 0 %triggerin -- myspell-dictionary %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %triggerpostun -- myspell-dictionary %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %files %defattr(-,root,root) %{_bindir}/%{progname} %dir %{progdir} %{progdir}/components/ %{progdir}/defaults/ %dir %{progdir}/dictionaries/ %dir %{progdir}/extensions/ %dir %{progdir}/chrome/ %dir %{progdir}/distribution/ %dir %{progdir}/distribution/extensions/ #%exclude %{progdir}/distribution/extensions/debugQA@mozilla.org.xpi %{progdir}/chrome/icons %{progdir}/extensions/modern@themes.mozilla.org.xpi %{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi %{progdir}/isp/ %{progdir}/searchplugins/ %{progdir}/add-plugins.sh %{progdir}/application.ini %{progdir}/blocklist.xml %{progdir}/chrome.manifest %{progdir}/dependentlibs.list %{progdir}/*.so %{progdir}/mozilla-xremote-client %{progdir}/omni.ja %{progdir}/platform.ini %{progdir}/plugin-container %{progdir}/%{progname}.sh %{progdir}/seamonkey-bin %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/*.png %files irc %defattr(-,root,root) %{progdir}/distribution/extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi %files venkman %defattr(-,root,root) %{progdir}/distribution/extensions/{f13b157f-b174-47e7-a34d-4815ddfdfeb8}.xpi %files dom-inspector %defattr(-,root,root) %{progdir}/distribution/extensions/inspector*.xpi %if %localize %files translations-common -f %{_tmppath}/translations.common %defattr(-,root,root) %files translations-other -f %{_tmppath}/translations.other %defattr(-,root,root) %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 ++++++ create-tar.sh ++++++ #!/bin/bash CHANNEL="release" BRANCH="releases/comm-$CHANNEL" RELEASE_TAG="SEAMONKEY_2_16_RELEASE" VERSION="2.16" echo "cloning $BRANCH..." hg clone http://hg.mozilla.org/$BRANCH seamonkey pushd seamonkey hg update -r $RELEASE_TAG echo "running client.py..." [ "$RELEASE_TAG" == "default" ] || \ _extra="--comm-rev=$RELEASE_TAG --mozilla-rev=$RELEASE_TAG --inspector-rev=$RELEASE_TAG --venkman-rev=$RELEASE_TAG --chatzilla-rev=$RELEASE_TAG" python client.py checkout $_extra --mozilla-repo=http://hg.mozilla.org/releases/mozilla-$CHANNEL popd echo "creating archive..." tar cjf seamonkey-$VERSION-source.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS seamonkey # l10n echo "fetching locales..." if [ -e shipped-locales ]; then SHIPPED_LOCALES=shipped-locales else SHIPPED_LOCALES=seamonkey/suite/locales/shipped-locales fi test ! -d l10n && mkdir l10n for locale in $(awk '{ print $1; }' $SHIPPED_LOCALES); do case $locale in ja-JP-mac|en-US) ;; *) hg clone http://hg.mozilla.org/releases/l10n/mozilla-$CHANNEL/$locale l10n/$locale hg -R l10n/$locale up -C $RELEASE_TAG ;; esac done echo "creating l10n archive..." tar cjf l10n-$VERSION.tar.bz2 \ --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=calendar \ --exclude=mail \ 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 ++++++ mozilla-gstreamer-760140.patch ++++++ From: Alessandro Decina <alessandro.d@gmail.com> Bug 760140 - Query the GstRegistry for the required demuxers/decoders from canPlayType diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -143,16 +143,19 @@ #include "xpcprivate.h" // nsXPConnect #include "nsScriptSecurityManager.h" #include "nsIChannelPolicy.h" #include "nsChannelPolicy.h" #include "nsIContentSecurityPolicy.h" #include "nsContentDLF.h" #ifdef MOZ_MEDIA #include "nsHTMLMediaElement.h" +#ifdef MOZ_GSTREAMER +#include "GStreamerDecoder.h" +#endif #endif #include "nsDOMTouchEvent.h" #include "nsIContentViewer.h" #include "nsIObjectLoadingContent.h" #include "nsCCUncollectableMarker.h" #include "mozilla/Base64.h" #include "mozilla/Preferences.h" #include "nsDOMMutationObserver.h" diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h --- a/content/html/content/public/nsHTMLMediaElement.h +++ b/content/html/content/public/nsHTMLMediaElement.h @@ -259,17 +259,19 @@ public: void UpdateMediaSize(nsIntSize size); // Returns the CanPlayStatus indicating if we can handle this // MIME type. The MIME type should not include the codecs parameter. // If it returns anything other than CANPLAY_NO then it also // returns a null-terminated list of supported codecs // in *aSupportedCodecs. This list should not be freed, it is static data. static CanPlayStatus CanHandleMediaType(const char* aMIMEType, - char const *const ** aSupportedCodecs); + const char* aCodecs, + char const *const ** aSupportedCodecs, + bool* aCheckSupportedCodecs); // Returns the CanPlayStatus indicating if we can handle the // full MIME type including the optional codecs parameter. static CanPlayStatus GetCanPlay(const nsAString& aType); // Returns true if we should handle this MIME type when it appears // as an <object> or as a toplevel page. If, in practice, our support // for the type is more limited than appears in the wild, we should return @@ -292,18 +294,16 @@ public: #ifdef MOZ_WEBM static bool IsWebMType(const nsACString& aType); static const char gWebMTypes[2][11]; static char const *const gWebMCodecs[4]; #endif #ifdef MOZ_GSTREAMER static bool IsGStreamerSupportedType(const nsACString& aType); - static bool IsH264Type(const nsACString& aType); - static const char gH264Types[3][16]; #endif #ifdef MOZ_WIDGET_GONK static bool IsOmxSupportedType(const nsACString& aType); static const char gOmxTypes[5][16]; #endif #if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK) diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp --- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -2213,50 +2213,29 @@ nsHTMLMediaElement::IsWebMType(const nsA return true; } } return false; } #endif -#if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK) +#ifdef MOZ_WIDGET_GONK char const *const nsHTMLMediaElement::gH264Codecs[9] = { "avc1.42E01E", // H.264 Constrained Baseline Profile Level 3.0 "avc1.42001E", // H.264 Baseline Profile Level 3.0 "avc1.58A01E", // H.264 Extended Profile Level 3.0 "avc1.4D401E", // H.264 Main Profile Level 3.0 "avc1.64001E", // H.264 High Profile Level 3.0 "avc1.64001F", // H.264 High Profile Level 3.1 "mp4v.20.3", // 3GPP "mp4a.40.2", // AAC-LC nullptr }; -#endif - -#ifdef MOZ_GSTREAMER -const char nsHTMLMediaElement::gH264Types[3][16] = { - "video/mp4", - "video/3gpp", - "video/quicktime", -}; - -bool -nsHTMLMediaElement::IsH264Type(const nsACString& aType) -{ - for (uint32_t i = 0; i < ArrayLength(gH264Types); ++i) { - if (aType.EqualsASCII(gH264Types[i])) { - return true; - } - } - return false; -} -#endif - -#ifdef MOZ_WIDGET_GONK + const char nsHTMLMediaElement::gOmxTypes[5][16] = { "audio/mpeg", "audio/mp4", "video/mp4", "video/3gpp", "video/quicktime", }; @@ -2319,18 +2298,22 @@ nsHTMLMediaElement::IsDASHMPDType(const return false; } #endif /* static */ nsHTMLMediaElement::CanPlayStatus nsHTMLMediaElement::CanHandleMediaType(const char* aMIMEType, - char const *const ** aCodecList) + const char *aCodecs, + char const *const ** aCodecList, + bool* aCheckCodecList) { + if (aCheckCodecList) + *aCheckCodecList = true; #ifdef MOZ_RAW if (IsRawType(nsDependentCString(aMIMEType))) { *aCodecList = gRawCodecs; return CANPLAY_MAYBE; } #endif #ifdef MOZ_OGG if (IsOggType(nsDependentCString(aMIMEType))) { @@ -2354,20 +2337,22 @@ nsHTMLMediaElement::CanHandleMediaType(c if (IsDASHMPDType(nsDependentCString(aMIMEType))) { // DASH manifest uses WebM codecs only. *aCodecList = gWebMCodecs; return CANPLAY_YES; } #endif #ifdef MOZ_GSTREAMER - if (IsH264Type(nsDependentCString(aMIMEType))) { - *aCodecList = gH264Codecs; - return CANPLAY_MAYBE; - } + if (aCheckCodecList) + *aCheckCodecList = false; + if (aCodecList) + *aCodecList = nullptr; + if (GStreamerDecoder::CanHandleMediaType(aMIMEType, aCodecs)) + return CANPLAY_YES; #endif #ifdef MOZ_WIDGET_GONK if (IsOmxSupportedType(nsDependentCString(aMIMEType))) { *aCodecList = gH264Codecs; return CANPLAY_MAYBE; } #endif #ifdef MOZ_MEDIA_PLUGINS @@ -2388,17 +2373,17 @@ bool nsHTMLMediaElement::ShouldHandleMed if (IsOggType(nsDependentCString(aMIMEType))) return true; #endif #ifdef MOZ_WEBM if (IsWebMType(nsDependentCString(aMIMEType))) return true; #endif #ifdef MOZ_GSTREAMER - if (IsH264Type(nsDependentCString(aMIMEType))) + if (GStreamerDecoder::CanHandleMediaType(aMIMEType, nullptr)) return true; #endif #ifdef MOZ_WIDGET_GONK if (IsOmxSupportedType(nsDependentCString(aMIMEType))) { return true; } #endif #ifdef MOZ_MEDIA_PLUGINS @@ -2429,26 +2414,31 @@ nsHTMLMediaElement::GetCanPlay(const nsA { nsContentTypeParser parser(aType); nsAutoString mimeType; nsresult rv = parser.GetType(mimeType); if (NS_FAILED(rv)) return CANPLAY_NO; NS_ConvertUTF16toUTF8 mimeTypeUTF8(mimeType); + nsAutoString codecs; + rv = parser.GetParameter("codecs", codecs); + NS_ConvertUTF16toUTF8 codecsUTF8(codecs); char const *const * supportedCodecs; + bool checkSupportedCodecs = true; CanPlayStatus status = CanHandleMediaType(mimeTypeUTF8.get(), - &supportedCodecs); + codecsUTF8.get(), + &supportedCodecs, + &checkSupportedCodecs); if (status == CANPLAY_NO) return CANPLAY_NO; - nsAutoString codecs; - rv = parser.GetParameter("codecs", codecs); - if (NS_FAILED(rv)) { - // Parameter not found or whatever + if (codecs.IsEmpty() || !checkSupportedCodecs) { + /* no codecs to check for or they were already checked in CanHandleMediaType + * above */ return status; } CanPlayStatus result = CANPLAY_YES; // See http://www.rfc-editor.org/rfc/rfc4281.txt for the description // of the 'codecs' parameter nsCharSeparatedTokenizer tokenizer(codecs, ','); bool expectMoreTokens = false; @@ -2487,43 +2477,39 @@ nsHTMLMediaElement::CanPlayType(const ns } #ifdef MOZ_GSTREAMER bool nsHTMLMediaElement::IsGStreamerSupportedType(const nsACString& aMimeType) { if (!MediaDecoder::IsGStreamerEnabled()) return false; - if (IsH264Type(aMimeType)) + + const char *type; + NS_CStringGetData(aMimeType, &type, nullptr); + if (GStreamerDecoder::CanHandleMediaType(type, nullptr)) return true; - if (!Preferences::GetBool("media.prefer-gstreamer", false)) - return false; -#ifdef MOZ_WEBM - if (IsWebMType(aMimeType)) - return true; -#endif -#ifdef MOZ_OGG - if (IsOggType(aMimeType)) - return true; -#endif + return false; } #endif already_AddRefed<MediaDecoder> nsHTMLMediaElement::CreateDecoder(const nsACString& aType) { #ifdef MOZ_GSTREAMER // When enabled, use GStreamer for H.264, but not for codecs handled by our // bundled decoders, unless the "media.prefer-gstreamer" pref is set. - if (IsGStreamerSupportedType(aType)) { - nsRefPtr<GStreamerDecoder> decoder = new GStreamerDecoder(); - if (decoder->Init(this)) { - return decoder.forget(); + if (!Preferences::GetBool("media.prefer-gstreamer", false)) { + if (IsGStreamerSupportedType(aType)) { + nsRefPtr<GStreamerDecoder> decoder = new GStreamerDecoder(); + if (decoder->Init(this)) { + return decoder.forget(); + } } } #endif #ifdef MOZ_RAW if (IsRawType(aType)) { nsRefPtr<RawDecoder> decoder = new RawDecoder(); if (decoder->Init(this)) { @@ -2576,16 +2562,26 @@ nsHTMLMediaElement::CreateDecoder(const if (IsDASHMPDType(aType)) { nsRefPtr<DASHDecoder> decoder = new DASHDecoder(); if (decoder->Init(this)) { return decoder.forget(); } } #endif +#ifdef MOZ_GSTREAMER + // use GStreamer as fallback if not preferred + if (IsGStreamerSupportedType(aType)) { + nsRefPtr<GStreamerDecoder> decoder = new GStreamerDecoder(); + if (decoder->Init(this)) { + return decoder.forget(); + } + } +#endif + return nullptr; } nsresult nsHTMLMediaElement::InitializeDecoderAsClone(MediaDecoder* aOriginal) { NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set"); NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder"); diff --git a/content/media/gstreamer/GStreamerDecoder.cpp b/content/media/gstreamer/GStreamerDecoder.cpp --- a/content/media/gstreamer/GStreamerDecoder.cpp +++ b/content/media/gstreamer/GStreamerDecoder.cpp @@ -2,18 +2,23 @@ /* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "MediaDecoderStateMachine.h" #include "GStreamerReader.h" #include "GStreamerDecoder.h" +#include "nsGStreamerFormatHelper.h" namespace mozilla { MediaDecoderStateMachine* GStreamerDecoder::CreateStateMachine() { return new MediaDecoderStateMachine(this, new GStreamerReader(this)); } +bool GStreamerDecoder::CanHandleMediaType(const char* aMIMEType, + const char* aCodecs) { + return GStreamerFormatHelper::Instance()->CanHandleMediaType(aMIMEType, aCodecs); +} } // namespace mozilla diff --git a/content/media/gstreamer/GStreamerDecoder.h b/content/media/gstreamer/GStreamerDecoder.h --- a/content/media/gstreamer/GStreamerDecoder.h +++ b/content/media/gstreamer/GStreamerDecoder.h @@ -11,13 +11,14 @@ namespace mozilla { class GStreamerDecoder : public MediaDecoder { public: virtual MediaDecoder* Clone() { return new GStreamerDecoder(); } virtual MediaDecoderStateMachine* CreateStateMachine(); + static bool CanHandleMediaType(const char* aMIMEType, const char* aCodecs); }; } // namespace mozilla #endif diff --git a/content/media/gstreamer/Makefile.in b/content/media/gstreamer/Makefile.in --- a/content/media/gstreamer/Makefile.in +++ b/content/media/gstreamer/Makefile.in @@ -17,16 +17,17 @@ LIBXUL_LIBRARY = 1 EXPORTS += \ GStreamerDecoder.h \ $(NULL) CPPSRCS = \ GStreamerReader.cpp \ GStreamerDecoder.cpp \ + nsGStreamerFormatHelper.cpp \ $(NULL) FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk CFLAGS += $(GSTREAMER_CFLAGS) CXXFLAGS += $(GSTREAMER_CFLAGS) diff --git a/content/media/gstreamer/nsGStreamerFormatHelper.cpp b/content/media/gstreamer/nsGStreamerFormatHelper.cpp new file mode 100644 --- /dev/null +++ b/content/media/gstreamer/nsGStreamerFormatHelper.cpp @@ -0,0 +1,149 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsGStreamerFormatHelper.h" +#include "nsCharSeparatedTokenizer.h" +#include "nsXPCOMStrings.h" + +#define ENTRY_FORMAT(entry) entry[0] +#define ENTRY_CAPS(entry) entry[1] + +GStreamerFormatHelper* GStreamerFormatHelper::gInstance = nullptr; + +GStreamerFormatHelper *GStreamerFormatHelper::Instance() { + if (!gInstance) { + gst_init(nullptr, nullptr); + gInstance = new GStreamerFormatHelper(); + } + + return gInstance; +} + +GStreamerFormatHelper::GStreamerFormatHelper() + : mFactories(nullptr), + mCookie(0) +{ + const char *containers[3][2] = { + {"video/mp4", "video/quicktime"}, + {"audio/mp4", "audio/mpeg, mpegversion=(int)4"}, + {"audio/mpeg", "audio/mpeg, mpegversion=(int)1"}, + }; + memcpy(mContainers, containers, sizeof(containers)); + + const char *codecs[7][2] = { + {"avc1.42E01E", "video/x-h264"}, + {"avc1.42001E", "video/x-h264"}, + {"avc1.58A01E", "video/x-h264"}, + {"avc1.4D401E", "video/x-h264"}, + {"avc1.64001E", "video/x-h264"}, + {"mp4a.40.2", "audio/mpeg, mpegversion=(int)4"}, + {"mp3", "audio/mpeg, mpegversion=(int)1"}, + }; + memcpy(mCodecs, codecs, sizeof(codecs)); +} + +GStreamerFormatHelper::~GStreamerFormatHelper() { + if (mFactories) + g_list_free(mFactories); +} + +bool GStreamerFormatHelper::CanHandleMediaType(const char* aMIMEType, + const char *aCodecs) { + GstCaps *caps = ConvertFormatsToCaps(aMIMEType, aCodecs); + if (!caps) { + return false; + } + + bool ret = HaveElementsToProcessCaps(caps); + gst_caps_unref(caps); + + return ret; +} + +GstCaps *GStreamerFormatHelper::ConvertFormatsToCaps(const char *aMIMEType, + const char *aCodecs) { + unsigned int i; + + /* convert aMIMEType to gst container caps */ + const char *capsString = nullptr; + for (i = 0; i < G_N_ELEMENTS(mContainers); i++) { + if (!strcmp(ENTRY_FORMAT(mContainers[i]), aMIMEType)) { + capsString = ENTRY_CAPS(mContainers[i]); + break; + } + } + + if (!capsString) { + /* we couldn't find any matching caps */ + return nullptr; + } + + GstCaps *caps = gst_caps_from_string(capsString); + /* container only */ + if (!aCodecs) { + return caps; + } + + nsDependentCSubstring codecs(aCodecs, strlen(aCodecs)); + nsCCharSeparatedTokenizer tokenizer(codecs, ','); + while (tokenizer.hasMoreTokens()) { + const nsCSubstring& codec = tokenizer.nextToken(); + capsString = nullptr; + + for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) { + if (codec.Equals(ENTRY_FORMAT(mCodecs[i]))) { + capsString = ENTRY_CAPS(mCodecs[i]); + break; + } + } + + if (!capsString) { + gst_caps_unref(caps); + return nullptr; + } + + GstCaps *tmp = gst_caps_from_string(capsString); + /* appends and frees tmp */ + gst_caps_append(caps, tmp); + } + + return caps; +} + +bool GStreamerFormatHelper::HaveElementsToProcessCaps(GstCaps *aCaps) { + + GList *factories = GetFactories(); + + GList *list; + /* here aCaps contains [containerCaps, [codecCaps1, [codecCaps2, ...]]] so process + * caps structures individually as we want one element for _each_ + * structure */ + for (unsigned int i = 0; i < gst_caps_get_size(aCaps); i++) { + GstStructure *s = gst_caps_get_structure(aCaps, i); + GstCaps *caps = gst_caps_new_full(gst_structure_copy(s), nullptr); + list = gst_element_factory_list_filter (factories, caps, GST_PAD_SINK, FALSE); + gst_caps_unref(caps); + if (!list) { + return false; + } + g_list_free(list); + } + + return true; +} + +GList * GStreamerFormatHelper::GetFactories() { + uint32_t cookie = gst_default_registry_get_feature_list_cookie (); + if (cookie != mCookie) { + g_list_free(mFactories); + mFactories = gst_element_factory_list_get_elements + (GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DECODER, + GST_RANK_MARGINAL); + mCookie = cookie; + } + + return mFactories; +} diff --git a/content/media/gstreamer/nsGStreamerFormatHelper.h b/content/media/gstreamer/nsGStreamerFormatHelper.h new file mode 100644 --- /dev/null +++ b/content/media/gstreamer/nsGStreamerFormatHelper.h @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#if !defined(nsGStreamerFormatHelper_h_) +#define nsGStreamerFormatHelper_h_ + +#include <gst/gst.h> +#include <mozilla/Types.h> + +class GStreamerFormatHelper { + public: + static GStreamerFormatHelper *Instance(); + ~GStreamerFormatHelper(); + + bool CanHandleMediaType(const char *aMIMEType, + const char *aCodecs); + + private: + GStreamerFormatHelper(); + GstCaps *ConvertFormatsToCaps(const char *aMIMEType, + const char *aCodecs); + char * const *CodecListFromCaps(GstCaps *aCaps); + bool HaveElementsToProcessCaps(GstCaps *aCaps); + GList *GetFactories(); + + static GStreamerFormatHelper *gInstance; + + const char *mContainers[3][2]; + const char *mCodecs[7][2]; + GList *mFactories; + uint32_t mCookie; +}; + +#endif ++++++ mozilla-language.patch ++++++ # HG changeset patch # User Wolfgang Rosenauer <wr@rosenauer.org> # Parent 97c6ae4c21e703a18e04f4d9fae9e2f06aeb13df 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 @@ -127,16 +127,17 @@ nsLocaleService::nsLocaleService(void) nsRefPtr<nsLocale> resultLocale(new nsLocale()); NS_ENSURE_TRUE_VOID(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; @@ -155,16 +156,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-libproxy-compat.patch ++++++ # HG changeset patch # Parent 99164862ccce7947259465dcf9edbf6375d56413 # User Wolfgang Rosenauer <wr@rosenauer.org> No bug - libproxy API change picked up in bmo#769764 but fails in openSUSE 11.2 and earlier. Still cast to char* to make "all" happy Note: Remove that patch when openSUSE 11.2 runs out of any support! diff --git a/toolkit/system/unixproxy/nsLibProxySettings.cpp b/toolkit/system/unixproxy/nsLibProxySettings.cpp --- a/toolkit/system/unixproxy/nsLibProxySettings.cpp +++ b/toolkit/system/unixproxy/nsLibProxySettings.cpp @@ -67,17 +67,17 @@ nsUnixSystemProxySettings::GetProxyForUR if (!mProxyFactory) { mProxyFactory = px_proxy_factory_new(); } NS_ENSURE_TRUE(mProxyFactory, NS_ERROR_NOT_AVAILABLE); char **proxyArray = nullptr; proxyArray = px_proxy_factory_get_proxies(mProxyFactory, - PromiseFlatCString(aSpec).get()); + (char *) (PromiseFlatCString(aSpec).get())); NS_ENSURE_TRUE(proxyArray, NS_ERROR_NOT_AVAILABLE); // Translate libproxy's output to PAC string as expected // libproxy returns an array of proxies in the format: // <procotol>://[username:password@]proxy:port // or // direct:// // ++++++ 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 @@ -50,22 +50,28 @@ nsUnixSystemProxySettings::GetMainThread // dbus prevents us from being threadsafe, but this routine should not block anyhow *aMainThreadOnly = true; return NS_OK; } nsresult nsUnixSystemProxySettings::Init() { - mSchemeProxySettings.Init(5); - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); - if (mGSettings) { - mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), - getter_AddRefs(mProxySettings)); + // 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")) { + mSchemeProxySettings.Init(5); + mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + if (mGSettings) { + mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), + getter_AddRefs(mProxySettings)); + } } return NS_OK; } bool nsUnixSystemProxySettings::IsProxyMode(const char* aMode) { ++++++ mozilla-ntlm-full-path.patch ++++++ # HG changeset patch # User Petr Cerny <pcerny@novell.com> # Parent 7308e4a7c1f769f4bbbc90870b849cadd99495a6 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 @@ -168,17 +168,17 @@ static uint8_t* ExtractMessage(const nsA nsresult nsAuthSambaNTLM::SpawnNTLMAuthHelper() { const char* username = PR_GetEnv("USER"); if (!username) return NS_ERROR_FAILURE; const char* const args[] = { - "ntlm_auth", + "/usr/bin/ntlm_auth", "--helper-protocol", "ntlmssp-client-1", "--use-cached-creds", "--username", username, nullptr }; bool isOK = SpawnIOChild(const_cast<char* const*>(args), &mChildPID, &mFromChildFD, &mToChildFD); if (!isOK) ++++++ mozilla-ppc.patch ++++++ # HG changeset patch # Parent 58ae98c85e39def96a90cb21c90e871f41a03a71 # User Wolfgang Rosenauer <wr@rosenauer.org> Bug 746112 - RegExp hang on ppc64 in execute. Bug 750620 - Make double-conversion portable to exotic architectures. TM: mozilla15 diff --git a/js/src/yarr/YarrInterpreter.h b/js/src/yarr/YarrInterpreter.h --- a/js/src/yarr/YarrInterpreter.h +++ b/js/src/yarr/YarrInterpreter.h @@ -162,17 +162,17 @@ struct ByteTerm { , m_invert(invert) { atom.characterClass = characterClass; atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; 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) { atom.subpatternId = subpatternId; atom.parenthesesDisjunction = parenthesesInfo; atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; @@ -183,17 +183,17 @@ struct ByteTerm { : type(type) , m_capture(false) , m_invert(invert) { atom.quantityType = QuantifierFixedCount; 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) { atom.subpatternId = subpatternId; atom.quantityType = QuantifierFixedCount; atom.quantityCount = 1; inputPosition = inputPos; diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h --- a/js/src/yarr/YarrPattern.h +++ b/js/src/yarr/YarrPattern.h @@ -166,17 +166,17 @@ struct PatternTerm { , m_capture(false) , m_invert(invert) { characterClass = charClass; quantityType = QuantifierFixedCount; 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) { parentheses.disjunction = disjunction; parentheses.subpatternId = subpatternId; parentheses.isCopy = false; parentheses.isTerminal = false; diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -1086,17 +1086,19 @@ struct arena_s { static unsigned ncpus; #endif /* * When MALLOC_STATIC_SIZES is defined most of the parameters * controlling the malloc behavior are defined as compile-time constants * for best performance and cannot be altered at runtime. */ +#if !(defined(__powerpc__)) #define MALLOC_STATIC_SIZES 1 +#endif #ifdef MALLOC_STATIC_SIZES /* * VM page size. It must divide the runtime CPU page size or the code * will abort. */ #define pagesize_2pow ((size_t) 12) diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h --- a/mfbt/double-conversion/utils.h +++ b/mfbt/double-conversion/utils.h @@ -50,17 +50,17 @@ // the result is equal to 89255e-22. // The best way to test this, is to create a division-function and to compare // the output of the division with the expected result. (Inlining must be // disabled.) // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) #if defined(_M_X64) || defined(__x86_64__) || \ defined(__ARMEL__) || defined(__avr32__) || \ defined(__hppa__) || defined(__ia64__) || \ - defined(__mips__) || defined(__powerpc__) || \ + defined(__mips__) || defined(__powerpc__) || defined(__powerpc64__) || \ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ defined(__SH4__) || defined(__alpha__) || \ defined(_MIPS_ARCH_MIPS32R2) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) #if defined(_WIN32) // Windows uses a 64bit wide floating point stack. #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 ++++++ 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 @@ -1543,17 +1543,51 @@ nsPluginHost::FindPluginForType(const ch if (!aMimeType) { return nullptr; } LoadPlugins(); InfallibleTArray<nsPluginTag*> matchingPlugins; + char *preferredPluginPath = NULL; + nsAutoCString mimetypePrefString ("modules.plugins.mimetype."); + mimetypePrefString.Append(aMimeType); + const char *mimetypePrefChar = mimetypePrefString.get(); + nsAdoptingCString pluginPath = Preferences::GetCString(mimetypePrefChar); + preferredPluginPath = (char*) pluginPath.get(); + nsPluginTag *plugin = mPlugins; + + if(preferredPluginPath) { + while (plugin) { + if (!aCheckEnabled || plugin->IsEnabled()) { + if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) || + 0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) { + matchingPlugins.AppendElement(plugin); + } + } + plugin = plugin->mNext; + } + + // now lets search for substrings + plugin = mPlugins; + while (plugin) { + if (!aCheckEnabled || plugin->IsEnabled()) { + if (nullptr != PL_strstr(plugin->mFileName.get(), preferredPluginPath) || + nullptr != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) { + matchingPlugins.AppendElement(plugin); + } + } + plugin = plugin->mNext; + } + + return FindPreferredPlugin(matchingPlugins); + } + while (plugin) { if (!aCheckEnabled || plugin->IsEnabled()) { int32_t mimeCount = plugin->mMimeTypes.Length(); for (int32_t i = 0; i < mimeCount; i++) { if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) { matchingPlugins.AppendElement(plugin); break; } ++++++ mozilla-shared-nss-db.patch ++++++ From: Hans Petter Jansson <hpj@copyleft.no> Wolfgang Rosenauer <wr@rosenauer.org> Subject: use libnsssharedhelper if available at compile time (can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1) References: diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -8108,16 +8108,31 @@ AC_SUBST(QCMS_LIBS) dnl ======================================================== dnl HarfBuzz dnl ======================================================== MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)' AC_SUBST(MOZ_HARFBUZZ_LIBS) dnl ======================================================== +dnl Check for nss-shared-helper +dnl ======================================================== + + PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper, + [MOZ_ENABLE_NSSHELPER=1], + [MOZ_ENABLE_NSSHELPER=]) + +if test "$MOZ_ENABLE_NSSHELPER"; then + AC_DEFINE(MOZ_ENABLE_NSSHELPER) +fi +AC_SUBST(MOZ_ENABLE_NSSHELPER) +AC_SUBST(NSSHELPER_CFLAGS) +AC_SUBST(NSSHELPER_LIBS) + +dnl ======================================================== dnl SIL Graphite dnl ======================================================== if test "$MOZ_GRAPHITE"; then MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)' AC_DEFINE(MOZ_GRAPHITE) else MOZ_GRAPHITE_LIBS= fi diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in --- a/security/manager/ssl/src/Makefile.in +++ b/security/manager/ssl/src/Makefile.in @@ -93,10 +93,13 @@ DEFINES += \ $(NULL) EXPORTS += \ CryptoTask.h \ nsNSSShutDown.h \ ScopedNSSTypes.h \ $(NULL) +LOCAL_INCLUDES += $(NSSHELPER_CFLAGS) +EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS) + include $(topsrcdir)/config/rules.mk diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp --- a/security/manager/ssl/src/nsNSSComponent.cpp +++ b/security/manager/ssl/src/nsNSSComponent.cpp @@ -3,16 +3,23 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_LOGGING #define FORCE_PR_LOG 1 #endif +#ifdef MOZ_ENABLE_NSSHELPER +#pragma GCC visibility push(default) +#include <nss-shared-helper.h> +#pragma GCC visibility pop +#include "prenv.h" +#endif + #include "nsNSSComponent.h" #include "nsNSSCallbacks.h" #include "nsNSSIOLayer.h" #include "nsCertVerificationThread.h" #include "nsNetUtil.h" #include "nsAppDirectoryServiceDefs.h" #include "nsDirectoryService.h" @@ -1735,18 +1742,34 @@ nsNSSComponent::InitializeNSS(bool showW ConfigureInternalPKCS11Token(); // The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs // module by NSS_Initialize because we will load it in InstallLoadableRoots // later. It also allows us to work around a bug in the system NSS in // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as // "/usr/lib/nss/libnssckbi.so". uint32_t init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; - SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "", - SECMOD_DB, init_flags); + SECStatus init_rv = SECFailure; +#ifdef MOZ_ENABLE_NSSHELPER + if (PR_GetEnv("MOZ_SM_NO_NSSHELPER")) { + init_rv = ::NSS_Initialize(profileStr.get(), "", "", + SECMOD_DB, init_flags); + } else { + init_rv = ::nsshelp_open_db ("Seamonkey", profileStr.get(), init_flags); + + if (init_rv != SECSuccess) { + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get())); + init_rv = ::NSS_Initialize(profileStr.get(), "", "", + SECMOD_DB, init_flags); + } + } +#else + init_rv = ::NSS_Initialize(profileStr.get(), "", "", + SECMOD_DB, init_flags); +#endif if (init_rv != SECSuccess) { PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get())); if (supress_warning_preference) { which_nss_problem = problem_none; } else { diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -484,17 +484,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO endif endif endif EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) DEFINES += -DIMPL_XREAPI -EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) +EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS) ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) CXXFLAGS += $(TK_CFLAGS) OS_LIBS += \ -framework SystemConfiguration \ -framework QTKit \ -framework IOKit \ -F/System/Library/PrivateFrameworks -framework CoreUI \ ++++++ 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 @@ -12,26 +12,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) && (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-ua-locale.patch ++++++ From: upstream Subject: allow reading general.useragent.locale from user profile References: https://bugzilla.mozilla.org/show_bug.cgi?id=542999 http://bugzilla.novell.com/show_bug.cgi?id=582654 diff --git a/chrome/src/nsChromeRegistryChrome.cpp b/chrome/src/nsChromeRegistryChrome.cpp --- a/chrome/src/nsChromeRegistryChrome.cpp +++ b/chrome/src/nsChromeRegistryChrome.cpp @@ -281,20 +281,21 @@ nsChromeRegistryChrome::GetSelectedLocal return NS_OK; } nsresult nsChromeRegistryChrome::SelectLocaleFromPref(nsIPrefBranch* prefs) { nsresult rv; - bool matchOSLocale = false; + bool matchOSLocale = false, userLocaleOverride = false; + prefs->PrefHasUserValue(SELECTED_LOCALE_PREF, &userLocaleOverride); rv = prefs->GetBoolPref(MATCH_OS_LOCALE_PREF, &matchOSLocale); - if (NS_SUCCEEDED(rv) && matchOSLocale) { + if (NS_SUCCEEDED(rv) && matchOSLocale && !userLocaleOverride) { // compute lang and region code only when needed! nsAutoCString uiLocale; rv = getUILangCountry(uiLocale); if (NS_SUCCEEDED(rv)) mSelectedLocale = uiLocale; } else { nsXPIDLCString provider; ++++++ mozilla-webrtc-ppc.patch ++++++ Submitted-by: schwab@@linux-m68k.org Subject: fix PPC build References: (not delivered with the patch but apparently mix of:) Bug 750869 - Support WebRTC for Android in our build system (TM:20) Bug 814693 - Build failure on Debian powerpc (TM:20) diff --git a/media/webrtc/shared_libs.mk b/media/webrtc/shared_libs.mk --- a/media/webrtc/shared_libs.mk +++ b/media/webrtc/shared_libs.mk @@ -23,33 +23,39 @@ WEBRTC_LIBS = \ $(call EXPAND_LIBNAME_PATH,video_render_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_render_module) \ $(call EXPAND_LIBNAME_PATH,video_engine_core,$(DEPTH)/media/webrtc/trunk/src/video_engine/video_engine_video_engine_core) \ $(call EXPAND_LIBNAME_PATH,media_file,$(DEPTH)/media/webrtc/trunk/src/modules/modules_media_file) \ $(call EXPAND_LIBNAME_PATH,rtp_rtcp,$(DEPTH)/media/webrtc/trunk/src/modules/modules_rtp_rtcp) \ $(call EXPAND_LIBNAME_PATH,udp_transport,$(DEPTH)/media/webrtc/trunk/src/modules/modules_udp_transport) \ $(call EXPAND_LIBNAME_PATH,bitrate_controller,$(DEPTH)/media/webrtc/trunk/src/modules/modules_bitrate_controller) \ $(call EXPAND_LIBNAME_PATH,remote_bitrate_estimator,$(DEPTH)/media/webrtc/trunk/src/modules/modules_remote_bitrate_estimator) \ $(call EXPAND_LIBNAME_PATH,video_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing) \ - $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \ $(call EXPAND_LIBNAME_PATH,voice_engine_core,$(DEPTH)/media/webrtc/trunk/src/voice_engine/voice_engine_voice_engine_core) \ $(call EXPAND_LIBNAME_PATH,audio_conference_mixer,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_conference_mixer) \ $(call EXPAND_LIBNAME_PATH,audio_device,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_device) \ $(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_processing) \ $(call EXPAND_LIBNAME_PATH,aec,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec) \ - $(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \ $(call EXPAND_LIBNAME_PATH,apm_util,$(DEPTH)/media/webrtc/trunk/src/modules/modules_apm_util) \ $(call EXPAND_LIBNAME_PATH,aecm,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm) \ $(call EXPAND_LIBNAME_PATH,agc,$(DEPTH)/media/webrtc/trunk/src/modules/modules_agc) \ $(call EXPAND_LIBNAME_PATH,ns,$(DEPTH)/media/webrtc/trunk/src/modules/modules_ns) \ $(call EXPAND_LIBNAME_PATH,yuv,$(DEPTH)/media/webrtc/trunk/third_party/libyuv/libyuv_libyuv) \ $(call EXPAND_LIBNAME_PATH,webrtc_jpeg,$(DEPTH)/media/webrtc/trunk/src/common_video/common_video_webrtc_jpeg) \ $(call EXPAND_LIBNAME_PATH,nicer,$(DEPTH)/media/mtransport/third_party/nICEr/nicer_nicer) \ $(call EXPAND_LIBNAME_PATH,nrappkit,$(DEPTH)/media/mtransport/third_party/nrappkit/nrappkit_nrappkit) \ $(NULL) +# if we're on an intel arch, we want SSE2 optimizations +ifneq (,$(INTEL_ARCHITECTURE)) +WEBRTC_LIBS += \ + $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \ + $(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \ + $(NULL) +endif + # If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the # relevant library from this list: # # $(call EXPAND_LIBNAME_PATH,G722,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G722) \ # $(call EXPAND_LIBNAME_PATH,iLBC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iLBC) \ # $(call EXPAND_LIBNAME_PATH,iSAC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSAC) \ # $(call EXPAND_LIBNAME_PATH,iSACFix,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSACFix) \ # diff --git a/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi b/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi --- a/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi +++ b/media/webrtc/trunk/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi @@ -6,16 +6,19 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. { 'targets': [ { 'target_name': 'PCM16B', 'type': '<(library)', + 'dependencies': [ + '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing', + ], 'include_dirs': [ 'include', ], 'direct_dependent_settings': { 'include_dirs': [ 'include', ], }, diff --git a/media/webrtc/trunk/src/typedefs.h b/media/webrtc/trunk/src/typedefs.h --- a/media/webrtc/trunk/src/typedefs.h +++ b/media/webrtc/trunk/src/typedefs.h @@ -52,16 +52,24 @@ //#define WEBRTC_ARCH_ARMEL #define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN #elif defined(__MIPSEL__) #define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_LITTLE_ENDIAN +#elif defined(__powerpc__) +#if defined(__powerpc64__) +#define WEBRTC_ARCH_64_BITS +#else +#define WEBRTC_ARCH_32_BITS +#endif +#define WEBRTC_ARCH_BIG_ENDIAN +#define WEBRTC_BIG_ENDIAN #else #error Please add support for your architecture in typedefs.h #endif #if defined(__SSE2__) || defined(_MSC_VER) #define WEBRTC_USE_SSE2 #endif ++++++ mozilla.sh.in ++++++ #!/bin/sh # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is mozilla.org Code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Wolfgang Rosenauer <wolfgang.rosenauer@suse.de> # <wr@rosenauer.org> # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** ## ## Usage: ## ## $ mozilla [args] ## ## This script is meant to run a mozilla program from the mozilla ## rpm installation. ## ## The script will setup all the environment voodoo needed to make ## mozilla work. cmdname=`basename $0` ## ## Variables ## MOZ_DIST_BIN="%PREFIX" MOZ_DIST_LIB="%PROGDIR" MOZ_APPNAME="%APPNAME" MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME-bin" MOZ_APP_LAUNCHER="$MOZ_DIST_LIB/$MOZ_APPNAME.sh" if [ "$0" = "$MOZ_APP_LAUNCHER" ]; then [ -h "/usr/bin/$MOZ_APPNAME" ] && \ _link=$(readlink -f "/usr/bin/$MOZ_APPNAME") if [ "$_link" = "$MOZ_APP_LAUNCHER" ]; then export MOZ_APP_LAUNCHER="/usr/bin/$MOZ_APPNAME" fi else export MOZ_APP_LAUNCHER="/usr/bin/$MOZ_APPNAME" fi mozilla_lib=`file $MOZ_PROGRAM` LIB=lib echo $mozilla_lib | grep -q -E 'ELF.64-bit.*(x86-64|S/390|PowerPC)' && LIB=lib64 BROWSER_PLUGIN_DIR=/usr/$LIB/browser-plugins if [ ! -d $BROWSER_PLUGIN_DIR ]; then BROWSER_PLUGIN_DIR=/opt/netscape/plugins fi MOZILLA_FIVE_HOME="$MOZ_DIST_LIB" export MOZILLA_FIVE_HOME LD_LIBRARY_PATH=$MOZ_DIST_LIB${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH # needed for SUN Java under Xorg >= 7.2 export LIBXCB_ALLOW_SLOPPY_LOCK=1 ## if [ -z "$MOZ_PLUGIN_PATH" ]; then export MOZ_PLUGIN_PATH=$BROWSER_PLUGIN_DIR else # make sure that BROWSER_PLUGIN_DIR is in MOZ_PLUGIN_PATH echo "$MOZ_PLUGIN_PATH" | grep "$BROWSER_PLUGIN_DIR" 2>&1 >/dev/null _retval=$? if [ ${_retval} -ne 0 ]; then export MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$BROWSER_PLUGIN_DIR fi fi # disable Gnome crash dialog (doesn't make sense anyway) export GNOME_DISABLE_CRASH_DIALOG=1 moz_debug=0 script_args="" pass_arg_count=0 while [ $# -gt $pass_arg_count ] do case "$1" in -d | --debugger) moz_debugger=$2; if [ "${moz_debugger}" != "" ]; then shift 2 moz_debug=1 else echo "-d requires an argument" exit 1 fi ;; *) # Move the unrecognized argument to the end of the list. arg="$1" shift set -- "$@" "$arg" pass_arg_count=`expr $pass_arg_count + 1` ;; esac done if [ $moz_debug -eq 1 ]; then tmpfile=`mktemp /tmp/mozargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; } trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15 echo -e "set args ${1+"$@"}\nrun" > $tmpfile echo "$moz_debugger $MOZ_PROGRAM -x $tmpfile" $moz_debugger "$MOZ_PROGRAM" -x $tmpfile else $MOZ_PROGRAM "$@" fi exitcode=$? exit $exitcode ++++++ seamonkey-rpmlintrc ++++++ addFilter("no-jar-manifest") ++++++ seamonkey-shared-nss-db.patch ++++++ From: Hans Petter Jansson <hpj@copyleft.no> Wolfgang Rosenauer <wr@rosenauer.org> Subject: use libnsssharedhelper if available at compile time (can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1) References: diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -6405,16 +6405,30 @@ fi AC_SUBST(MOZ_CAIRO_LIBS) dnl qcms dnl ======================================================== QCMS_LIBS='$(call EXPAND_LIBNAME_PATH,mozqcms,$(DEPTH)/gfx/qcms)' AC_SUBST(QCMS_LIBS) +dnl ======================================================== +dnl Check for nss-shared-helper +dnl ======================================================== + + PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper, + [MOZ_ENABLE_NSSHELPER=1], + [MOZ_ENABLE_NSSHELPER=]) + +if test "$MOZ_ENABLE_NSSHELPER"; then + AC_DEFINE(MOZ_ENABLE_NSSHELPER) +fi +AC_SUBST(MOZ_ENABLE_NSSHELPER) +AC_SUBST(NSSHELPER_CFLAGS) +AC_SUBST(NSSHELPER_LIBS) dnl ======================================================== dnl HarfBuzz dnl ======================================================== MOZ_HARFBUZZ_LIBS='$(DEPTH)/mozilla/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)' AC_SUBST(MOZ_HARFBUZZ_LIBS) dnl ======================================================== ++++++ seamonkey-ua-locale.patch ++++++ diff --git a/suite/locales/en-US/suite-l10n.js b/suite/locales/en-US/suite-l10n.js --- a/suite/locales/en-US/suite-l10n.js +++ b/suite/locales/en-US/suite-l10n.js @@ -1,8 +1,8 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #filter substitution -pref("general.useragent.locale", "@AB_CD@"); +pref("general.useragent.locale", "chrome://global/locale/intl.properties"); pref("spellchecker.dictionary", "@AB_CD@"); ++++++ suse-default-prefs.js ++++++ pref("app.update.enabled", false); pref("browser.display.use_system_colors", true); pref("browser.startup.homepage_override.mstone", "ignore"); pref("general.smoothScroll", true); pref("font.default", "sans-serif"); pref("network.negotiate-auth.gsslib", "GSSAPI"); pref("print.print_edge_top", 14); // 1/100 of an inch pref("print.print_edge_left", 16); // 1/100 of an inch pref("print.print_edge_right", 16); // 1/100 of an inch pref("print.print_edge_bottom", 14); // 1/100 of an inch pref("intl.locale.matchOS", true); // do not disable system-global or app-global extensions pref("extensions.autoDisableScopes", 3); pref("extensions.shownSelectionUI", true); -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org