1
0
Wolfgang Rosenauer 2011-06-01 06:05:09 +00:00 committed by Git OBS Bridge
parent 008d752eb2
commit 688ee2c30f
29 changed files with 6263 additions and 814 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue May 31 06:53:55 UTC 2011 - wr@rosenauer.org
- update to 5.0b3
- transformed to standalone Firefox (not xulrunner based)
(with new Firefox rapid release cycle it makes no sense anymore)
* imported all relevant xulrunner patches
- do not compile in build timestamp
-------------------------------------------------------------------
Fri Apr 15 07:08:53 UTC 2011 - wr@rosenauer.org

View File

@ -19,27 +19,30 @@
# norootforbuild
%define major 4
%define mainver %major.0
%define mainver %major.99
Name: MozillaFirefox
%define use_xulrunner 1
%define xulrunner mozilla-xulrunner20
BuildRequires: Mesa-devel autoconf213 fdupes gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files yasm zip
BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm
%if %suse_version > 1110
BuildRequires: libiw-devel
BuildRequires: libproxy-devel
%else
BuildRequires: wireless-tools
%endif
%if 0%{?use_xulrunner}
BuildRequires: %{xulrunner}-devel = 2.0.1
%endif
BuildRequires: mozilla-nspr-devel >= 4.8.6
BuildRequires: mozilla-nss-devel >= 3.12.8
BuildRequires: nss-shared-helper-devel
License: MPLv1.1 or GPLv2+ or LGPLv2+
Version: %{mainver}.1
Version: %{mainver}
Release: 1
%define releasedate 2011053000
Provides: web_browser
Provides: firefox = %{version}-%{release}
Provides: firefox = %{mainver}
%define releasedate 2011041400
# this is needed to match this package with the kde4 helper package without the main package
# having a hard requirement on the kde4 package
%define kde_helper_version 6
Provides: mozilla-kde4-version = %{kde_helper_version}
Summary: Mozilla Firefox Web Browser
Url: http://www.mozilla.org/
Group: Productivity/Networking/Web/Browsers
@ -48,39 +51,43 @@ Source1: MozillaFirefox.desktop
Source2: MozillaFirefox-rpmlintrc
Source3: mozilla.sh.in
Source4: find-external-requires.sh
Source5: firefox.schemas
Source6: kde.js
Source7: l10n-%{version}.tar.bz2
Source8: firefox-mimeinfo.xml
Source9: firefox-lockdown.js
Source10: compare-locales.tar.bz2
Source11: firefox.1
Source12: mozilla-get-app-id
Source13: add-plugins.sh.in
Source14: create-tar.sh
# Gecko/Toolkit
Patch1: toolkit-download-folder.patch
Patch2: firefox-linkorder.patch
Patch3: firefox-browser-css.patch
Patch4: firefox-cross-desktop.patch
Patch5: firefox-kde.patch
Patch6: firefox-kde-114.patch
Patch7: firefox-ui-lockdown.patch
Patch8: firefox-no-sync-l10n.patch
Patch9: firefox-libxulsdk-locales.patch
Patch10: firefox-no-default-ualocale.patch
Patch11: firefox-multilocale-chrome.patch
Patch12: firefox-shellservice.patch
Patch13: firefox-branded-icons.patch
Patch2: mozilla-nongnome-proxies.patch
Patch3: mozilla-prefer_plugin_pref.patch
Patch4: mozilla-shared-nss-db.patch
Patch5: mozilla-kde.patch
Patch6: mozilla-cairo-lcd.patch
Patch7: mozilla-language.patch
Patch8: mozilla-gio.patch
Patch9: mozilla-cairo-return.patch
Patch10: mozilla-ntlm-full-path.patch
Patch11: mozilla-ppc-ipc.patch
# Firefox/browser
Patch30: firefox-linkorder.patch
Patch31: firefox-browser-css.patch
Patch32: firefox-cross-desktop.patch
Patch33: firefox-kde.patch
Patch34: firefox-kde-114.patch
Patch36: firefox-no-sync-l10n.patch
Patch38: firefox-no-default-ualocale.patch
Patch39: firefox-multilocale-chrome.patch
Patch40: firefox-shellservice.patch
Patch41: firefox-branded-icons.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): coreutils shared-mime-info desktop-file-utils
Requires(postun): shared-mime-info desktop-file-utils
%if 0%{?use_xulrunner}
Requires: %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
%requires_eq %{xulrunner}
%ifarch %ix86
Requires: %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
Requires: %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
%endif
%endif
Requires: %{name}-branding >= 4.0
Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
Requires: %{name}-branding > 4.0
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%define _use_internal_dependency_generator 0
%define __find_requires sh %{SOURCE4}
@ -122,7 +129,6 @@ Requires: perl(Archive::Zip)
Development files for Firefox to make packaging of addons easier.
%if %localize
%package translations-common
Summary: Common translations for MozillaFirefox
License: MPLv1.1 or GPLv2+ or LGPLv2+
@ -160,8 +166,6 @@ Supplements: packageand(%{name}:branding-upstream)
#BRAND: default homepage and some other default configuration options
#BRAND: /usr/lib/firefox/defaults/profile/bookmarks.html that contains
#BRAND: the list of default bookmarks
#BRAND: /etc/gconf/schemas/firefox.schemas
#BRAND: for mapping some Firefox prefs to gconf
#BRAND: It's also possible to create a file
#BRAND: /usr/lib/firefox/defaults/preferences/firefox-$vendor.js to set
#BRAND: custom preference overrides.
@ -171,6 +175,18 @@ Supplements: packageand(%{name}:branding-upstream)
This package provides upstream look and feel for MozillaFirefox.
%if %crashreporter
%package buildsymbols
License: MPLv1.1 or GPLv2+ or LGPLv2+
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 -q -n mozilla -b 7 -b 10
cd $RPM_BUILD_DIR/mozilla
@ -178,30 +194,52 @@ cd $RPM_BUILD_DIR/mozilla
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if %suse_version >= 1110
%patch5 -p1
# install kde.js
install -m 644 %{SOURCE6} browser/app/profile/kde.js
%endif
%if %suse_version >= 1140
%patch6 -p1
%endif
#%patch7 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
#
%patch30 -p1
%patch31 -p1
%patch32 -p1
%if %suse_version >= 1110
%patch33 -p1
# install kde.js
install -m 644 %{SOURCE6} browser/app/profile/kde.js
%endif
%if %suse_version >= 1140
%patch34 -p1
%endif
%patch36 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -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" {} +
#
kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
if test "$kdehelperversion" != %{kde_helper_version}; then
echo fix kde helper version in the .spec file
exit 1
fi
export MOZ_BUILD_DATE=%{releasedate}
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
%ifarch ppc64
export CFLAGS="$CFLAGS -mminimal-toc"
%endif
export CXXFLAGS="$CFLAGS"
export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
SDKDIR=$(pkg-config --variable=sdkdir libxul)
cat << EOF > $MOZCONFIG
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
@ -216,19 +254,20 @@ ac_add_options --includedir=%{_includedir}
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
ac_add_options --with-system-jpeg
#ac_add_options --with-system-jpeg # libjpeg-turbo is used internally
#ac_add_options --with-system-png # doesn't work because of missing APNG support
ac_add_options --with-system-zlib
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-debug
#ac_add_options --enable-update-channel=beta
#ac_add_options --enable-chrome-format=jar
ac_add_options --enable-update-channel=beta
EOF
%if 0%{?use_xulrunner}
%if %suse_version > 1130
cat << EOF >> $MOZCONFIG
ac_add_options --with-libxul-sdk=$SDKDIR
ac_add_options --enable-chrome-format=jar
ac_add_options --disable-gnomevfs
ac_add_options --enable-gio
EOF
%endif
%if %branding
@ -236,18 +275,21 @@ cat << EOF >> $MOZCONFIG
ac_add_options --enable-official-branding
EOF
%endif
%ifarch ppc ppc64 s390 s390x
%if %suse_version > 1110
cat << EOF >> $MOZCONFIG
ac_add_options --disable-ipc
ac_add_options --enable-libproxy
EOF
%endif
%if ! %crashreporter
cat << EOF >> $MOZCONFIG
ac_add_options --disable-crashreporter
EOF
%endif
make -f client.mk build
%install
cd $RPM_BUILD_DIR/obj
# FIXME (will be needed once lockdown is integrated; needs omni.jar adoption)
#cp %{SOURCE9} dist/bin/defaults/preferences/lockdown.js
rm dist/bin/defaults/preferences/firefox-l10n.js
rm dist/bin/defaults/pref/firefox-l10n.js
make -C browser/installer STRIP=/bin/true
# copy tree into RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{progdir}
@ -257,6 +299,10 @@ mkdir -p $RPM_BUILD_ROOT/%{progdir}/distribution/extensions
find $RPM_BUILD_ROOT%{progdir} \
-name "*.js" -o -name "*.jsm" -o -name "*.rdf" | xargs chmod a-x
mkdir -p $RPM_BUILD_ROOT%{progdir}/searchplugins
# install add-plugins.sh
sed "s:%%PROGDIR:%{progdir}:g" \
%{SOURCE13} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
# install additional locales
%if %localize
rm -f %{_tmppath}/translations.*
@ -317,11 +363,13 @@ ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progn
ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png
%if %branding
for size in 16 22 24 32 48 256; do
%else
for size in 16 32 48; do
%endif
mkdir -p $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/
ln -sf %{progdir}/chrome/icons/default/default$size.png \
$RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/%{progname}.png
done
%endif
%suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK
# excludes
rm -f $RPM_BUILD_ROOT%{progdir}/updater.ini
@ -330,6 +378,9 @@ rm -f $RPM_BUILD_ROOT%{progdir}/README.txt
rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties
rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE
rm -f $RPM_BUILD_ROOT%{progdir}/precomplete
rm -f $RPM_BUILD_ROOT%{progdir}/dictionaries/en-US*
rm -f $RPM_BUILD_ROOT%{progdir}/firefox
# devel
mkdir -p %{buildroot}%{_bindir}
install -m 755 %SOURCE12 %{buildroot}%{_bindir}
@ -341,8 +392,6 @@ cat <<'FIN' >%{buildroot}/etc/rpm/macros.%{progname}
%%firefox_version %{version}
%%firefox_mainver %{mainver}
%%firefox_mozillapath %%{_libdir}/%{progname}
%%firefox_xulrunner %{xulrunner}
%%firefox_xulrunner_version %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
%%firefox_pluginsdir %%{_libdir}/browser-plugins
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
@ -362,6 +411,18 @@ FIN
# fdupes
%fdupes $RPM_BUILD_ROOT%{progdir}
%fdupes $RPM_BUILD_ROOT%{_datadir}
# create breakpad debugsymbols
%if %crashreporter
SYMBOLS_NAME="firefox-%{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
@ -383,6 +444,7 @@ if [ -f usr/bin/update-desktop-database ] ; then
usr/bin/update-desktop-database > /dev/null || :
fi
%endif
%{progdir}/add-plugins.sh > /dev/null 2>&1
exit 0
%postun
@ -400,31 +462,47 @@ fi
%endif
exit 0
%posttrans
[ -e %{progdir}/add-plugins.sh ] && \
%{progdir}/add-plugins.sh > /dev/null 2>&1
exit 0
%preun
rm -f %{progdir}/dictionaries/*
exit 0
%files
%defattr(-,root,root)
%dir %{progdir}
%dir %{progdir}/chrome/
%dir %{progdir}/distribution/
%{progdir}/chrome/browser.*
%{progdir}/chrome/localized.manifest
%{progdir}/chrome/nonlocalized.manifest
%{progdir}/chrome/en-US.*
%{progdir}/chrome/icons
%{progdir}/components/
%exclude %{progdir}/defaults/profile/bookmarks.html
#%exclude %{progdir}/defaults/profile/bookmarks.html
%{progdir}/defaults/
%{progdir}/dictionaries/
%dir %{progdir}/extensions/
%{progdir}/distribution/extensions/
%{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
%{progdir}/icons/
%{progdir}/modules/
%{progdir}/searchplugins/
%attr(755,root,root) %{progdir}/%{progname}.sh
%{progdir}/firefox
%{progdir}/firefox-bin
%{progdir}/add-plugins.sh
%{progdir}/application.ini
%{progdir}/blocklist.xml
%{progdir}/dependentlibs.list
#%{progdir}/greprefs.js
%{progdir}/*.so
%{progdir}/mozilla-xremote-client
%{progdir}/omni.jar
%{progdir}/platform.ini
%{progdir}/plugin-container
%if %crashreporter
%{progdir}/crashreporter-override.ini
%{progdir}/crashreporter
%{progdir}/crashreporter.ini
%{progdir}/Throbber-small.gif
%endif
%{progdir}/chrome.manifest
%{_datadir}/applications/%{desktop_file_name}.desktop
@ -436,9 +514,7 @@ exit 0
%dir %{_libdir}/mozilla
%dir %{_libdir}/mozilla/extensions
%dir %{_libdir}/mozilla/extensions/%{firefox_appid}
%if %branding
%{gnome_dir}/share/icons/hicolor/
%endif
%{_bindir}/%{progname}
%doc %{_mandir}/man1/%{progname}.1.gz
@ -448,7 +524,6 @@ exit 0
%config /etc/rpm/macros.%{progname}
%if %localize
%files translations-common -f %{_tmppath}/translations.common
%defattr(-,root,root)
%dir %{progdir}
@ -460,10 +535,16 @@ exit 0
%dir %{progdir}/extensions/
%endif
%files branding-upstream
#%files branding-upstream
#%defattr(-,root,root)
#%dir %{progdir}
#%dir %{progdir}/defaults/
#%{progdir}/defaults/profile/bookmarks.html
%if %crashreporter
%files buildsymbols
%defattr(-,root,root)
%dir %{progdir}
%dir %{progdir}/defaults/
%{progdir}/defaults/profile/bookmarks.html
%{_datadir}/mozilla/*.zip
%endif
%changelog

57
add-plugins.sh.in Normal file
View File

@ -0,0 +1,57 @@
#! /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

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:90f1442dcf8998b69e1d890e9accb88e648785ce9ddbf393d604d7cf0d67aae8
size 25673
oid sha256:f451b9247ea93e75a1d2d0baf8643ec2f09c7aaef030ff56e98e15256a233a4d
size 25657

31
create-tar.sh Normal file
View File

@ -0,0 +1,31 @@
#!/bin/bash
BRANCH="mozilla-beta"
RELEASE_TAG="FIREFOX_5_0b3_RELEASE"
VERSION="4.99"
# mozilla
hg clone http://hg.mozilla.org/$BRANCH mozilla
pushd mozilla
[ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG
popd
tar cjf firefox-$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-beta/$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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3db0870fe1220652f77931365afa88505cd1e7499bcf80b6379f70f606a194fb
size 65958832

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43042fdc36e9c0449bbf7db56d320b789f806780e85e6fcaa82c1a24b5be4931
size 68684588

View File

@ -1,9 +1,10 @@
# HG changeset patch
# Parent 33dfbc62844ac4883fbedb77d782a1b9ef5596c4
# Parent 20b50e5bd650d19c30c308bb3b10f9903c83f581
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -281,16 +281,21 @@ endif
@@ -277,16 +277,21 @@ endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
libs::
@ -29,7 +30,7 @@ diff --git a/browser/installer/package-manifest.in b/browser/installer/package-m
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -423,18 +423,21 @@
#if MOZ_UPDATE_CHANNEL == beta
#ifdef SHIP_FEEDBACK
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi
#endif
@BINPATH@/chrome/toolkit@JAREXT@

View File

@ -23,7 +23,7 @@ diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser
new file mode 100644
--- /dev/null
+++ b/browser/base/content/browser-kde.xul
@@ -0,0 +1,1077 @@
@@ -0,0 +1,1078 @@
+#filter substitution
+<?xml version="1.0"?>
+# -*- Mode: HTML -*-
@ -819,6 +819,7 @@ new file mode 100644
+
+
+ <toolbar id="TabsToolbar"
+ class="toolbar-primary"
+ fullscreentoolbar="true"
+ customizable="true"
+ mode="icons" lockmode="true"
@ -1142,10 +1143,10 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
#ifndef WINCE
#include "nsProfileMigrator.h"
#if !defined(XP_BEOS)
#include "nsDogbertProfileMigrator.h"
#endif
@@ -84,18 +84,16 @@ using namespace mozilla::browser;
#if !defined(XP_OS2)
#include "nsOperaProfileMigrator.h"
@@ -82,18 +82,16 @@ using namespace mozilla::browser;
/////////////////////////////////////////////////////////////////////////////
@ -1160,11 +1161,11 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
#ifndef WINCE
#if !defined(XP_BEOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
#endif
#if !defined(XP_OS2)
@@ -151,17 +149,17 @@ NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEM
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
#endif
@@ -145,17 +143,17 @@ NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEM
#endif /* WINCE */
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);

View File

@ -1,29 +0,0 @@
# HG changeset patch
# Parent 2f2f266d47e42bf9ff421deeeeea2dd1985b19b0
We need to package toolkit locales explicitely into firefox langpacks even in xulrunner based builds
diff --git a/browser/makefiles.sh b/browser/makefiles.sh
--- a/browser/makefiles.sh
+++ b/browser/makefiles.sh
@@ -74,16 +74,21 @@ browser/installer/windows/Makefile
browser/locales/Makefile
browser/themes/Makefile
browser/themes/pinstripe/browser/Makefile
browser/themes/pinstripe/communicator/Makefile
browser/themes/pinstripe/Makefile
browser/themes/winstripe/browser/Makefile
browser/themes/winstripe/communicator/Makefile
browser/themes/winstripe/Makefile
+netwerk/locales/Makefile
+dom/locales/Makefile
+security/manager/locales/Makefile
+extensions/spellcheck/locales/Makefile
+toolkit/locales/Makefile
$MOZ_BRANDING_DIRECTORY/Makefile
$MOZ_BRANDING_DIRECTORY/content/Makefile
$MOZ_BRANDING_DIRECTORY/locales/Makefile
"
if [ "$ENABLE_TESTS" ]; then
add_makefiles "
browser/base/content/test/Makefile

View File

@ -1,9 +0,0 @@
pref("config.lockdown.printsetup", false);
pref("config.lockdown.savepage", false);
pref("config.lockdown.hidebookmark", false);
pref("config.lockdown.bookmark", false);
pref("config.lockdown.history", false);
pref("config.lockdown.history.set", false);
pref("config.lockdown.urlbar", false);
pref("config.lockdown.searchbar", false);
pref("config.lockdown.toolbarediting", false);

View File

@ -1,12 +1,12 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent e3da64303bf904a8da2410754026b7a00480a589
# Parent ec1efb28a1fea666f22730689d811fc67720f2db
Add searchplugins to chrome packaging for proper localization
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -321,16 +321,20 @@ pref("browser.download.manager.scanWhenD
@@ -327,16 +327,20 @@ pref("browser.download.manager.scanWhenD
pref("browser.download.manager.resumeOnWakeDelay", 10000);
// search engines URL
@ -30,16 +30,16 @@ diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -169,31 +169,44 @@ libs:: $(addprefix $(LOCALE_SRCDIR)/prof
@@ -167,31 +167,43 @@ libs:: $(call MERGE_FILES,$(addprefix pr
install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ;
install:: $(addprefix generic/profile/,$(PROFILE_FILES))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
install:: $(addprefix $(LOCALE_SRCDIR)/profile/chrome/,$(PROFILE_CHROME))
install:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/chrome
-SEARCH_PLUGINS = $(shell cat $(LOCALE_SRCDIR)/searchplugins/list.txt)
-SEARCH_PLUGINS = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
+SEARCH_PLUGINS = $(shell cat \
+ $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
+ @srcdir@/en-US/searchplugins/list.txt ) )
@ -59,12 +59,11 @@ diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
+ -s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \
+ -s $(LOCALE_SRCDIR)/searchplugins \
+ $(MAKE_JARS_FLAGS) tmp-search.jar.mn
+
+export:: searchplugins
+
+GARBAGE += tmp-search.jar.mn
libs-%:
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
@ -77,8 +76,8 @@ diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer: $(call ESCAPE_SPACE,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
--- a/browser/locales/jar.mn

View File

@ -1,10 +1,10 @@
# HG changeset patch
# Parent e386d64898cac5a2e10bc4fbce606ffeefe1f210
# Parent 0266a8a602473a4fa13393628be0b2fd50d0efc6
diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -181,17 +181,19 @@ libs:: $(addsuffix .xml,$(SEARCH_PLUGINS
@@ -179,17 +179,19 @@ libs:: $(addsuffix .xml,$(SEARCH_PLUGINS
install:: $(addsuffix .xml,$(SEARCH_PLUGINS))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
@ -21,6 +21,6 @@ diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
repackage-win32-installer: $(call ESCAPE_SPACE,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."

View File

@ -1,380 +0,0 @@
From: various contributors
Subject: Firefox chrome lockdown hooks
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1180,32 +1180,186 @@ function prepareForStartup() {
// setup our MozApplicationManifest listener
gBrowser.addEventListener("MozApplicationManifest",
OfflineApps, false);
// setup simple gestures support
gGestureSupport.init(true);
}
+function lockdownElement(ident, disable, hideCompletely)
+{
+ var e = document.getElementById(ident);
+ if (!e) return;
+ if (hideCompletely) {
+ e.setAttribute("style", (disable) ? "display: none;" : "");
+ } else if (disable) {
+ e.setAttribute("disabled", "true");
+ } else {
+ e.removeAttribute("disabled");
+ }
+}
+
+function applyLockdown(isStartup)
+{
+ // It is important to check that Firefox code does not change the
+ // "disabled" state of these UI elements. Fortunately it mostly hides
+ // elements rather than disables them.
+ var disablePrinting = gPrefService.getBoolPref("config.lockdown.printing");
+ var disablePrintSetup = gPrefService.getBoolPref("config.lockdown.printsetup");
+ if (!isStartup || disablePrintSetup || disablePrintSetup) {
+ lockdownElement("cmd_pageSetup", disablePrinting || disablePrintSetup);
+ lockdownElement("menu_printPreview", disablePrinting || disablePrintSetup);
+ lockdownElement("cmd_print", disablePrinting);
+ }
+
+ var disableSave = gPrefService.getBoolPref("config.lockdown.savepage");
+ if (!isStartup || disableSave) {
+ lockdownElement("Browser:SavePage", disableSave);
+ lockdownElement("Browser:SaveFrame", disableSave);
+ lockdownElement("context-savepage", disableSave);
+ lockdownElement("context-saveframe", disableSave);
+ lockdownElement("context-savelink", disableSave);
+ lockdownElement("context-saveimage", disableSave);
+ lockdownElement("View:PageSource", disableSave);
+ lockdownElement("context-viewpartialsource-selection", disableSave);
+ lockdownElement("context-viewpartialsource-mathml", disableSave);
+ lockdownElement("context-viewsource", disableSave);
+ lockdownElement("context-viewframesource", disableSave);
+ lockdownElement("View:PageInfo", disableSave);
+ lockdownElement("context-viewinfo", disableSave);
+ lockdownElement("context-viewframeinfo", disableSave);
+ lockdownElement("Tasks:InspectPage", disableSave); // from DOMInspector extension
+ }
+
+ var disableBookmarks = gPrefService.getBoolPref("config.lockdown.hidebookmark");
+ var disableBookmarkEditing = gPrefService.getBoolPref("config.lockdown.bookmark");
+ if (!isStartup || disableBookmarks || disableBookmarkEditing) {
+ lockdownElement("bookmarksMenu", disableBookmarks, true);
+ lockdownElement("viewBookmarksSidebar", disableBookmarks);
+ lockdownElement("PersonalToolbar", disableBookmarks); // XXX check
+ lockdownElement("Browser:AddBookmarkAs", disableBookmarks || disableBookmarkEditing);
+ lockdownElement("Browser:ShowAllBookmarks", disableBookmarks || disableBookmarkEditing);
+ lockdownElement("manBookmark", disableBookmarks || disableBookmarkEditing);
+ lockdownElement("context-bookmarkpage", disableBookmarks || disableBookmarkEditing);
+ lockdownElement("context-bookmarklink", disableBookmarks || disableBookmarkEditing);
+
+ // hide the personal bookmarks toolbar if necessary
+ if (disableBookmarks) {
+ document.getElementById("PersonalToolbar").setAttribute("collapsed", "true");
+ }
+ }
+
+ var disableHistory = gPrefService.getBoolPref("config.lockdown.history");
+ if (!isStartup || disableHistory) {
+ lockdownElement("history-menu", disableHistory, true);
+ lockdownElement("viewHistorySidebar", disableHistory);
+ lockdownElement("Browser:ShowAllHistory", disableHistory);
+ gURLBar.setAttribute("enablehistory", disableHistory ? "false" : "true");
+ gURLBar.disableAutoComplete = disableHistory;
+ }
+
+ var defaultPrefs = Cc["@mozilla.org/preferences-service;1"]
+ .getService(Ci.nsIPrefService).getDefaultBranch(null);
+ if (isStartup && disableHistory) {
+ if (!defaultPrefs.prefIsLocked("browser.history_expire_days")) {
+ defaultPrefs.setIntPref("browser.history_expire_days", 0);
+ defaultPrefs.lockPref("browser.history_expire_days");
+ }
+ if (!defaultPrefs.prefIsLocked("browser.formfill.enable")) {
+ defaultPrefs.setBoolPref("browser.formfill.enable", false);
+ defaultPrefs.lockPref("browser.formfill.enable");
+ }
+ if (!defaultPrefs.prefIsLocked("browser.download.manager.retention")) {
+ defaultPrefs.setIntPref("browser.download.manager.retention", 0);
+ defaultPrefs.lockPref("browser.download.manager.retention");
+ }
+ gPrefService.setBoolPref("config.lockdown.history.set", true);
+ } else if (isStartup && gPrefService.prefHasUserValue("config.lockdown.history.set")) {
+ if (!defaultPrefs.prefIsLocked("browser.history_expire_days")) {
+ defaultPrefs.clearUserPref("browser.history_expire_days");
+ }
+ if (!defaultPrefs.prefIsLocked("browser.formfill.enable")) {
+ defaultPrefs.clearUserPref("browser.formfill.enable");
+ }
+ if (!defaultPrefs.prefIsLocked("browser.download.manager.retention")) {
+ defaultPrefs.clearUserPref("browser.download.manager.retention");
+ }
+ gPrefService.clearUserPref("config.lockdown.history.set");
+ }
+
+ var disableURLBar = gPrefService.getBoolPref("config.lockdown.urlbar");
+ if (!isStartup || disableURLBar) {
+ lockdownElement("urlbar", disableURLBar);
+ lockdownElement("Browser:OpenLocation", disableURLBar);
+ lockdownElement("Browser:OpenFile", disableURLBar);
+ }
+
+ var disableSearchBar = gPrefService.getBoolPref("config.lockdown.searchbar");
+ if (!isStartup || disableSearchBar) {
+ document.getElementById("search-container")
+ .setAttribute("style", (disableSearchBar) ? "display: none;" : "");
+ }
+
+ var disableToolbarEditing = gPrefService.getBoolPref("config.lockdown.toolbarediting");
+ if (!isStartup || disableToolbarEditing) {
+ var e = document.getElementById("cmd_CustomizeToolbars");
+ if (!e.getAttribute("inCustomization")) {
+ lockdownElement("cmd_CustomizeToolbars", disableToolbarEditing);
+ }
+ }
+
+ // Close sidebar if we disabled the command that's currently in use
+ var sidebarBox = document.getElementById("sidebar-box");
+ var cmd = sidebarBox.getAttribute("sidebarcommand");
+ if (cmd) {
+ var elt = document.getElementById(cmd);
+ if (elt && elt.getAttribute("disabled") == "true") {
+ toggleSidebar(cmd, false);
+ gMustLoadSidebar = false;
+ }
+ }
+}
+
+var lockdownObserver = {
+ observe: function(aSubject, aTopic, aPrefName)
+ {
+ try {
+ applyLockdown(false);
+ } catch (ex) {
+ dump("Failed lockdown: " + ex + "\n");
+ }
+ }
+};
+
function delayedStartup(isLoadingBlank, mustLoadSidebar) {
var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
os.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false);
os.addObserver(gXPInstallObserver, "xpinstall-install-blocked", false);
+ try {
+ // do lockdown stuff in an exception handler so that if it fails
+ // catastrophically, the browser should still come up and function
+ applyLockdown(true);
+ gPrefService.addObserver("config.lockdown.", lockdownObserver, false);
+ } catch (ex) {
+ dump("Failed lockdown: " + ex + "\n");
+ }
+
BrowserOffline.init();
OfflineApps.init();
gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true);
// Ensure login manager is up and running.
Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
if (mustLoadSidebar) {
+ let sidebarBox = document.getElementById("sidebar-box");
let sidebar = document.getElementById("sidebar");
- let sidebarBox = document.getElementById("sidebar-box");
sidebar.setAttribute("src", sidebarBox.getAttribute("src"));
}
UpdateUrlbarSearchSplitterState();
PlacesStarButton.init();
// called when we go into full screen, even if it is
@@ -1406,16 +1560,18 @@ function BrowserShutdown()
}
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.removeObserver(gSessionHistoryObserver, "browser:purge-session-history");
os.removeObserver(gXPInstallObserver, "xpinstall-install-blocked");
os.removeObserver(gMissingPluginInstaller, "plugin-crashed");
+ gPrefService.removeObserver("config.lockdown.", lockdownObserver);
+
try {
gBrowser.removeProgressListener(window.XULBrowserWindow);
gBrowser.removeTabsProgressListener(window.TabsProgressListener);
} catch (ex) {
}
PlacesStarButton.uninit();
@@ -3216,16 +3372,23 @@ function FillHistoryMenu(aParent) {
// Remove old entries if any
var children = aParent.childNodes;
for (var i = children.length - 1; i >= 0; --i) {
if (children[i].hasAttribute("index"))
aParent.removeChild(children[i]);
}
+ // lockdown. Don't display anything if locked down.
+ try {
+ var disableHistory = gPrefService.getBoolPref("config.lockdown.history");
+ if (disableHistory)
+ return false;
+ } catch (ex) {}
+
var webNav = getWebNavigation();
var sessionHistory = webNav.sessionHistory;
var count = sessionHistory.count;
if (count <= 1) // don't display the popup for a single item
return false;
const MAX_HISTORY_MENU_ITEMS = 15;
@@ -3365,16 +3528,17 @@ function BrowserCustomizeToolbar()
{
// Disable the toolbar context menu items
var menubar = document.getElementById("main-menubar");
for (var i = 0; i < menubar.childNodes.length; ++i)
menubar.childNodes[i].setAttribute("disabled", true);
var cmd = document.getElementById("cmd_CustomizeToolbars");
cmd.setAttribute("disabled", "true");
+ cmd.setAttribute("inCustomization", "true");
var splitter = document.getElementById("urlbar-search-splitter");
if (splitter)
splitter.parentNode.removeChild(splitter);
var customizeURL = "chrome://global/content/customizeToolbar.xul";
gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
@@ -3402,16 +3566,31 @@ function BrowserCustomizeToolbar()
} else {
return window.openDialog(customizeURL,
"CustomizeToolbar",
"chrome,titlebar,toolbar,location,resizable,dependent",
gNavToolbox);
}
}
+function BrowserRestoreCustomizationDisabledState()
+{
+ var cmd = document.getElementById("cmd_CustomizeToolbars");
+ try {
+ var disableToolBarEditing =
+ gPrefService.getBoolPref("config.lockdown.toolbarediting");
+ } catch (ex) {
+ var disableToolBarEditing = false;
+ }
+ if (!disableToolBarEditing) {
+ cmd.removeAttribute("disabled", "true");
+ }
+ cmd.removeAttribute("inCustomization");
+}
+
function BrowserToolboxCustomizeDone(aToolboxChanged) {
if (gCustomizeSheet) {
document.getElementById("customizeToolbarSheetIFrame").hidden = true;
document.getElementById("customizeToolbarSheetPopup").hidePopup();
}
// Update global UI elements that may have been added or removed
if (aToolboxChanged) {
@@ -3419,16 +3598,27 @@ function BrowserToolboxCustomizeDone(aTo
if (gURLBar)
gURLBar.emptyText = gURLBarEmptyText.value;
gProxyFavIcon = document.getElementById("page-proxy-favicon");
gHomeButton.updateTooltip();
gIdentityHandler._cacheElements();
window.XULBrowserWindow.init();
+ // make sure the search bar is not put back if locked down
+ try {
+ var disableSearchBar = gPrefService.getBoolPref("config.lockdown.searchbar");
+ } catch (ex) {
+ var disableSearchBar = false;
+ }
+ if (disableSearchBar) {
+ document.getElementById("search-container")
+ .setAttribute("style", (disableSearchBar) ? "display: none;" : "");
+ }
+
var backForwardDropmarker = document.getElementById("back-forward-dropmarker");
if (backForwardDropmarker)
backForwardDropmarker.disabled =
document.getElementById('Browser:Back').hasAttribute('disabled') &&
document.getElementById('Browser:Forward').hasAttribute('disabled');
// support downgrading to Firefox 2.0
var navBar = document.getElementById("nav-bar");
@@ -3453,18 +3643,17 @@ function BrowserToolboxCustomizeDone(aTo
XULBrowserWindow.asyncUpdateUI();
PlacesStarButton.updateState();
}
// Re-enable parts of the UI we disabled during the dialog
var menubar = document.getElementById("main-menubar");
for (var i = 0; i < menubar.childNodes.length; ++i)
menubar.childNodes[i].setAttribute("disabled", false);
- var cmd = document.getElementById("cmd_CustomizeToolbars");
- cmd.removeAttribute("disabled");
+ BrowserRestoreCustomizationDisabledState();
#ifdef XP_MACOSX
// make sure to re-enable click-and-hold
if (!getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
#endif
// XXX Shouldn't have to do this, but I do
@@ -4552,16 +4741,19 @@ function onViewToolbarsPopupShowing(aEve
var toolbarName = toolbar.getAttribute("toolbarname");
if (toolbarName) {
let menuItem = document.createElement("menuitem");
let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
"autohide" : "collapsed";
menuItem.setAttribute("toolbarindex", i);
menuItem.setAttribute("type", "checkbox");
menuItem.setAttribute("label", toolbarName);
+ if (toolbar.getAttribute("disabled") == "true") {
+ menuItem.setAttribute("disabled", "true");
+ }
menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
popup.insertBefore(menuItem, firstMenuItem);
menuItem.addEventListener("command", onViewToolbarCommand, false);
}
toolbar = toolbar.nextSibling;
}
@@ -6737,17 +6929,23 @@ BookmarkAllTabsHandler.prototype = {
_updateCommandState: function BATH__updateCommandState(aTabClose) {
var numTabs = gBrowser.tabContainer.childNodes.length;
// The TabClose event is fired before the tab is removed from the DOM
if (aTabClose)
numTabs--;
- if (numTabs > 1)
+ try {
+ var disableBookmarks =
+ gPrefService.getBoolPref("config.lockdown.bookmark");
+ } catch (ex) {
+ var disableBookmarks = false;
+ }
+ if (numTabs > 1 && !disableBookmarks)
this._command.removeAttribute("disabled");
else
this._command.setAttribute("disabled", "true");
},
doCommand: function BATH_doCommand() {
PlacesCommandHook.bookmarkCurrentPages();
},

View File

@ -1,289 +0,0 @@
<gconfschemafile>
<schemalist>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_history</key>
<applyto>/apps/firefox/lockdown/disable_history</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable the browser history</short>
<long>Prevent the browser from keeping a history of visited sites</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_toolbar_editing</key>
<applyto>/apps/firefox/lockdown/disable_toolbar_editing</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable toolbar editing</short>
<long>Prevent the user from editing the toolbar</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_themes</key>
<applyto>/apps/firefox/lockdown/disable_themes</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable installing themes</short>
<long>To prevent the user from installing themes</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_extensions</key>
<applyto>/apps/firefox/lockdown/disable_extensions</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable installing extensions</short>
<long>Prevent the user from installing extensions</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/disable_popups</key>
<applyto>/apps/firefox/web/disable_popups</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Enable popup blocker</short>
<long>Enable popup blocker without warning about blocked popups</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/java_enabled</key>
<applyto>/apps/firefox/web/java_enabled</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Enable java</short>
<long>Enable java</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/javascript_enabled</key>
<applyto>/apps/firefox/web/javascript_enabled</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Enable javascript</short>
<long>Enable javascript</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_url_bar</key>
<applyto>/apps/firefox/lockdown/disable_url_bar</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable location bar</short>
<long>Prevent the user from entering URLs in the location bar</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_searchbar</key>
<applyto>/apps/firefox/lockdown/disable_searchbar</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable search bar</short>
<long>Prevent the user from using the search bar</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/disable_cookies</key>
<applyto>/apps/firefox/web/disable_cookies</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable cookies</short>
<long>Prevent the browser from storing cookies</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/disable_save_password</key>
<applyto>/apps/firefox/web/disable_save_password</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable saved passwords</short>
<long>Prevent the browser from storing saved passwords</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/cache_size</key>
<applyto>/apps/firefox/web/cache_size</applyto>
<owner>firefox</owner>
<type>int</type>
<default>50000</default>
<locale name="C">
<short>Disk cache size in KB</short>
<long>Disk cache size in KB</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/general/homepage_url</key>
<applyto>/apps/firefox/general/homepage_url</applyto>
<owner>firefox</owner>
<type>string</type>
<default>www.novell.com/linux</default>
<locale name="C">
<short>Home Page URL</short>
<long>Home Page URL</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/download_defaultfolder</key>
<applyto>/apps/firefox/web/download_defaultfolder</applyto>
<owner>firefox</owner>
<type>string</type>
<default>Desktop</default>
<locale name="C">
<short>Default download location</short>
<long>Default download location. Possible values include: "Desktop", "My Downloads", and "Home"</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_unsafe_protocol</key>
<applyto>/apps/firefox/lockdown/disable_unsafe_protocol</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable unsafe protocols</short>
<long>Disable non-builtin protocols not explicitly enabled</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_bookmark_editing</key>
<applyto>/apps/firefox/lockdown/disable_bookmark_editing</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable editing bookmarks</short>
<long>Prevent the user from editing browser bookmarks</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/hide_bookmark</key>
<applyto>/apps/firefox/lockdown/hide_bookmark</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable bookmarks feature</short>
<long>Prevent the user from editing or viewing bookmarks</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_show_passwords</key>
<applyto>/apps/firefox/lockdown/disable_show_passwords</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Disable display of stored web passwords</short>
<long>Disable plain text display of stored web passwords in Preferences dialog</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/disable_javascript_chrome</key>
<applyto>/apps/firefox/lockdown/disable_javascript_chrome</applyto>
<owner>firefox</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Prevent javascript windows from hiding chrome</short>
<long>Prevent windows opened by javascript from hiding window chrome (location bar, status bar, etc.)</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/cookie_accept</key>
<applyto>/apps/firefox/web/cookie_accept</applyto>
<owner>firefox</owner>
<type>int</type>
<default>0</default>
<locale name="C">
<short>Cookie Lifetime Policy</short>
<long>Cookie Lifetime Policy: 0 = Accept cookies normally; 1 = Prompt for each cookie; 2 = Accept for current session only; 3 = Accept for N days</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/web/images_load</key>
<applyto>/apps/firefox/web/images_load</applyto>
<owner>firefox</owner>
<type>int</type>
<default>0</default>
<locale name="C">
<short>Image loading policy</short>
<long>Image loading policy: 0 = load all images; 1 = exclude third-party image loading; 2 = exclude all image loading</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/lockdown/additional_safe_protocols</key>
<applyto>/apps/firefox/lockdown/additional_safe_protocols</applyto>
<owner>firefox</owner>
<type>string</type>
<default></default>
<locale name="C">
<short>Additional Safe Protocols</short>
<long>Additional Safe Protocols</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/general/trusted_URIs</key>
<applyto>/apps/firefox/general/trusted_URIs</applyto>
<owner>firefox</owner>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>List of URIs for which Kerberos/NTLM is enabled</short>
<long>A comma-separated list of URI keys, of the form
[scheme "://"] [host [":" port]], for which login should be allowed
via SPNEGO Kerberos or NTLM authentication.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/general/delegated_URIs</key>
<applyto>/apps/firefox/general/delegated_URIs</applyto>
<owner>firefox</owner>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>List of URIs for which Kerberos/NTLM delegation is enabled</short>
<long>A comma-separated list of URI keys, of the form
[scheme "://"] [host [":" port]], for which delegation should be allowed
using SPNEGO Kerberos or NTLM authentication.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/firefox/general/allowed_indirect_gnomevfs_loads</key>
<applyto>/apps/firefox/general/allowed_indirect_gnomevfs_loads</applyto>
<owner>firefox</owner>
<type>string</type>
<default>""</default>
<locale name="C">
<short>A list of protocols, handled by gnome-vfs, that are permitted</short>
<long>A comma-separated list of protocols, handled by
gnome-vfs and of the form [scheme "://"], whose loads are
allowed.</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:855964956f25f94824942c6b8e8e71efe79ba632d7477713d4384ee0af09df8f
size 42958955

3
l10n-4.99.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:879a144c7edd0481109fb3b4dd9ff268caceca8777c2ef256200f1e9f84ebe40
size 37818146

1333
mozilla-cairo-lcd.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent e36e1a20cb5e1ba0e4bc3facac58029544d92e0a
Bug 631155 - undefined return value in function '_cairo_surface_wrapper_flush'
diff --git a/gfx/cairo/cairo/src/cairo-surface-wrapper.c b/gfx/cairo/cairo/src/cairo-surface-wrapper.c
--- a/gfx/cairo/cairo/src/cairo-surface-wrapper.c
+++ b/gfx/cairo/cairo/src/cairo-surface-wrapper.c
@@ -526,9 +526,12 @@ _cairo_surface_wrapper_fini (cairo_surfa
}
cairo_status_t
_cairo_surface_wrapper_flush (cairo_surface_wrapper_t *wrapper)
{
if (wrapper->target->backend->flush) {
return wrapper->target->backend->flush(wrapper->target);
}
+
+ // this is preliminary to cool down gcc and build checks
+ return CAIRO_STATUS_SUCCESS;
}

284
mozilla-gio.patch Normal file
View File

@ -0,0 +1,284 @@
# HG changeset patch
# User Chris Coulson
# Parent 0ebe30f9eacfe67fa0b699457e524d5a9c96359e
Bug 611953 - GNOME 3.0 readiness (patch 2 + 3)
diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp
--- a/toolkit/system/gnome/nsGIOService.cpp
+++ b/toolkit/system/gnome/nsGIOService.cpp
@@ -101,25 +101,25 @@ nsGIOMimeApp::GetName(nsACString& aName)
return NS_OK;
}
NS_IMETHODIMP
nsGIOMimeApp::GetCommand(nsACString& aCommand)
{
get_commandline_t g_app_info_get_commandline_ptr;
- void *libHandle = dlopen("libgio-2.0.so", RTLD_LAZY);
+ void *libHandle = dlopen("libgio-2.0.so.0", RTLD_LAZY);
if (!libHandle) {
return NS_ERROR_FAILURE;
}
dlerror(); /* clear any existing error */
g_app_info_get_commandline_ptr =
(get_commandline_t) dlsym(libHandle, "g_app_info_get_commandline");
- if (dlerror() != NULL) {
- const char cmd = *g_app_info_get_commandline_ptr(mApp);
+ if (dlerror() == NULL) {
+ const char *cmd = g_app_info_get_commandline_ptr(mApp);
if (!cmd) {
dlclose(libHandle);
return NS_ERROR_FAILURE;
}
aCommand.Assign(cmd);
}
dlclose(libHandle);
return NS_OK;
@@ -277,16 +277,43 @@ nsGIOMimeApp::SetAsDefaultForFileExtensi
} else {
*ext_pos = '\0';
}
}
g_free(extensions);
return NS_OK;
}
+/**
+ * Set default application for URI's of a particular scheme
+ * @param aURIScheme string containing the URI scheme
+ * @return NS_OK when application was set as default for URI scheme,
+ * NS_ERROR_FAILURE otherwise
+ */
+NS_IMETHODIMP
+nsGIOMimeApp::SetAsDefaultForURIScheme(nsACString const& aURIScheme)
+{
+ GError *error = NULL;
+ nsCAutoString contentType("x-scheme-handler/");
+ contentType.Append(aURIScheme);
+
+ g_app_info_set_as_default_for_type(mApp,
+ contentType.get(),
+ &error);
+ if (error) {
+ g_warning("Cannot set application as default for URI scheme (%s): %s",
+ PromiseFlatCString(aURIScheme).get(),
+ error->message);
+ g_error_free(error);
+ return NS_ERROR_FAILURE;
+ }
+
+ return NS_OK;
+}
+
nsresult
nsGIOService::Init()
{
// do nothing, gvfs/gio does not init.
return NS_OK;
}
NS_IMPL_ISUPPORTS1(nsGIOService, nsIGIOService)
@@ -317,29 +344,45 @@ nsGIOService::GetMimeTypeFromExtension(c
g_free(mime_type);
g_free(content_type);
return NS_OK;
}
// used in nsGNOMERegistry
// -----------------------------------------------------------------------------
NS_IMETHODIMP
+nsGIOService::GetAppForURIScheme(const nsACString& aURIScheme,
+ nsIGIOMimeApp** aApp)
+{
+ *aApp = nsnull;
+
+ GAppInfo *app_info = g_app_info_get_default_for_uri_scheme(
+ PromiseFlatCString(aURIScheme).get());
+ if (app_info) {
+ nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info);
+ NS_ADDREF(*aApp = mozApp);
+ } else {
+ return NS_ERROR_FAILURE;
+ }
+ return NS_OK;
+}
+
+NS_IMETHODIMP
nsGIOService::GetAppForMimeType(const nsACString& aMimeType,
nsIGIOMimeApp** aApp)
{
*aApp = nsnull;
char *content_type =
get_content_type_from_mime_type(PromiseFlatCString(aMimeType).get());
if (!content_type)
return NS_ERROR_FAILURE;
GAppInfo *app_info = g_app_info_get_default_for_type(content_type, false);
if (app_info) {
nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info);
- NS_ENSURE_TRUE(mozApp, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aApp = mozApp);
} else {
g_free(content_type);
return NS_ERROR_FAILURE;
}
g_free(content_type);
return NS_OK;
}
@@ -414,75 +457,46 @@ nsGIOService::CreateAppFromCommand(nsACS
nsIGIOMimeApp** appInfo)
{
GError *error = NULL;
*appInfo = nsnull;
GAppInfo *app_info = NULL, *app_info_from_list = NULL;
GList *apps = g_app_info_get_all();
GList *apps_p = apps;
- get_commandline_t g_app_info_get_commandline_ptr;
-
- void *libHandle = dlopen("libgio-2.0.so", RTLD_LAZY);
- if (!libHandle) {
- return NS_ERROR_FAILURE;
- }
- dlerror(); /* clear any existing error */
- g_app_info_get_commandline_ptr =
- (get_commandline_t) dlsym(libHandle, "g_app_info_get_commandline");
- if (dlerror() != NULL) {
- g_app_info_get_commandline_ptr = NULL;
- }
// Try to find relevant and existing GAppInfo in all installed application
+ // We do this by comparing each GAppInfo's executable with out own
while (apps_p) {
app_info_from_list = (GAppInfo*) apps_p->data;
- /* This is a silly test. It just compares app names but not
- * commands. This is due to old version of Glib/Gio. The required
- * function which allows to do a regular check of existence of desktop file
- * is possible by using function g_app_info_get_commandline. This function
- * has been introduced in Glib 2.20. */
- if (app_info_from_list && strcmp(g_app_info_get_name(app_info_from_list),
- PromiseFlatCString(appName).get()) == 0 )
- {
- if (g_app_info_get_commandline_ptr)
- {
- /* Following test is only possible with Glib >= 2.20.
- * Compare path only by using strncmp */
- if (strncmp(g_app_info_get_commandline_ptr(app_info_from_list),
- PromiseFlatCString(cmd).get(),
- strlen(PromiseFlatCString(cmd).get())) == 0)
- {
- app_info = app_info_from_list;
- break;
- } else {
- g_object_unref(app_info_from_list);
- }
- } else {
+ if (!app_info) {
+ // If the executable is not absolute, get it's full path
+ char *executable = g_find_program_in_path(g_app_info_get_executable(app_info_from_list));
+
+ if (executable && strcmp(executable, PromiseFlatCString(cmd).get()) == 0) {
+ g_object_ref (app_info_from_list);
app_info = app_info_from_list;
- break;
}
- } else {
- g_object_unref(app_info_from_list);
+ g_free(executable);
}
+
+ g_object_unref(app_info_from_list);
apps_p = apps_p->next;
}
g_list_free(apps);
if (!app_info) {
app_info = g_app_info_create_from_commandline(PromiseFlatCString(cmd).get(),
PromiseFlatCString(appName).get(),
G_APP_INFO_CREATE_SUPPORTS_URIS,
&error);
}
if (!app_info) {
g_warning("Cannot create application info from command: %s", error->message);
g_error_free(error);
- dlclose(libHandle);
return NS_ERROR_FAILURE;
}
nsGIOMimeApp *mozApp = new nsGIOMimeApp(app_info);
NS_ENSURE_TRUE(mozApp, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*appInfo = mozApp);
- dlclose(libHandle);
return NS_OK;
}
diff --git a/xpcom/system/nsIGIOService.idl b/xpcom/system/nsIGIOService.idl
--- a/xpcom/system/nsIGIOService.idl
+++ b/xpcom/system/nsIGIOService.idl
@@ -39,17 +39,17 @@
#include "nsISupports.idl"
interface nsIUTF8StringEnumerator;
interface nsIURI;
/* nsIGIOMimeApp holds information about an application that is looked up
with nsIGIOService::GetAppForMimeType. */
-// 66009894-9877-405b-9321-bf30420e34e6 prev uuid
+// e77021b4-4012-407d-b686-7a1f18050109 prev uuid
[scriptable, uuid(e77021b4-4012-407d-b686-7a1f18050109)]
interface nsIGIOMimeApp : nsISupports
{
const long EXPECTS_URIS = 0;
const long EXPECTS_PATHS = 1;
const long EXPECTS_URIS_FOR_NON_FILES = 2;
@@ -57,41 +57,45 @@ interface nsIGIOMimeApp : nsISupports
readonly attribute AUTF8String name;
readonly attribute AUTF8String command;
readonly attribute long expectsURIs; // see constants above
readonly attribute nsIUTF8StringEnumerator supportedURISchemes;
void launch(in AUTF8String uri);
void setAsDefaultForMimeType(in AUTF8String mimeType);
void setAsDefaultForFileExtensions(in AUTF8String extensions);
+ void setAsDefaultForURIScheme(in AUTF8String uriScheme);
};
/*
* The VFS service makes use of two distinct registries.
*
* The application registry holds information about applications (uniquely
* identified by id), such as which MIME types and URI schemes they are
* capable of handling, whether they run in a terminal, etc.
*
* The MIME registry holds information about MIME types, such as which
* extensions map to a given MIME type. The MIME registry also stores the
* id of the application selected to handle each MIME type.
*/
-// prev id dea20bf0-4e4d-48c5-b932-dc3e116dc64b
-[scriptable, uuid(47e372c2-78bb-4899-8114-56aa7d9cdac5)]
+// prev id 47e372c2-78bb-4899-8114-56aa7d9cdac5
+[scriptable, uuid(74ca8791-330d-4786-9569-2a2a19f0b486)]
interface nsIGIOService : nsISupports
{
/*** MIME registry methods ***/
/* Obtain the MIME type registered for an extension. The extension
should not include a leading dot. */
AUTF8String getMimeTypeFromExtension(in AUTF8String extension);
+ /* Obtain the preferred application for opening a given URI scheme */
+ nsIGIOMimeApp getAppForURIScheme(in AUTF8String aURIScheme);
+
/* Obtain the preferred application for opening a given MIME type */
nsIGIOMimeApp getAppForMimeType(in AUTF8String mimeType);
/* Obtain the preferred application for opening a given MIME type */
nsIGIOMimeApp createAppFromCommand(in AUTF8String cmd,
in AUTF8String appName);
/* Obtain a description for the given MIME type */

3776
mozilla-kde.patch Normal file

File diff suppressed because it is too large Load Diff

48
mozilla-language.patch Normal file
View File

@ -0,0 +1,48 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent db620d83124746201970dcf50c661957df979eca
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
@@ -181,16 +181,17 @@ nsLocaleService::nsLocaleService(void)
}
#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
for( i = 0; i < LocaleListLength; i++ ) {
nsresult result;
// setlocale( , "") evaluates LC_* and LANG
char* lc_temp = setlocale(posix_locale_category[i], "");
CopyASCIItoUTF16(LocaleList[i], category);
category_platform = category;
@@ -206,16 +207,21 @@ nsLocaleService::nsLocaleService(void)
else {
CopyASCIItoUTF16(lang, platformLocale);
result = posixConverter->GetXPLocale(lang, xpLocale);
}
}
if (NS_FAILED(result)) {
return;
}
+ // LANGUAGE is overriding LC_MESSAGES
+ if (i == LC_MESSAGES && language && *language) {
+ CopyASCIItoUTF16(language, platformLocale);
+ result = posixConverter->GetXPLocale(language, xpLocale);
+ }
resultLocale->AddCategory(category, xpLocale);
resultLocale->AddCategory(category_platform, platformLocale);
}
mSystemLocale = do_QueryInterface(resultLocale);
mApplicationLocale = do_QueryInterface(resultLocale);
} // if ( NS_SUCCEEDED )...
#endif // XP_UNIX

View File

@ -0,0 +1,31 @@
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 -u -p -6 -r1.1 nsUnixSystemProxySettings.cpp
--- toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 29 Jan 2008 15:58:41 -0000 1.1
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 17 Apr 2008 19:02:19 -0000
@@ -69,13 +69,19 @@ private:
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
nsresult
nsUnixSystemProxySettings::Init()
{
- mGConf = do_GetService(NS_GCONFSERVICE_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);
+ }
return NS_OK;
}
PRBool
nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
{

View File

@ -0,0 +1,27 @@
# HG changeset patch
# User Petr Cerny <pcerny@novell.com>
# Parent 971259052418fda3b7fc81da75be4557ea5d82bc
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
};
PRBool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD);
if (!isOK)

222
mozilla-ppc-ipc.patch Normal file
View File

@ -0,0 +1,222 @@
# HG changeset patch
# Parent f6996f95c7f8007fd7bf759092488ead6843441a
Bug 587188 - Failed to build firefox from trunk on PPC (fixed m-c)
diff --git a/ipc/chromium/Makefile.in b/ipc/chromium/Makefile.in
--- a/ipc/chromium/Makefile.in
+++ b/ipc/chromium/Makefile.in
@@ -241,17 +241,16 @@ CPPSRCS += \
endif # } OS_MACOSX
ifdef OS_LINUX # {
CPPSRCS += \
atomicops_internals_x86_gcc.cc \
base_paths_linux.cc \
- data_pack.cc \
file_util_linux.cc \
file_version_info_linux.cc \
idle_timer_none.cc \
process_util_linux.cc \
time_posix.cc \
$(NULL)
ifdef MOZ_ENABLE_GTK2
diff --git a/ipc/chromium/src/base/atomicops.h b/ipc/chromium/src/base/atomicops.h
--- a/ipc/chromium/src/base/atomicops.h
+++ b/ipc/chromium/src/base/atomicops.h
@@ -127,13 +127,15 @@ Atomic64 Release_Load(volatile const Ato
#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_msvc.h"
#elif defined(OS_MACOSX) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_macosx.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_gcc.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)
#include "base/atomicops_internals_arm_gcc.h"
+//#elif defined(COMPILER_GCC) && defined(ARCH_CPU_PPC_FAMILY)
+//#include "base/atomicops_internals_ppc_gcc.h"
#else
#include "base/atomicops_internals_mutex.h"
#endif
#endif // BASE_ATOMICOPS_H_
diff --git a/ipc/chromium/src/base/atomicops_internals_ppc_gcc.h b/ipc/chromium/src/base/atomicops_internals_ppc_gcc.h
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_internals_ppc_gcc.h
@@ -0,0 +1,148 @@
+// Copyright (c) 2010 JJDaNiMoTh <jjdanimoth@gmail.com>. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_PPC_GCC_H_
+#define BASE_ATOMICOPS_INTERNALS_PPC_GCC_H_
+#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory")
+
+#define PPC_ACQUIRE_BARRIER "\nisync\n"
+#define PPC_RELEASE_BARRIER "\nlwsync\n"
+
+namespace base {
+namespace subtle {
+
+// 32-bit low-level operations on any platform.
+
+/*
+ * Compare and exchange - if *ptr == old, set it to new,
+ * and return the old value of *p.
+ */
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 prev;
+
+ __asm__ __volatile__ (
+ "1: lwarx %0,0,%2\n"
+ "cmpw 0,%0,%3\n"
+ "bne- 2f\n"
+ "stwcx. %4,0,%2\n"
+ "bne- 1b\n"
+ "2:\n"
+ : "=&r" (prev), "+m" (*ptr)
+ : "r" (ptr), "r" (old_value), "r" (new_value)
+ : "cc", "memory");
+
+ return prev;
+}
+
+/*
+* Atomic exchange
+*
+* Changes the memory location '*ptr' to be new_value and returns
+* the previous value stored there.
+*/
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
+ Atomic32 prev;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%2 \n"
+" stwcx. %3,0,%2 \n\
+ bne- 1b"
+ : "=&r" (prev), "+m" (*ptr)
+ : "r" (ptr), "r" (new_value)
+ : "cc", "memory");
+
+ return prev;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ Atomic32 temp;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%2\n\
+ add %0,%1,%0\n"
+" stwcx. %0,0,%2 \n\
+ bne- 1b"
+ : "=&r" (temp)
+ : "r" (increment), "r" (ptr)
+ : "cc", "memory");
+
+ return temp;
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ Atomic32 temp;
+
+ __asm__ __volatile__(
+ PPC_RELEASE_BARRIER
+"1: lwarx %0,0,%2\n\
+ add %0,%1,%0\n"
+" stwcx. %0,0,%2 \n\
+ bne- 1b"
+ PPC_ACQUIRE_BARRIER
+ : "=&r" (temp)
+ : "r" (increment), "r" (ptr)
+ : "cc", "memory");
+
+ return temp;
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+}
+
+inline void MemoryBarrier() {
+ __asm__ __volatile__("sync" : : : "memory");
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+ MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+ MemoryBarrier();
+ *ptr = value;
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+ return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+ Atomic32 value = *ptr;
+ MemoryBarrier();
+ return value;
+
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+ MemoryBarrier();
+ return *ptr;
+}
+
+} // namespace base::subtle
+} // namespace base
+
+#undef ATOMICOPS_COMPILER_BARRIER
+
+#endif // BASE_ATOMICOPS_INTERNALS_PPC_GCC_H_
diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h
--- a/ipc/chromium/src/build/build_config.h
+++ b/ipc/chromium/src/build/build_config.h
@@ -52,19 +52,20 @@
#define ARCH_CPU_X86_FAMILY 1
#define ARCH_CPU_X86 1
#define ARCH_CPU_32_BITS 1
#elif defined(__ARMEL__)
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
#define WCHAR_T_IS_UNSIGNED 1
-#elif defined(__ppc__)
+#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__)
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
+#define ARCH_CPU_PPC_FAMILY 1
#else
#error Please add support for your architecture in build/build_config.h
#endif
// Type detection for wchar_t.
#ifndef CHROMIUM_MOZILLA_BUILD
#if defined(OS_WIN)

View File

@ -0,0 +1,54 @@
From: Ubuntu
Subject: introduce a pref to prefer certain plugins for mime-types
diff --git a/modules/plugin/base/src/nsPluginHost.cpp b/modules/plugin/base/src/nsPluginHost.cpp
--- a/modules/plugin/base/src/nsPluginHost.cpp
+++ b/modules/plugin/base/src/nsPluginHost.cpp
@@ -1620,17 +1620,47 @@ nsPluginHost::FindPluginForType(const ch
nsPluginTag *plugins = nsnull;
PRInt32 variants, cnt;
LoadPlugins();
// if we have a mimetype passed in, search the mPlugins
// linked list for a match
if (aMimeType) {
+ 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;
+
plugins = mPlugins;
+ if(preferredPluginPath) {
+ while (nsnull != plugins) {
+ if (0 == PL_strcasecmp(plugins->mFileName.get(), preferredPluginPath) ||
+ 0 == PL_strcasecmp(plugins->mFullPath.get(), preferredPluginPath)) {
+ return plugins;
+ }
+ plugins = plugins->mNext;
+ }
+
+ // now lets search for substrings
+ plugins=mPlugins;
+ while (nsnull != plugins) {
+ if (nsnull != PL_strstr(plugins->mFileName.get(), preferredPluginPath) ||
+ nsnull != PL_strstr(plugins->mFullPath.get(), preferredPluginPath)) {
+ return plugins;
+ }
+ plugins = plugins->mNext;
+ }
+ }
while (plugins) {
variants = plugins->mVariants;
for (cnt = 0; cnt < variants; cnt++) {
if ((!aCheckEnabled || plugins->IsEnabled()) &&
plugins->mMimeTypeArray[cnt] &&
(0 == PL_strcasecmp(plugins->mMimeTypeArray[cnt], aMimeType))) {
return plugins;

176
mozilla-shared-nss-db.patch Normal file
View File

@ -0,0 +1,176 @@
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/config/autoconf.mk.in b/config/autoconf.mk.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -571,16 +571,20 @@ MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
LIBIDL_CFLAGS = @LIBIDL_CFLAGS@
LIBIDL_LIBS = @LIBIDL_LIBS@
STATIC_LIBIDL = @STATIC_LIBIDL@
+MOZ_ENABLE_NSSHELPER = @MOZ_ENABLE_NSSHELPER@
+NSSHELPER_CFLAGS = @NSSHELPER_CFLAGS@
+NSSHELPER_LIBS = @NSSHELPER_LIBS@
+
MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
export CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@
MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
COMPILER_DEPEND = @COMPILER_DEPEND@
MDDEPDIR := @MDDEPDIR@
CC_WRAPPER = @CC_WRAPPER@
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -8610,16 +8610,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 OTS
dnl ========================================================
MOZ_OTS_LIBS='$(DEPTH)/gfx/ots/src/$(LIB_PREFIX)mozots.$(LIB_SUFFIX)'
AC_SUBST(MOZ_OTS_LIBS)
dnl ========================================================
dnl disable xul
dnl ========================================================
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
@@ -117,19 +117,20 @@ CSRCS += md4.c
EXTRA_DEPS = $(NSS_DEP_LIBS)
DEFINES += -DNSS_ENABLE_ECC
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
-LOCAL_INCLUDES += $(NSS_CFLAGS)
+LOCAL_INCLUDES += $(NSS_CFLAGS) $(NSSHELPER_CFLAGS)
EXTRA_DSO_LDOPTS += \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
+ $(NSSHELPER_LIBS) \
$(NSS_LIBS) \
$(NULL)
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
@@ -39,16 +39,23 @@
* 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 ***** */
+#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 "nsSSLThread.h"
#include "nsCertVerificationThread.h"
#include "nsNetUtil.h"
#include "nsAppDirectoryServiceDefs.h"
@@ -1658,18 +1665,34 @@ nsNSSComponent::InitializeNSS(PRBool sho
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".
PRUint32 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_XRE_NO_NSSHELPER")) {
+ init_rv = ::NSS_Initialize(profileStr.get(), "", "",
+ SECMOD_DB, init_flags);
+ } else {
+ init_rv = ::nsshelp_open_db ("mozilla-xul", 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
@@ -169,17 +169,17 @@ ifndef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
$(NULL)
endif
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 QuickTime \
-framework IOKit \
-lcrypto \

View File

@ -57,7 +57,7 @@ cmdname=`basename $0`
MOZ_DIST_BIN="%PREFIX"
MOZ_DIST_LIB="%PROGDIR"
MOZ_APPNAME="%APPNAME"
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME"
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME-bin"
MOZ_APP_LAUNCHER="$MOZ_DIST_LIB/$MOZ_APPNAME.sh"
if [ "$0" = "$MOZ_APP_LAUNCHER" ]; then
@ -79,6 +79,11 @@ 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
# ignore composite extension (needed for Flash)
export XLIB_SKIP_ARGB_VISUALS=1

View File

@ -15,9 +15,9 @@ diff --git a/browser/components/preferences/main.js b/browser/components/prefere
iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1));
} else {
// 'Desktop'
diff --git a/toolkit/components/downloads/src/nsDownloadManager.cpp b/toolkit/components/downloads/src/nsDownloadManager.cpp
--- a/toolkit/components/downloads/src/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/src/nsDownloadManager.cpp
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