debian/0000775000000000000000000000000012321600551007163 5ustar debian/vendor-firefox.js0000664000000000000000000000057612321600535012470 0ustar // Disable default browser checking. pref("browser.shell.checkDefaultBrowser", false); // Don't disable extensions dropped in to a system // location, or those owned by the application pref("extensions.autoDisableScopes", 3); // Don't display the one-off addon selection dialog when // upgrading from a version of Firefox older than 8.0 pref("extensions.shownSelectionUI", true); debian/firefox.manpages.in0000664000000000000000000000003012321600535012742 0ustar debian/@MOZ_APP_NAME@.1 debian/README.source0000664000000000000000000000076312321600535011352 0ustar 1) Even though we are using source format 3.0 (quilt), we don't build or extract the source packages with patches applied. This is because we preprocess the series file to allow for per-arch and per-release patchsets, from a single packaging branch 2) To create the fully patched source, just run "debian/rules apply-patches" in the source directory 3) To remove any changes applied to the packaging, run "fakeroot debian/rules clean". This will remove all patches and delete auto-generated files debian/rules0000775000000000000000000000750112321600535010250 0ustar #!/usr/bin/make -f MOZ_PKG_BASENAME := firefox include $(CURDIR)/debian/build/config.mk MOZ_APP := browser MOZ_VENDOR := Mozilla MOZ_MOZDIR := MOZ_APP_SUBDIR := browser MOZ_BRANDING := $(CHANNEL) ifneq (,$(filter release beta, $(MOZ_BRANDING))) MOZ_BRANDING := official endif ifeq (1,$(MOZ_FORCE_UNOFFICIAL_BRANDING)) ifneq (,$(filter official aurora, $(MOZ_BRANDING))) MOZ_BRANDING := unofficial endif endif MOZ_BRANDING_DIR := $(MOZ_APP)/branding/$(MOZ_BRANDING) ifeq (official,$(BRANDING)) MOZ_BRANDING_OPTION := --enable-official-branding else MOZ_BRANDING_OPTION := --with-branding=$(MOZ_BRANDING_DIR) endif MOZ_PKGNAME_SUBST_FILES = \ debian/usr.bin.$(MOZ_PKG_NAME) \ debian/README.Debian \ debian/$(MOZ_PKG_NAME)-locale.preinst \ debian/$(MOZ_PKG_BASENAME).sh \ debian/apport/blacklist \ debian/apport/native-origins \ debian/apport/source_$(MOZ_PKG_NAME).py \ debian/testing/run_mochitest \ debian/testing/run_reftest \ $(NULL) MOZ_APPNAME_SUBST_FILES = \ debian/$(MOZ_APP_NAME).1 \ $(NULL) MOZ_PKGCONFIG_FILES = \ debian/pkgconfig/mozilla-plugin.pc \ $(NULL) include $(CURDIR)/debian/build/rules.mk MOZ_EXECUTABLES_$(MOZ_PKG_NAME)-testsuite = $(MOZ_LIBDIR)/testing/run_mochitest \ $(MOZ_LIBDIR)/testing/run_reftest \ $(MOZ_LIBDIR)/testing/run_xpcshell_tests \ $(MOZ_LIBDIR)/xpcshell \ $(MOZ_LIBDIR)/testing/filter_results \ $(NULL) debian/usr.bin.firefox.in: if [ '$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)' -ge '1310' ]; then \ cp $(CURDIR)/debian/usr.bin.firefox.apparmor.13.10 $(CURDIR)/debian/usr.bin.firefox.in ; \ else \ cp $(CURDIR)/debian/usr.bin.firefox.apparmor.12.04 $(CURDIR)/debian/usr.bin.firefox.in ; \ fi ifeq (firefox, $(MOZ_APP_NAME)) ifneq (,$(filter precise, $(DISTRIB_CODENAME))) PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu1), adobe-flashplugin (<= 11.1.102.63-0precise1) PLUGIN_CONFLICTS := gcu-plugin (<= 0.12.10-1ubuntu1) endif endif WRITE_SUBSTVARS = $(shell echo "$(2)=$(3)" | sed 's/[ \t\n]\+/ /g' >> debian/$(1).substvars) ifeq (firefox, $(MOZ_PKG_NAME)) ifeq (,$(filter precise, $(DISTRIB_CODENAME))) install/firefox:: $(call WRITE_SUBSTVARS,firefox,transitional:Replaces,kubuntu-firefox-installer) else FIREFOX_REPLACES = abrowser, abrowser-branding, firefox-branding, kubuntu-firefox-installer FIREFOX_BREAKS = abrowser (<= 4.0~b11+build3+nobinonly-0ubuntu1), abrowser-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), \ firefox-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), $(PLUGIN_BREAKS) install/firefox:: $(call WRITE_SUBSTVARS,firefox,transitional:Replaces,$(FIREFOX_REPLACES)) $(call WRITE_SUBSTVARS,firefox,transitional:Breaks,$(FIREFOX_BREAKS)) $(call WRITE_SUBSTVARS,firefox,transitional:Conflicts,$(PLUGIN_CONFLICTS)) endif endif $(patsubst %,binary-post-install/%,$(MOZ_LOCALE_PKGS)) :: binary-post-install/%: $(foreach xpi,$($(notdir $(wildcard debian/$*/$(MOZ_ADDONDIR)/extensions/*.xpi))), \ dh_link -p$* $(MOZ_ADDONDIR)/extensions/$(xpi) $(MOZ_LIBDIR)/webapprt/extensions/$(xpi);) make-langpack-preinsts:: $(foreach langpack,$(MOZ_LOCALE_PKGS),debian/$(langpack).preinst) $(patsubst %,debian/%.preinst,$(MOZ_LOCALE_PKGS)) :: debian/%.preinst : debian/$(MOZ_PKG_NAME)-locale.preinst cp $< $@ pre-build:: make-langpack-preinsts monkey-patch-upstream-files:: ifneq ($(MOZ_APP_BASENAME),$(MOZ_DEFAULT_APP_BASENAME)) @echo "Setting MOZ_APP_UA_NAME to $(MOZ_DEFAULT_APP_BASENAME)" $(call moz_monkey_patch_file,$(DEB_SRCDIR)/$(MOZ_BRANDING_DIR)/configure.sh, \ echo "MOZ_APP_UA_NAME=$(MOZ_DEFAULT_APP_BASENAME)" >>) @echo "Setting UAName to $(MOZ_DEFAULT_APP_BASENAME)" $(call moz_monkey_patch_file,$(DEB_SRCDIR)/webapprt/application.ini.in, \ sed -ri 's/@MOZ_APP_BASENAME@/$(MOZ_DEFAULT_APP_BASENAME)/g') endif clean:: rm -f debian/$(MOZ_PKG_NAME)-locale-*.preinst rm -f debian/usr.bin.firefox.in .PHONY: make-langpack-preinsts debian/firefox.postrm.in0000664000000000000000000000410212321600535012477 0ustar #!/bin/sh set -e MOZ_PKG_NAME=@MOZ_PKG_NAME@ abort_mv_conffile() { local CONFFILE="$1" if [ -e "$CONFFILE.dpkg-remove" ]; then echo "Reinstalling $CONFFILE that was moved away" mv "$CONFFILE.dpkg-remove" "$CONFFILE" fi } abort_rm_conffile() { local CONFFILE="$1" if [ -e "$CONFFILE.dpkg-remove" ]; then echo "Reinstalling $CONFFILE that was moved away" mv "$CONFFILE.dpkg-remove" "$CONFFILE" fi if [ -e "$CONFFILE.dpkg-backup" ]; then echo "Reinstalling $CONFFILE that was backupped" mv "$CONFFILE.dpkg-backup" "$CONFFILE" fi } purge_conffile() { local CONFFILE="$1" rm -f "$CONFFILE.dpkg-bak" "$CONFFILE.dpkg-remove" "$CONFFILE.dpkg-backup" || true } if [ "$1" = "purge" ]; then APP_PROFILE="usr.bin.@MOZ_PKG_NAME@" rm -f /etc/apparmor.d/force-complain/$APP_PROFILE || true rm -f /etc/apparmor.d/disable/$APP_PROFILE || true rm -f /etc/apparmor.d/local/$APP_PROFILE || true rm -f "/etc/apparmor.d/abstractions/ubuntu-browsers.d/@MOZ_PKG_NAME@" || true rmdir /etc/apparmor.d/local 2>/dev/null || true purge_conffile "/etc/${MOZ_PKG_NAME}/profile/bookmarks.html" purge_conffile "/etc/${MOZ_PKG_NAME}/profile/localstore.rdf" purge_conffile "/etc/${MOZ_PKG_NAME}/profile/mimeTypes.rdf" purge_conffile "/etc/${MOZ_PKG_NAME}/profile/prefs.js" purge_conffile "/etc/${MOZ_PKG_NAME}/profile/chrome/userChrome-example.css" purge_conffile "/etc/${MOZ_PKG_NAME}/profile/chrome/userContent-example.css" fi if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ] ; then abort_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/bookmarks.html" abort_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/localstore.rdf" abort_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/mimeTypes.rdf" abort_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/prefs.js" abort_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/chrome/userChrome-example.css" abort_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/chrome/userContent-example.css" abort_mv_conffile "/etc/${MOZ_PKG_NAME}/pref/firefox.js" fi #DEBHELPER# debian/README.Debian.in0000664000000000000000000000122512321600535011633 0ustar Apparmor Profile ---------------- If your system uses AppArmor, please note that the shipped profile is disabled by default. The profile can be enabled by performing: $ sudo aa-enforce /etc/apparmor.d/usr.bin.@MOZ_PKG_NAME@ The profile can be disabled by performing: $ sudo aparmor_parser -R /etc/apparmor.d/usr.bin.@MOZ_PKG_NAME@ $ sudo ln -s /etc/apparmor.d/usr.bin.@MOZ_PKG_NAME@ /etc/apparmor.d/disable/usr.bin.@MOZ_PKG_NAME@ This profile should work without modification for most plugins available in Ubuntu, but may require adjusting for your environment. Please see https://wiki.ubuntu.com/DebuggingApparmor before filing a bug against this software. debian/firefox-dev.install.in0000664000000000000000000000031612321600535013400 0ustar %%if DISTRIB_VERSION >= 1210 @MOZ_INCDIR@/np*.h %%else @MOZ_INCDIR@ @MOZ_IDLDIR@ @MOZ_SDKDIR@/sdk/lib/*.a @MOZ_SDKDIR@/*.h @MOZ_SDKDIR@/sdk/bin %%endif debian/pkgconfig/mozilla-plugin.pc usr/lib/pkgconfig debian/copyright0000664000000000000000000010423712321600535011127 0ustar This package was debianized by Eric Dorland on Thu, 05 Jun 2003 01:01:22 -0400 It was downloaded from http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ The source tarball is an aggregate of several different works in which the main one, developed by the Mozilla Project, is firefox. Other works include gzip, bzip2, sqlite, libjpeg, libpng, cairo, and others. Please see the sections following the copyright statements for firefox for these. === firefox Overall, the firefox project is licensed under the terms of the Mozilla Public License version 1.1 or, at your option, under the terms of the GNU eneral Public License version 2 or subsequent, or the terms of the GNU Lesser General Public License version 2.1 or subsequent. On Debian systems, the complete text of the GNU General Public License can be found in the file `/usr/share/common-licenses/GPL-2' ; the complete text of the GNU Lesser General Public License can be found in the file `/usr/share/common-licenses/LGPL-2.1'. The complete text of the Mozilla Public License can be found in the MPL file in the same directory as this file. Some files may still contain licensing notices claiming licensing under other combinations of NPL, MPL, GPL and LGPL. They are files that were missed by the upstream relicensing script, but all the permissions required for relicensing were indeed provided. The file db/mork/src/morkQuickSort.cpp is licensed under the following terms: Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The embedding/qa/mozembed/public/nsIQABrowserUIGlue.idl file and the files under the embedding/tests directory are licensed under the following terms: Copyright (c) 2002 Netscape Communications Corporation and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this Mozilla sample software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The modules/plugin/base/public/npruntime.h file is licensed under the following terms: Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla Foundation ("Mozilla") nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The toolkit/mozapps/update/src/updater/bspatch.cpp and toolkit/mozapps/update/src/updater/bspatch.h files are licensed under the following terms: Copyright 2003,2004 Colin Percival All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted providing that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Some but not all the files in netwerk/dns/src/ are licensed under the following terms: Copyright (c) 2001,2002 Japan Network Information Center. All rights reserved. By using this file, you agree to the terms and conditions set forth bellow. LICENSE TERMS AND CONDITIONS The following License Terms and Conditions apply, unless a different license is obtained from Japan Network Information Center ("JPNIC"), a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, Chiyoda-ku, Tokyo 101-0047, Japan. 1. Use, Modification and Redistribution (including distribution of any modified or derived work) in source and/or binary forms is permitted under this License Terms and Conditions. 2. Redistribution of source code must retain the copyright notices as they appear in each source code file, this License Terms and Conditions. 3. Redistribution in binary form must reproduce the Copyright Notice, this License Terms and Conditions, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." 4. The name of JPNIC may not be used to endorse or promote products derived from this Software without specific prior written approval of JPNIC. 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Some files in plugin/oji/JEP/ are licensed under the following terms: Copyright (c) 2004, Steven Michaud, All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The extensions/auth/gssapi.h file is licensed under the following terms: Copyright 1993 by OpenVision Technologies, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of OpenVision not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. OpenVision makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. The gfx/src/xlib/xregion.h and gfx/src/gtk/xregion.h are licensed under the following terms: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. === sqlite The db/sqlite3 directory contains a copy of sqlite with the following licensing terms: The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: May you do good and not evil. May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give. === dbm The dbm directory, except some files added by the mozilla project, is licensed under the following terms: Copyright (c) 1991, 1993, 1994 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. === myspell The extensions/spellcheck/myspell directory is licensed under the following terms: Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada And Contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All modifications to the source code must be clearly marked as such. Binary redistributions based on modified source code must be clearly marked as modified versions in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. === boehm The gc/boehm directory, except the files listed under the xulrunner section, is licensed under the following terms: Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. Copyright (c) 1996-1998 by Silicon Graphics. All rights reserved. THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. Permission is hereby granted to use or copy this program for any purpose, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. === cairo The gfx/cairo/cairo directory is licensed under the following terms: Copyright (c) 2003 University of Southern California Copyright (c) 1999 Tom Tromey Copyright (c) 2002, 2003 University of Southern California Copyright (c) 2004 Calum Robinson Copyright (c) 2004 David Reveman Copyright (c) 2000, 2002, 2004 Keith Packard Copyright (c) 2004, 2005 Red Hat, Inc Cairo is free software and is available to be redistributed and/or modified under the terms of either the GNU Lesser General Public License (LGPL) version 2.1 or the Mozilla Public License (MPL) version 1.1. === libpixman The gfx/cairo/libpixman directory is licensed under the following terms: (from gfx/cairo/libpixman/COPYING) libpixregion Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------------------------------------------------------------- libic Copyright © 2001 Keith Packard Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Keith Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Keith Packard makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---------------------------------------------------------------------- slim slim is Copyright © 2003 Richard Henderson Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Richard Henderson not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Richard Henderson makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. RICHARD HENDERSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RICHARD HENDERSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. === libjpeg The jpeg directory, except the files under the xulrunner section, are licensed under the following terms: The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. === bzip2 The modules/libbz2/src directory is licensed under the following terms: (from modules/libbz2/src/LICENSE) This program, "bzip2", the associated library "libbzip2", and all documentation, are copyright (C) 1996-2005 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, Cambridge, UK. jseward@acm.org bzip2/libbzip2 version 1.0.3 of 15 February 2005 === libpng The directory modules/libimg/png is licensed under the following terms: (from modules/libimg/png/LICENSE) This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is included in the libpng distribution, the latter shall prevail. COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence. libpng version 1.2.6, September 12, 2004, is Copyright (c) 2004 Glenn Randers-Pehrson, and is distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors Cosmin Truta libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors Simon-Pierre Cadieux Eric S. Raymond Gilles Vollant and with the following additions to the disclaimer: There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors: Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: John Bowler Kevin Bracey Sam Bushell Magnus Holmgren Greg Roelofs Tom Tanner libpng versions 0.5, May 1995, through 0.88, January 1996, are Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals: Andreas Dilger Dave Martindale Guy Eric Schalnat Paul Schmidt Tim Wegner The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions: 1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution. The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: printf("%s",png_get_copyright(NULL)); Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp@users.sourceforge.net September 12, 2004 === zlib The directories modules/zlib/src and security/nss/cmd/zlib are licensed under the following terms: (C) 1995-2004 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu If you use the zlib library in a product, we would appreciate *not* receiving lengthy legal documents to sign. The sources are provided for free but without warranty of any kind. The library has been entirely written by Jean-loup Gailly and Mark Adler; it does not include third-party code. If you redistribute modified sources, we would appreciate that you include in the file ChangeLog history information documenting your changes. Please read the FAQ for more information on the distribution of modified source versions. === expat The directory parser/expat is licensed under the following terms: (from parser/expat/COPYING) Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper Copyright (c) 2001, 2002 Expat maintainers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/firefox.desktop.in0000664000000000000000000002531612321600535012636 0ustar [Desktop Entry] Version=1.0 %%ifdef MOZ_OFFICIAL_BRANDING Name=Firefox Web Browser Name[ar]=متصفح الويب فَيَرفُكْس Name[ast]=Restolador web Firefox Name[bn]=ফায়ারফক্স ওয়েব ব্রাউজার Name[ca]=Navegador web Firefox Name[cs]=Firefox Webový prohlížeč Name[da]=Firefox - internetbrowser Name[el]=Περιηγητής Firefox Name[es]=Navegador web Firefox Name[et]=Firefoxi veebibrauser Name[fa]=مرورگر اینترنتی Firefox Name[fi]=Firefox-selain Name[fr]=Navigateur Web Firefox Name[gl]=Navegador web Firefox Name[he]=דפדפן האינטרנט Firefox Name[hr]=Firefox web preglednik Name[hu]=Firefox webböngésző Name[it]=Firefox Browser Web Name[ja]=Firefox ウェブ・ブラウザ Name[ko]=Firefox 웹 브라우저 Name[ku]=Geroka torê Firefox Name[lt]=Firefox interneto naršyklė Name[nb]=Firefox Nettleser Name[nl]=Firefox webbrowser Name[nn]=Firefox Nettlesar Name[no]=Firefox Nettleser Name[pl]=Przeglądarka WWW Firefox Name[pt]=Firefox Navegador Web Name[pt_BR]=Navegador Web Firefox Name[ro]=Firefox – Navigator Internet Name[ru]=Веб-браузер Firefox Name[sk]=Firefox - internetový prehliadač Name[sl]=Firefox spletni brskalnik Name[sv]=Firefox webbläsare Name[tr]=Firefox Web Tarayıcısı Name[ug]=Firefox توركۆرگۈ Name[uk]=Веб-браузер Firefox Name[vi]=Trình duyệt web Firefox Name[zh_CN]=Firefox 网络浏览器 Name[zh_TW]=Firefox 網路瀏覽器 %%else Name=@MOZ_DISPLAY_NAME@ Web Browser Name[ast]=Restolador web @MOZ_DISPLAY_NAME@ Name[ca]=Navegador web @MOZ_DISPLAY_NAME@ Name[cs]=@MOZ_DISPLAY_NAME@ Webový prohlížeč Name[da]=@MOZ_DISPLAY_NAME@ - internetbrowser Name[el]=Περιηγητής @MOZ_DISPLAY_NAME@ Name[es]=Navegador web @MOZ_DISPLAY_NAME@ Name[et]=@MOZ_DISPLAY_NAME@i veebibrauser Name[fa]=مرورگر اینترنتی @MOZ_DISPLAY_NAME@ Name[fi]=@MOZ_DISPLAY_NAME@-selain Name[fr]=Navigateur Web @MOZ_DISPLAY_NAME@ Name[gl]=Navegador web @MOZ_DISPLAY_NAME@ Name[he]=דפדפן האינטרנט @MOZ_DISPLAY_NAME@ Name[hr]=@MOZ_DISPLAY_NAME@ web preglednik Name[hu]=@MOZ_DISPLAY_NAME@ webböngésző Name[it]=@MOZ_DISPLAY_NAME@ Browser Web Name[ja]=@MOZ_DISPLAY_NAME@ ウェブ・ブラウザ Name[ko]=@MOZ_DISPLAY_NAME@ 웹 브라우저 Name[ku]=Geroka torê @MOZ_DISPLAY_NAME@ Name[lt]=@MOZ_DISPLAY_NAME@ interneto naršyklė Name[nb]=@MOZ_DISPLAY_NAME@ Nettleser Name[nl]=@MOZ_DISPLAY_NAME@ webbrowser Name[nn]=@MOZ_DISPLAY_NAME@ Nettlesar Name[no]=@MOZ_DISPLAY_NAME@ Nettleser Name[pl]=Przeglądarka WWW @MOZ_DISPLAY_NAME@ Name[pt]=@MOZ_DISPLAY_NAME@ Navegador Web Name[pt_BR]=Navegador Web @MOZ_DISPLAY_NAME@ Name[ro]=@MOZ_DISPLAY_NAME@ – Navigator Internet Name[ru]=Веб-браузер @MOZ_DISPLAY_NAME@ Name[sk]=@MOZ_DISPLAY_NAME@ - internetový prehliadač Name[sl]=@MOZ_DISPLAY_NAME@ spletni brskalnik Name[sv]=@MOZ_DISPLAY_NAME@ webbläsare Name[tr]=@MOZ_DISPLAY_NAME@ Web Tarayıcısı Name[ug]=@MOZ_DISPLAY_NAME@ توركۆرگۈ Name[uk]=Веб-браузер @MOZ_DISPLAY_NAME@ Name[vi]=Trình duyệt web @MOZ_DISPLAY_NAME@ Name[zh_CN]=@MOZ_DISPLAY_NAME@ 网络浏览器 Name[zh_TW]=@MOZ_DISPLAY_NAME@ 網路瀏覽器 %%endif Comment=Browse the World Wide Web Comment[ar]=تصفح الشبكة العنكبوتية العالمية Comment[ast]=Restola pela Rede Comment[bn]=ইন্টারনেট ব্রাউজ করুন Comment[ca]=Navegueu per la web Comment[cs]=Prohlížení stránek World Wide Webu Comment[da]=Surf på internettet Comment[de]=Im Internet surfen Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) Comment[es]=Navegue por la web Comment[et]=Lehitse veebi Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید Comment[fi]=Selaa Internetin WWW-sivuja Comment[fr]=Naviguer sur le Web Comment[gl]=Navegar pola rede Comment[he]=גלישה ברחבי האינטרנט Comment[hr]=Pretražite web Comment[hu]=A világháló böngészése Comment[it]=Esplora il web Comment[ja]=ウェブを閲覧します Comment[ko]=웹을 돌아 다닙니다 Comment[ku]=Li torê bigere Comment[lt]=Naršykite internete Comment[nb]=Surf på nettet Comment[nl]=Verken het internet Comment[nn]=Surf på nettet Comment[no]=Surf på nettet Comment[pl]=Przeglądanie stron WWW Comment[pt]=Navegue na Internet Comment[pt_BR]=Navegue na Internet Comment[ro]=Navigați pe Internet Comment[ru]=Доступ в Интернет Comment[sk]=Prehliadanie internetu Comment[sl]=Brskajte po spletu Comment[sv]=Surfa på webben Comment[tr]=İnternet'te Gezinin Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ Comment[uk]=Перегляд сторінок Інтернету Comment[vi]=Để duyệt các trang web Comment[zh_CN]=浏览互联网 Comment[zh_TW]=瀏覽網際網路 GenericName=Web Browser GenericName[ar]=متصفح ويب GenericName[ast]=Restolador Web GenericName[bn]=ওয়েব ব্রাউজার GenericName[ca]=Navegador web GenericName[cs]=Webový prohlížeč GenericName[da]=Webbrowser GenericName[el]=Περιηγητής διαδικτύου GenericName[es]=Navegador web GenericName[et]=Veebibrauser GenericName[fa]=مرورگر اینترنتی GenericName[fi]=WWW-selain GenericName[fr]=Navigateur Web GenericName[gl]=Navegador Web GenericName[he]=דפדפן אינטרנט GenericName[hr]=Web preglednik GenericName[hu]=Webböngésző GenericName[it]=Browser web GenericName[ja]=ウェブ・ブラウザ GenericName[ko]=웹 브라우저 GenericName[ku]=Geroka torê GenericName[lt]=Interneto naršyklė GenericName[nb]=Nettleser GenericName[nl]=Webbrowser GenericName[nn]=Nettlesar GenericName[no]=Nettleser GenericName[pl]=Przeglądarka WWW GenericName[pt]=Navegador Web GenericName[pt_BR]=Navegador Web GenericName[ro]=Navigator Internet GenericName[ru]=Веб-браузер GenericName[sk]=Internetový prehliadač GenericName[sl]=Spletni brskalnik GenericName[sv]=Webbläsare GenericName[tr]=Web Tarayıcı GenericName[ug]=توركۆرگۈ GenericName[uk]=Веб-браузер GenericName[vi]=Trình duyệt Web GenericName[zh_CN]=网络浏览器 GenericName[zh_TW]=網路瀏覽器 Keywords=Internet;WWW;Browser;Web;Explorer Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;Ιντερνετ Keywords[es]=Explorador;Internet;WWW Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; Keywords[hr]=Internet;WWW;preglednik;Web Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer Keywords[it]=Internet;WWW;Browser;Web;Navigatore Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站; Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐 Exec=@MOZ_APP_NAME@ %u Terminal=false X-MultipleArgs=false Type=Application Icon=@MOZ_APP_NAME@ Categories=GNOME;GTK;Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; StartupNotify=true Actions=NewWindow;NewPrivateWindow; [Desktop Action NewWindow] Name=Open a New Window Name[ar]=افتح نافذة جديدة Name[ast]=Abrir una ventana nueva Name[bn]=Abrir una ventana nueva Name[ca]=Obre una finestra nova Name[cs]=Otevřít nové okno Name[da]=Åbn et nyt vindue Name[de]=Ein neues Fenster öffnen Name[el]=Άνοιγμα νέου παραθύρου Name[es]=Abrir una ventana nueva Name[fi]=Avaa uusi ikkuna Name[fr]=Ouvrir une nouvelle fenêtre Name[gl]=Abrir unha nova xanela Name[he]=פתיחת חלון חדש Name[hr]=Otvori novi prozor Name[hu]=Új ablak nyitása Name[it]=Apri una nuova finestra Name[ja]=新しいウィンドウを開く Name[ko]=새 창 열기 Name[ku]=Paceyeke nû veke Name[lt]=Atverti naują langą Name[nb]=Åpne et nytt vindu Name[nl]=Nieuw venster openen Name[pt]=Abrir nova janela Name[pt_BR]=Abrir nova janela Name[ro]=Deschide o fereastră nouă Name[ru]=Новое окно Name[sk]=Otvoriť nové okno Name[sl]=Odpri novo okno Name[sv]=Öppna ett nytt fönster Name[tr]=Yeni pencere aç Name[ug]=يېڭى كۆزنەك ئېچىش Name[uk]=Відкрити нове вікно Name[vi]=Mở cửa sổ mới Name[zh_CN]=新建窗口 Name[zh_TW]=開啟新視窗 Exec=@MOZ_APP_NAME@ -new-window OnlyShowIn=Unity; [Desktop Action NewPrivateWindow] Name=Open a New Private Window Name[ar]=افتح نافذة جديدة للتصفح الخاص Name[ca]=Obre una finestra nova en mode d'incògnit Name[de]=Ein neues privates Fenster öffnen Name[es]=Abrir una ventana privada nueva Name[fi]=Avaa uusi yksityinen ikkuna Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée Name[he]=פתיחת חלון גלישה פרטית חדש Name[hu]=Új privát ablak nyitása Name[it]=Apri una nuova finestra anonima Name[nb]=Åpne et nytt privat vindu Name[ru]=Новое приватное окно Name[sl]=Odpri novo okno zasebnega brskanja Name[tr]=Yeni bir pencere aç Name[uk]=Відкрити нове вікно у потайливому режимі Name[zh_TW]=開啟新隱私瀏覽視窗 Exec=@MOZ_APP_NAME@ -private-window OnlyShowIn=Unity; debian/firefox.postinst.in0000664000000000000000000001076512321600535013052 0ustar #!/bin/sh set -e UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d MOZ_LIBDIR=/@MOZ_LIBDIR@ MOZ_APP_NAME=@MOZ_APP_NAME@ MOZ_PKG_NAME=@MOZ_PKG_NAME@ MOZ_ADDONDIR=/@MOZ_ADDONDIR@ # Move a conffile without triggering a dpkg question finish_mv_conffile() { local OLDCONFFILE="$1" local NEWCONFFILE="$2" rm -f $OLDCONFFILE.dpkg-remove [ -e "$OLDCONFFILE" ] || return 0 echo "Preserving user changes to $NEWCONFFILE (renamed from $OLDCONFFILE)..." mv -f "$NEWCONFFILE" "$NEWCONFFILE.dpkg-new" mv -f "$OLDCONFFILE" "$NEWCONFFILE" } finish_rm_conffile() { local CONFFILE="$1" if [ -e "$CONFFILE.dpkg-backup" ]; then mv -f "$CONFFILE.dpkg-backup" "$CONFFILE.dpkg-bak" fi if [ -e "$CONFFILE.dpkg-remove" ]; then echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE.dpkg-remove" fi } if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] ; then update-alternatives --install /usr/bin/gnome-www-browser \ gnome-www-browser /usr/bin/$MOZ_APP_NAME 40 update-alternatives --install /usr/bin/x-www-browser \ x-www-browser /usr/bin/$MOZ_APP_NAME 40 fi if [ "$1" = "configure" ] ; then # # AppArmor # APP_PROFILE="/etc/apparmor.d/usr.bin.$MOZ_PKG_NAME" if [ -f "$APP_PROFILE" ]; then if [ -e /etc/lsb-release ] ; then ubuntu_version=`grep ^DISTRIB_RELEASE /etc/lsb-release | cut -d= -f2 | cut -d '.' -f-2 | tr -d '.'` else ubuntu_version=`lsb_release -rs | cut -d '.' -f-2 | tr -d '.'` fi # Setup the extra include files for Ubuntu 10.10 and higher # Add the local/ include LOCAL_APP_PROFILE="/etc/apparmor.d/local/usr.bin.$MOZ_PKG_NAME" test -e "$LOCAL_APP_PROFILE" || { tmp=`mktemp` cat < "$tmp" # Site-specific additions and overrides for usr.bin.firefox. # For more details, please see /etc/apparmor.d/local/README. EOM mkdir `dirname $LOCAL_APP_PROFILE` 2>/dev/null || true mv -f "$tmp" "$LOCAL_APP_PROFILE" chmod 644 "$LOCAL_APP_PROFILE" } # Add the addons include ADDONS_APP_PROFILE="/etc/apparmor.d/abstractions/ubuntu-browsers.d/$MOZ_PKG_NAME" test -e "$ADDONS_APP_PROFILE" || { tmp=`mktemp` cat < "$tmp" # This file is updated by 'aa-update-browser' and may be overwritten on # upgrades. # # For site-specific adjustments, please see /etc/apparmor.d/local/ #include #include #include #include #include #include #include #include #include EOM mkdir -p `dirname $ADDONS_APP_PROFILE` 2>/dev/null || true mv -f "$tmp" "$ADDONS_APP_PROFILE" chmod 644 "$ADDONS_APP_PROFILE" } # Reload AppArmor profile DISABLE_APP_PROFILE="/etc/apparmor.d/disable/usr.bin.$MOZ_PKG_NAME" if [ ! -f "$DISABLE_APP_PROFILE" ] && aa-status --enabled 2>/dev/null; then apparmor_parser -r -T -W "$APP_PROFILE" || true fi fi # # End AppArmor # finish_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/bookmarks.html" finish_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/localstore.rdf" finish_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/mimeTypes.rdf" finish_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/prefs.js" finish_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/chrome/userChrome-example.css" finish_rm_conffile "/etc/${MOZ_PKG_NAME}/profile/chrome/userContent-example.css" finish_mv_conffile "/etc/${MOZ_PKG_NAME}/pref/firefox.js" "/etc/${MOZ_PKG_NAME}/syspref.js" # Keep until 12.04 is EOL if [ -d $MOZ_LIBDIR/distribution/extensions ] && [ ! -h $MOZ_LIBDIR/distribution/extensions ]; then \ rmdir --ignore-fail-on-non-empty $MOZ_LIBDIR/distribution/extensions fi if [ ! -e $MOZ_LIBDIR/distribution/extensions ]; then ln -s ${MOZ_ADDONDIR}/distribution/extensions $MOZ_LIBDIR/distribution/extensions fi fi echo "Please restart all running instances of $MOZ_APP_NAME, or you will experience problems." if [ -d /var/run ] ; then touch /var/run/$MOZ_APP_NAME-restart-required fi #DEBHELPER# debian/firefox.links.in0000664000000000000000000000115712321600535012302 0ustar # Symlinks for legacy folders @MOZ_ADDONDIR@/extensions @MOZ_LIBDIR@/browser/extensions @MOZ_ADDONDIR@/plugins @MOZ_LIBDIR@/browser/plugins @MOZ_ADDONDIR@/searchplugins @MOZ_LIBDIR@/browser/searchplugins @MOZ_ADDONDIR@/distribution/extensions @MOZ_LIBDIR@/distribution/extensions # System dictionaries / hyphenation patterns usr/share/hunspell @MOZ_LIBDIR@/dictionaries usr/share/hyphen @MOZ_LIBDIR@/hyphenation @MOZ_LIBDIR@/firefox.sh usr/bin/@MOZ_APP_NAME@ @MOZ_LIBDIR@/browser/icons/mozicon128.png usr/share/pixmaps/@MOZ_APP_NAME@.png etc/@MOZ_PKG_NAME@/syspref.js @MOZ_LIBDIR@/browser/defaults/preferences/syspref.js debian/control.langpacks.unavail0000664000000000000000000000061512321600535014172 0ustar Package: @MOZ_PKG_NAME@-locale-@LANGCODE@ Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. debian/apport/0000775000000000000000000000000012321600535010472 5ustar debian/apport/source_firefox.py.in0000664000000000000000000015134612321600535014505 0ustar '''firefox apport hook /usr/share/apport/package-hooks/firefox.py Copyright (c) 2007: Hilario J. Montoliu (c) 2011: Chris Coulson This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See http://www.gnu.org/copyleft/gpl.html for the full text of the license. ''' import os import os.path import sys import fcntl import subprocess import struct from subprocess import Popen try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser import sqlite3 import tempfile import re import apport.packaging from apport.hookutils import * from glob import glob import zipfile import stat import functools if sys.version_info[0] < 3: import codecs DISTRO_ADDONS = [ '@MOZ_PKG_NAME@', 'xul-ext-ubufox' ] class PrefParseError(Exception): def __init__(self, msg, filename, linenum): super(PrefParseError, self).__init__(msg) self.msg = msg self.filename = filename self.linenum = linenum def __str__(self): return self.msg + ' @ ' + self.filename + ':' + str(self.linenum) class PluginRegParseError(Exception): def __init__(self, msg, linenum): super(PluginRegParseError, self).__init__(msg) self.msg = msg self.linenum = linenum def __str__(self): return self.msg + ' @ line ' + str(self.linenum) class ExtensionTypeNotRecognised(Exception): def __init__(self, ext_type, ext_id): super(ExtensionTypeNotRecognised, self).__init__(ext_type, ext_id) self.ext_type = ext_type self.ext_id = ext_id def __str__(self): return "Extension type not recognised: %s (ID: %s)" % (self.ext_type, self.ext_id) class VersionCompareFailed(Exception): def __init__(self, a, b, e): if a == None: a = '' if b == None: b = '' super(VersionCompareFailed, self).__init__(a, b, e) self.a = a self.b = b self.e = e def __str__(self): return "Failed to compare versions A = %s, B = %s (%s)" % (self.a, self.b, str(self.e)) def _open(filename, mode): if sys.version_info[0] < 3: return codecs.open(filename, mode, 'utf-8') return open(filename, mode) def mkstemp_copy(path): '''Make a copy of a file to a temporary file, and return the path''' (outfd, outpath) = tempfile.mkstemp() outfile = os.fdopen(outfd, 'wb') infile = open(path, 'rb') total = 0 while True: data = infile.read(4096) total += len(data) outfile.write(data) infile.seek(total) outfile.seek(total) if len(data) < 4096: break return outpath def anonymize_path(path, profiledir = None): if profiledir != None and path == os.path.join(profiledir, 'prefs.js'): return 'prefs.js' elif profiledir != None and path == os.path.join(profiledir, 'user.js'): return 'user.js' elif profiledir != None and path.startswith(profiledir): return os.path.join('[Profile]', os.path.relpath(path, profiledir)) elif path.startswith(os.environ['HOME']): return os.path.join('[HomeDir]', os.path.relpath(path, os.environ['HOME'])) else: return path class CompatINIParser(ConfigParser): def __init__(self, path): ConfigParser.__init__(self) self.read(os.path.join(path, "compatibility.ini")) @property def last_version(self): if not self.has_section("Compatibility") or not self.has_option("Compatibility", "LastVersion"): return None return re.sub(r'([^_]*)(.*)', r'\1', self.get("Compatibility", "LastVersion")) @property def last_buildid(self): if not self.has_section("Compatibility") or not self.has_option("Compatibility", "LastVersion"): return None return re.sub(r'([^_]*)_([^/]*)/(.*)', r'\2', self.get("Compatibility", "LastVersion")) class AppINIParser(ConfigParser): def __init__(self, path): ConfigParser.__init__(self) self.read(os.path.join(path, "application.ini")) @property def buildid(self): if not self.has_section('App') or not self.has_option('App', 'BuildID'): return None return self.get('App', 'BuildID') @property def appid(self): if not self.has_section('App') or not self.has_option('App', 'ID'): return None return self.get('App', 'ID') class ExtensionINIParser(ConfigParser): def __init__(self, path): ConfigParser.__init__(self) self.read(os.path.join(path, "extensions.ini")) self._extensions = [] if self.has_section('ExtensionDirs'): items = self.items('ExtensionDirs') for item in items: self._extensions.append(item[1]) def __getitem__(self, key): if key > len(self) - 1: raise IndexError return self._extensions[key] def __iter__(self): class ExtensionINIParserIter: def __init__(self, parser): self.parser = parser self.index = 0 def __next__(self): if self.index == len(self.parser): raise StopIteration res = self.parser[self.index] self.index += 1 return res def next(self): return self.__next__() return ExtensionINIParserIter(self) def __len__(self): return len(self._extensions) def compare_versions(a, b): '''Compare 2 version numbers, returns -1 for ab This is basically just a python reimplementation of nsVersionComparator''' class VersionPart: def __init__(self): self.numA = 0 self.strB = None self.numC = 0 self.extraD = None def parse_version(part): res = VersionPart() if part == None or part == '': return (part, res) spl = part.split('.') if part == '*' and len(part) == 1: try: res.numA = sys.maxint except: res.numA = sys.maxsize # python3 res.strB = "" else: res.numA = int(re.sub(r'([0-9]*)(.*)', r'\1', spl[0])) res.strB = re.sub(r'([0-9]*)(.*)', r'\2', spl[0]) if res.strB == '': res.strB = None if res.strB != None: if res.strB[0] == '+': res.numA += 1 res.strB = "pre" else: tmp = res.strB res.strB = re.sub(r'([^0-9+-]*)([0-9]*)(.*)', r'\1', tmp) strC = re.sub(r'([^0-9+-]*)([0-9]*)(.*)', r'\2', tmp) if strC != '': res.numC = int(strC) res.extraD = re.sub(r'([^0-9+-]*)([0-9]*)(.*)', r'\3', tmp) if res.extraD == '': res.extraD = None return (re.sub(r'([^\.]*)\.*(.*)', r'\2', part), res) def strcmp(stra, strb): if stra == None and strb == None: return 0 elif stra == None and strb != None: return 1 elif stra != None and strb == None: return -1 if stra < strb: return -1 elif stra > strb: return 1 else: return 0 def do_compare(apart, bpart): if apart.numA < bpart.numA: return -1 elif apart.numA > bpart.numA: return 1 res = strcmp(apart.strB, bpart.strB) if res != 0: return res if apart.numC < bpart.numC: return -1 elif apart.numC > bpart.numC: return 1 return strcmp(apart.extraD, bpart.extraD) try: saved_a = a saved_b = b while a or b: (a, va) = parse_version(a) (b, vb) = parse_version(b) res = do_compare(va, vb) if res != 0: break except Exception as e: raise VersionCompareFailed(saved_a, saved_b, e) return res class Plugin(object): def __init__(self): self.lib = None self.path = None self.desc = None self._package = None self._checked_package = False def dump(self): if self.path.startswith(os.path.join(os.environ['HOME'], '.mozilla', '@MOZ_APP_NAME@')): location = "[Profile]" else: location = os.path.dirname(self.path) pkgname = ' (%s)' % self.package if self.package != None else '' return ("%s - %s%s" % (self.desc, os.path.join(location, self.lib), pkgname)) @property def package(self): if self._checked_package == False: self._package = apport.packaging.get_file_package(self.path) self._checked_package = True return self._package class PluginRegistry: STATE_PENDING = 0 STATE_START = 1 STATE_PROCESSING_1 = 2 STATE_PROCESSING_2 = 3 STATE_PROCESSING_3 = 4 STATE_FINISHED = 5 def __init__(self, path): self.plugins = [] self._state = PluginRegistry.STATE_PENDING self._current_plugin = None self._profile_path = path self.error = None fd = None try: fd = _open(os.path.join(path, 'pluginreg.dat'), 'r') try: skip = 0 linenum = 1 for line in fd.readlines(): if skip == 0: skip = self._parseline(line, linenum) if skip == -1: break else: skip -= 1 linenum += 1 if skip > 0: raise PluginRegParseError("Unexpected EOF", linenum) except Exception as e: self.error = str(e) except: pass finally: if fd != None: fd.close() def _parseline(self, line, linenum): line = line.strip() if line != '' and line[0] == '[' and self._state != PluginRegistry.STATE_START and self._state != PluginRegistry.STATE_PENDING: raise PluginRegParseError('Unexpected section header', linenum) if self._state == PluginRegistry.STATE_PENDING: if line == '[PLUGINS]': self._state += 1 return 0 elif self._state == PluginRegistry.STATE_START: if line == '': return 0 if line[0] == '[': self._state = PluginRegistry.STATE_FINISHED return -1 self._current_plugin = Plugin() self._current_plugin.lib = line.split(':')[0] self._state += 1 return 0 elif self._state == PluginRegistry.STATE_PROCESSING_1: path = line.split(':')[0] if path[0] != '/': raise PluginRegParseError("Invalid path", linenum) self._current_plugin.path = anonymize_path(path, self._profile_path) self._state += 1 return 3 elif self._state == PluginRegistry.STATE_PROCESSING_2: self._current_plugin.desc = line.split(':')[0] self._state += 1 return 0 elif self._state == PluginRegistry.STATE_PROCESSING_3: self.plugins.append(self._current_plugin) self._state = PluginRegistry.STATE_START return int(line.strip()) else: return -1 def __getitem__(self, key): if key > len(self) - 1: raise IndexError return self.plugins[key] def __iter__(self): class PluginRegistryIter: def __init__(self, registry): self.registry = registry self.index = 0 def __next__(self): if self.index == len(self.registry): raise StopIteration ret = self.registry[self.index] self.index += 1 return ret def next(self): return self.__next__() return PluginRegistryIter(self) def __len__(self): return len(self.plugins) class Prefs: '''Class which represents a pref file. Handles all of the parsing, and can be accessed like a normal python dictionary''' PREF_WHITELIST = [ r'accessibility\.*', r'browser\.fixup\.*', r'browser\.history_expire_*', r'browser\.link\.open_newwindow', r'browser\.mousewheel\.*', r'browser\.places\.*', r'browser\.startup\.homepage', r'browser\.tabs\.*', r'browser\.zoom\.*', r'dom\.*', r'extensions\.autoDisableScopes', r'extensions\.checkCompatibility\.*', r'extensions\.enabledScopes', r'extensions\.lastAppVersion', r'extensions\.minCompatibleAppVersion', r'extensions\.minCompatiblePlatformVersion', r'extensions\.strictCompatibility', r'font\.*', r'general\.skins\.*', r'general\.useragent\.*', r'gfx\.*', r'html5\.*', r'mozilla\.widget\.render\-mode', r'layers\.*', r'javascript\.*', r'keyword\.*', r'layout\.css\.dpi', r'network\.*', r'places\.*', r'plugin\.*', r'plugins\.*', r'print\.*', r'privacy\.*', r'security\.*', r'webgl\.*' ] PREF_BLACKLIST = [ r'^network.*proxy\.*', r'.*print_to_filename$', r'print\.tmp\.', r'print\.printer_*', r'printer_*' ] STATE_READY = 0 STATE_COMMENT_MAYBE_START = 1 STATE_COMMENT_BLOCK = 2 STATE_COMMENT_BLOCK_MAYBE_END = 3 STATE_PARSE_UNTIL_OPEN_PAREN = 4 STATE_PARSE_UNTIL_NAME = 5 STATE_PARSE_UNTIL_COMMA = 6 STATE_PARSE_UNTIL_VALUE = 7 STATE_PARSE_UNTIL_CLOSE_PAREN = 8 STATE_PARSE_UNTIL_SEMICOLON = 9 STATE_PARSE_STRING = 10 STATE_PARSE_ESC_SEQ = 11 STATE_PARSE_INT = 12 STATE_SKIP = 13 STATE_PARSE_UNTIL_EOL = 14 def __init__(self, profile_path, extra_paths=None, whitelist=None, blacklist=None): self.whitelist = whitelist if whitelist != None else Prefs.PREF_WHITELIST self.blacklist = blacklist if blacklist != None else Prefs.PREF_BLACKLIST self.prefs = {} self.pref_sources = [] self.errors = {} self._profile_path = profile_path # Read all preferences. Note that we hide preferences that are considered # default (ie, all of those set by the Firefox package or bundled addons, # unless any of the pref files have been modified by the user). # The load order is *very important* if profile_path != None: locations = [ "/@MOZ_LIBDIR@/omni.ja:greprefs.js", "/@MOZ_LIBDIR@/omni.ja:defaults/pref/*.js", "/@MOZ_LIBDIR@/defaults/pref/*.js", "/@MOZ_LIBDIR@/defaults/pref/unix.js", "/@MOZ_LIBDIR@/omni.ja:defaults/preferences/*.js" "/@MOZ_LIBDIR@/defaults/preferences/*.js" ] append_dirs = [ 'defaults/preferences/*.js' ] if os.path.isdir('/@MOZ_LIBDIR@/distribution/bundles'): bundles = os.listdir('/@MOZ_LIBDIR@/distribution/bundles') bundles.sort(reverse=True) for d in append_dirs: for bundle in bundles: path = os.path.join('/@MOZ_LIBDIR@/distribution/bundles', bundle) if path.endswith('.xpi'): locations.append(path + ':' + d) elif os.path.isdir(path): locations.append(os.path.join(path, d)) locations.append(os.path.join(profile_path, "prefs.js")) locations.append(os.path.join(profile_path, "user.js")) extensions = ExtensionINIParser(profile_path) for extension in extensions: if extension.endswith('.xpi'): locations.append(extension + ':defaults/preferences/*.(J|j)(S|s)') elif os.path.isdir(extension): locations.append(os.path.join(extension, 'defaults/preferences/*.js')) locations.append(os.path.join(profile_path, 'preferences/*.js')) else: locations = [] if extra_paths != None: for extra in extra_paths: locations.append(extra) for location in locations: m = re.match(r'^([^:]*):?(.*)', location) if m.group(2) == '': files = glob(location) files.sort(reverse=True) for f in files: self._parse_file(f) else: self._parse_jar(m.group(1), m.group(2)) def _should_ignore_file(self, filename): realpath = os.path.realpath(filename) package = apport.packaging.get_file_package(realpath) if package and apport.packaging.is_distro_package(package) and \ package in DISTRO_ADDONS and \ realpath[1:] not in apport.packaging.get_modified_files(package): return True return False def _parse_file(self, filename): f = None self._state = Prefs.STATE_READY try: f = _open(filename, 'r') try: linenum = 1 state = None for line in f.readlines(): state = self._parseline(line, filename, linenum, state) linenum += 1 except Exception as e: self.errors[filename] = str(e) except: pass finally: if f != None: f.close() if filename not in self.errors \ and not self._should_ignore_file(filename): self.pref_sources.append(filename) def _parse_jar(self, jar, match): jarfile = None try: jarfile = zipfile.ZipFile(jar) entries = jarfile.namelist() entries.sort(reverse=True) for entry in entries: if re.match(r'^' + match + '$', entry): source = '%s:%s' % (jar, entry) try: f = jarfile.open(entry, 'r') linenum = 1 state = None for line in f.readlines(): state = self._parseline(line.decode('utf-8'), source, linenum, state) linenum += 1 except Exception as e: self.errors[source] = str(e) finally: if source not in self.errors \ and not self._should_ignore_file(jar): self.pref_sources.append(source) except: pass finally: if jarfile != None: jarfile.close() def _maybe_add_pref(self, key, value, source, default, locked): class Pref(object): def __init__(self, profile_path): self._default = None self._value = None self._default_source = None self._value_source = None self.locked = False self._profile_path = profile_path @property def value(self): if self._value != None: return self._value return self._default @property def source(self): if self._value != None: return self._value_source return self._default_source @property def anon_source(self): if self._value != None: return anonymize_path(self._value_source, self._profile_path) return anonymize_path(self._default_source, self._profile_path) def set_value(self, value, source, default, locked): if self.locked == True: return if default == True: self._default = value self._default_source = source else: self._value = value self._value_source = source self.locked = locked for match in self.blacklist: if re.match(match, key): return for match in self.whitelist: if re.match(match, key): if key not in self.prefs: self.prefs[key] = Pref(self._profile_path) self.prefs[key].set_value(value, source, default, locked) def _parseline(self, line, source, linenum, old_state): # XXX: I pity the poor soul who ever needs to change anything inside this function class PrefParseState(object): def __init__(self): self.state = Prefs.STATE_READY def _reset(self): self.next_state = Prefs.STATE_READY self.default = False self.locked = False self.name = None self.value = None self.tmp = None self.skip = None self.quote = None def _get_state(self): return self._state def _set_state(self, state): self._state = state if state == Prefs.STATE_READY: self._reset() state = property(_get_state, _set_state) state = old_state if state == None: state = PrefParseState() index = 0 for c in line: if state.state == Prefs.STATE_READY: if c == '/': state.state = Prefs.STATE_COMMENT_MAYBE_START elif c == '#': state.state = Prefs.STATE_PARSE_UNTIL_EOL elif line.startswith('pref', index): state.default == True state.next_state = Prefs.STATE_PARSE_UNTIL_OPEN_PAREN state.state = Prefs.STATE_SKIP state.skip = 3 elif line.startswith('user_pref', index): state.next_state = Prefs.STATE_PARSE_UNTIL_OPEN_PAREN state.state = Prefs.STATE_SKIP state.skip = 8 elif line.startswith('lockPref', index): state.default = True state.locked = True state.next_state = Prefs.STATE_PARSE_UNTIL_OPEN_PAREN state.state = Prefs.STATE_SKIP state.skip = 7 elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before pref" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_SKIP: state.skip -= 1 if state.skip == 0: state.state = state.next_state state.next_state = Prefs.STATE_READY elif state.state == Prefs.STATE_COMMENT_MAYBE_START: if c == '*': state.state = Prefs.STATE_COMMENT_BLOCK elif c == '/': state.state = Prefs.STATE_PARSE_UNTIL_EOL else: raise PrefParseError("Unexpected '/'", anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_UNTIL_EOL: pass elif state.state == Prefs.STATE_COMMENT_BLOCK: if c == '*': state.state = Prefs.STATE_COMMENT_BLOCK_MAYBE_END elif state.state == Prefs.STATE_COMMENT_BLOCK_MAYBE_END: if c == '/': state.state = state.next_state state.next_state = Prefs.STATE_READY else: state.state = Prefs.STATE_COMMENT_BLOCK elif state.state == Prefs.STATE_PARSE_UNTIL_OPEN_PAREN: if c == '(': state.state = Prefs.STATE_PARSE_UNTIL_NAME elif c == '/': state.next_state = state.state state.state = Prefs.STATE_COMMENT_MAYBE_START elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before open parenthesis" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_UNTIL_NAME: if c == '"' or c == '\'': state.tmp = '' state.quote = c state.state = Prefs.STATE_PARSE_STRING state.next_state = Prefs.STATE_PARSE_UNTIL_COMMA elif c == '/': state.next_state = state.state state.state = Prefs.STATE_COMMENT_MAYBE_START elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before pref name" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_STRING: if c == '\\': state.state = Prefs.STATE_PARSE_ESC_SEQ elif c == state.quote: state.state = state.next_state state.next_state = Prefs.STATE_READY else: state.tmp += c elif state.state == Prefs.STATE_PARSE_ESC_SEQ: # XXX: We don't handle UTF16 / hex here if c == 'n': c = '\n' elif c == 'r': c = '\r' state.tmp += c state.state = Prefs.STATE_PARSE_STRING elif state.state == Prefs.STATE_PARSE_UNTIL_COMMA: if state.tmp != None: state.name = state.tmp state.tmp = None if c == ',': state.state = Prefs.STATE_PARSE_UNTIL_VALUE elif c == '/': state.next_state = state.state state.state = Prefs.STATE_COMMENT_MAYBE_START elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before comma" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_UNTIL_VALUE: if c == '"' or c == '\'': state.tmp = '' state.quote = c state.state = Prefs.STATE_PARSE_STRING state.next_state = Prefs.STATE_PARSE_UNTIL_CLOSE_PAREN elif line.startswith('true', index): state.tmp = True state.next_state = Prefs.STATE_PARSE_UNTIL_CLOSE_PAREN state.state = Prefs.STATE_SKIP state.skip = 3 elif line.startswith('false', index): state.tmp = False state.next_state = Prefs.STATE_PARSE_UNTIL_CLOSE_PAREN state.state = Prefs.STATE_SKIP state.skip = 4 elif (c >= '0' and c <= '9') or c == '+' or c == '-': state.tmp = c state.state = Prefs.STATE_PARSE_INT elif c == '/': state.next_state = state state.state = Prefs.STATE_COMMENT_MAYBE_START elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before value" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_INT: if c >= '0' and c <= '9': state.tmp += c elif c == ')': state.value = int(state.tmp) state.tmp = None state.state = Prefs.STATE_PARSE_UNTIL_SEMICOLON elif c.isspace(): state.tmp = int(state.tmp) state.state = Prefs.STATE_PARSE_UNTIL_CLOSE_PAREN elif c == '/': state.tmp = int(state.tmp) state.next_state = Prefs.STATE_PARSE_UNTIL_CLOSE_PAREN state.state = Prefs.STATE_COMMENT_MAYBE_START else: raise PrefParseError("Unexpected character '%s' whilst parsing int" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_UNTIL_CLOSE_PAREN: if state.tmp != None: state.value = state.tmp state.tmp = None if c == ')': state.state = Prefs.STATE_PARSE_UNTIL_SEMICOLON elif c == '/': state.next_state = state.state state.state = Prefs.STATE_COMMENT_MAYBE_START elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before close parenthesis" % c, anonymize_path(source, self._profile_path), linenum) elif state.state == Prefs.STATE_PARSE_UNTIL_SEMICOLON: if c == ';': self._maybe_add_pref(state.name, state.value, source, state.default, state.locked) state.state = Prefs.STATE_READY elif c == '/': state.next_state = state.state state.state = Prefs.STATE_COMMENT_MAYBE_START elif not c.isspace(): raise PrefParseError("Unexpected character '%s' before semicolon" % c, anonymize_path(source, self._profile_path), linenum) index += 1 if state.state == Prefs.STATE_PARSE_UNTIL_EOL: state.state = Prefs.STATE_READY return state def __getitem__(self, key): res = self.prefs[key] if res.source in self.pref_sources: return res raise KeyError def __iter__(self): class PrefsIter: def __init__(self, prefs): self.index = 0 self.keys = [] for k in prefs.prefs.keys(): try: test = prefs[k] self.keys.append(k) except: pass self.keys.sort() def __next__(self): if self.index == len(self.keys): raise StopIteration res = self.keys[self.index] self.index += 1 return res def next(self): return self.__next__() return PrefsIter(self) def __len__(self): i = 0 for k in self: i += 1 return i class Extension: '''Small class representing an extension''' def __init__(self, ext_id, location, ver, ext_type, active, desc, min_appver, max_appver, cur_appver, visible, userDisabled, appDisabled, softDisabled, foreign, hasBinary, strictCompat, appStrictCompat): self.ext_id = ext_id; self.location = location self.ver = ver self.ext_type = ext_type self.active = active self.desc = desc self.min_appver = min_appver self.max_appver = max_appver self.cur_appver = cur_appver self.visible = visible self.userDisabled = userDisabled self.appDisabled = appDisabled self.softDisabled = softDisabled self.foreign = foreign self.hasBinary = hasBinary self.strictCompat = strictCompat self.appStrictCompat = appStrictCompat def dump(self): active = "Yes" if self.active == True else "No" foreign = "Yes" if self.foreign == True else "No" visible = "Yes" if self.visible == True else "No" hasBinary = "Yes" if self.hasBinary == True else "No" strictCompat = "Yes" if self.strictCompat == True else "No" if self.active == True: disabled_reason = "" elif self.softDisabled == True: disabled_reason = "(Soft-blocked)" elif self.appDisabled == True: disabled_reason = "(Application disabled)" elif self.userDisabled == True: disabled_reason = "(User disabled)" else: disabled_reason = "(Reason unknown)" return ("%s - ID=%s, Version=%s, minVersion=%s, maxVersion=%s, Location=%s, " + "Type=%s, Foreign=%s, Visible=%s, BinaryComponents=%s, StrictCompat=%s, " + "Active=%s %s") % \ (self.desc, self.ext_id, self.ver, self.min_appver, self.max_appver, self.location, self.ext_type, foreign, visible, hasBinary, strictCompat, active, disabled_reason) @property def active_but_incompatible(self): return self.active and (self.cur_appver != None and \ (compare_versions(self.cur_appver, self.min_appver) == -1 or \ compare_versions(self.cur_appver, self.max_appver) == 1) and \ (self.hasBinary or self.strictCompat or self.appStrictCompat)) class Profile: '''Container to represent a profile''' def __init__(self, id, name, path, is_default, appini): self.extensions = {} self.locales = {} self.themes = {} self.id = id self.name = name self.path = path self.default = is_default self.appini = appini self.prefs = Prefs(path) self.plugins = PluginRegistry(path) try: self._populate_extensions() except: self.extensions = None def _populate_extensions(self): # We copy the db as it's locked whilst Firefox is open. This is still racy # though, as it could be modified during the copy, leaving us with a corrupt # DB. Can we detect this somehow? tmp_db = mkstemp_copy(os.path.join(self.path, "extensions.sqlite")) conn = sqlite3.connect(tmp_db) def get_extension_from_row(row): moz_id = row[0] ext_id = row[1] location = row[2] ext_ver = row[3] ext_type = row[4] visible = True if row[6] == 1 else False active = True if row[7] == 1 else False userDisabled = True if row[8] == 1 else False appDisabled = True if row[9] == 1 else False softDisabled = True if row[10] == 1 else False foreign = True if row[11] == 1 else False hasBinary = True if row[12] == 1 else False strictCompat = True if row[13] == 1 else False cur = conn.cursor() cur.execute("select name from locale where id=:id", { "id": row[5] }) desc = cur.fetchone()[0] cur = conn.cursor() cur.execute("select minVersion, maxVersion from targetApplication where addon_internal_id=:id and (id=:appid or id=:tkid)", \ { "id": row[0], "appid": self.appini.appid, "tkid": "toolkit@mozilla.org" }) (min_ver, max_ver) = cur.fetchone() appStrictCompat = 'extensions.strictCompatibility' in self.prefs and \ self.prefs['extensions.strictCompatibility'].value == 'true' return Extension(ext_id, location, ext_ver, ext_type, active, desc, min_ver, max_ver, self.last_version, visible, userDisabled, appDisabled, softDisabled, foreign, hasBinary, strictCompat, appStrictCompat) cur = conn.cursor() cur.execute("select internal_id, id, location, version, type, defaultLocale, " + \ "visible, active, userDisabled, appDisabled, softDisabled, " + \ "isForeignInstall, hasBinaryComponents, strictCompatibility from addon") rows = cur.fetchall() for row in rows: extension = get_extension_from_row(row) if extension.ext_type == "extension": storage_array = self.extensions elif extension.ext_type == "locale": storage_array = self.locales elif extension.ext_type == "theme": storage_array = self.themes else: raise ExtensionTypeNotRecognised(extension.type, extension.ext_id) if not extension.location in storage_array: storage_array[extension.location] = [] storage_array[extension.location].append(extension) os.remove(tmp_db) def _do_dump(self, storage_array): if self.extensions == None: return "extensions.sqlite corrupt or missing" ret = "" for location in storage_array: ret += "Location: " + location + "\n\n" for extension in storage_array[location]: prefix = " (Inactive) " if not extension.active else "" ret += '\t%s%s\n' % (prefix, extension.dump()) ret += "\n\n\n" return ret @property def running(self): if not hasattr(self, '_running'): # We detect if this profile is running or not by trying to lock the lockfile # If we can't lock it, then Firefox is running fd = os.open(os.path.join(self.path, ".parentlock"), os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0o666) lock = struct.pack("hhqqi", 1, 0, 0, 0, 0) try: fcntl.fcntl(fd, fcntl.F_SETLK, lock) self._running = False # If we acquired the lock, ensure that we unlock again immediately lock = struct.pack("hhqqi", 2, 0, 0, 0, 0) fcntl.fcntl(fd, fcntl.F_SETLK, lock) except: self._running = True return self._running def dump_extensions(self): return self._do_dump(self.extensions) def dump_locales(self): return self._do_dump(self.locales) def dump_themes(self): return self._do_dump(self.themes) def dump_prefs(self): ret = '' for pref in self.prefs: if type(self.prefs[pref].value) == int: value = str(self.prefs[pref].value) elif type(self.prefs[pref].value) == bool: value = 'true' if self.prefs[pref].value == True else 'false' else: value = "\"%s\"" % self.prefs[pref].value ret += pref + ': ' + value + ' (' + self.prefs[pref].anon_source + ')\n' return ret def dump_pref_sources(self): ret = '' for source in self.prefs.pref_sources: ret += anonymize_path(source, self.path) + '\n' return ret def dump_pref_errors(self): ret = '' for source in self.prefs.errors: ret += self.prefs.errors[source] + '\n' return ret def dump_plugins(self): if self.plugins.error != None: return "pluginreg.dat exists but isn't parseable. %s" % self.plugins.error ret = '' for plugin in self.plugins: ret += plugin.dump() + '\n' return ret def get_plugin_packages(self, pkglist): if self.plugins.error != None: return None for plugin in self.plugins: if plugin.package != None and plugin.package not in pkglist: pkglist.append(plugin.package) @property def current(self): return True if self.appini.buildid == self.last_buildid or self.appini.buildid == None else False @property def has_active_but_incompatible_extensions(self): if self.last_version == None or self.extensions == None: return False for storage_array in self.extensions, self.locales, self.themes: for location in storage_array: for extension in storage_array[location]: if extension.active_but_incompatible: return True return False def dump_active_but_incompatible_extensions(self): if self.last_version == None or self.extensions == None: return "Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)" res = '' for storage_array in self.extensions, self.locales, self.themes: for location in storage_array: for extension in storage_array[location]: if extension.active_but_incompatible: res += extension.desc + " - " + extension.ext_id + "\n" return res def dump_files_with_broken_permissions(self): broken = [] blacklist = [ r'^lock$' ] for dirpath, dirnames, filenames in os.walk(self.path): def check_path(path): relpath = os.path.relpath(path, self.path) for i in blacklist: if re.match(i, relpath): return flags = os.R_OK | os.W_OK if os.path.isdir(path): flags |= os.X_OK if not os.access(path, flags): broken.append(relpath) check_path(dirpath) for name in filenames: check_path(os.path.join(dirpath, name)) uid = os.getuid() broken.sort() broken_txt = '' for file in broken: fstat = os.stat(os.path.join(self.path, file)) summary = "%#o" % (fstat.st_mode & (stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)) if fstat.st_uid != uid: summary += ', wrong owner' broken_txt += file + ' (' + summary + ')\n' return broken_txt @property def has_forced_layers_acceleration(self): if "layers.acceleration.force-enabled" in self.prefs and self.prefs["layers.acceleration.force-enabled"].value == "true": return True return False @property def compatini(self): if not hasattr(self, '_compatini'): self._compatini = CompatINIParser(self.path) return self._compatini @property def last_version(self): return self.compatini.last_version @property def last_buildid(self): return self.compatini.last_buildid @property def addon_compat_check_disabled(self): is_nightly = re.sub(r'^[^\.]+\.[0-9]+([a-z0-9]*).*', r'\1', self.last_version) == 'a1' if is_nightly == True: pref = "extensions.checkCompatibility.nightly" else: pref = "extensions.checkCompatibility.%s" % re.sub(r'(^[^\.]+\.[0-9]+[a-z]*).*', r'\1', self.last_version) return pref in self.prefs and self.prefs[pref].value == 'false' class Profiles: '''Small class to build an array of profiles from a profile.ini. Can be accessed like a normal array''' def __init__(self, ini_file, appini): self.profiles = [] parser = ConfigParser() parser.read(ini_file) profile_folder = os.path.dirname(ini_file) for section in parser.sections(): if section == "General": continue if not parser.has_option(section, "Path"): continue path = parser.get(section, "Path") name = parser.get(section, "Name") is_default = True if parser.has_option(section, "Default") and parser.getint(section, "Default") == 1 else False self.profiles.append(Profile(section, name, os.path.join(profile_folder, path), is_default, appini)) # No "Default" entry when there is one profile if len(self) == 1: self[0].default = True def __getitem__(self, key): if key > len(self) - 1: raise IndexError return self.profiles[key] def __iter__(self): class ProfilesIter: def __init__(self, profiles): self.profiles = profiles self.index = 0 def __next__(self): if self.index == len(self.profiles): raise StopIteration res = self.profiles[self.index] self.index += 1 return res def next(self): return self.__next__() return ProfilesIter(self) def __len__(self): return len(self.profiles) def dump_profile_summaries(self): res = '' for profile in self: running = " (In use)" if profile.running == True else "" default = " (Default)" if profile.default else "" outdated = " (Out of date)" if not profile.current else "" res += "%s%s - LastVersion=%s/%s%s%s\n" % (profile.id, default, profile.last_version, profile.last_buildid, running, outdated) return res def recent_kernlog(pattern): '''Extract recent messages from kern.log or message which match a regex. pattern should be a "re" object. ''' lines = '' if os.path.exists('/var/log/kern.log'): file = '/var/log/kern.log' elif os.path.exists('/var/log/messages'): file = '/var/log/messages' else: return lines for line in open(file): if pattern.search(line): lines += line return lines def recent_auditlog(pattern): '''Extract recent messages from kern.log or message which match a regex. pattern should be a "re" object. ''' lines = '' if os.path.exists('/var/log/audit/audit.log'): file = '/var/log/audit/audit.log' else: return lines for line in open(file): if pattern.search(line): lines += line return lines def add_info(report, ui): '''Entry point for apport''' def populate_item(key, data): if data != None and data.strip() != '': report[key] = data def append_tag(tag): tags = report.get('Tags', '') if tags: tags += ' ' report['Tags'] = tags + tag ddproc = Popen(['dpkg-divert', '--truename', '/usr/bin/@MOZ_APP_NAME@'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) truename = ddproc.communicate() if ddproc.returncode == 0 and truename[0].strip() != '/usr/bin/@MOZ_APP_NAME@': ddproc = Popen(['dpkg-divert', '--listpackage', '/usr/bin/@MOZ_APP_NAME@'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) diverter = ddproc.communicate() report['UnreportableReason'] = "/usr/bin/@MOZ_APP_NAME@ has been diverted by a third party package (%s)" % diverter[0].strip() return conf_dir = os.path.join(os.environ["HOME"], ".mozilla", "@MOZ_APP_NAME@") appini = AppINIParser('/@MOZ_LIBDIR@') populate_item("BuildID", appini.buildid) profiles = Profiles(os.path.join(conf_dir, "profiles.ini"), appini) populate_item("Profiles", profiles.dump_profile_summaries()) if len(profiles) == 0: report["NoProfiles"] = 'True' for profile in profiles: if profile.running and not profile.current: report["UnreportableReason"] = "Firefox has been upgraded since you started it. Please restart all instances of Firefox and try again" return seen_default = False running_incompatible_addons = False forced_layers_accel = False addon_compat_check_disabled = False for profile in profiles: if profile.default and not seen_default and len(profiles) > 1: prefix = 'DefaultProfile' seen_default = True elif len(profiles) > 1: prefix = profile.id else: prefix = '' populate_item(prefix + "Extensions", profile.dump_extensions()) populate_item(prefix + "Locales", profile.dump_locales()) populate_item(prefix + "Themes", profile.dump_themes()) populate_item(prefix + "Plugins", profile.dump_plugins()) populate_item(prefix + "IncompatibleExtensions", profile.dump_active_but_incompatible_extensions()) populate_item(prefix + "Prefs", profile.dump_prefs()) populate_item(prefix + "PrefSources", profile.dump_pref_sources()) populate_item(prefix + "PrefErrors", profile.dump_pref_errors()) populate_item(prefix + "BrokenPermissions", profile.dump_files_with_broken_permissions()) if (profile.current or profile.default) and profile.has_active_but_incompatible_extensions: running_incompatible_addons = True if (profile.current or profile.default) and profile.has_forced_layers_acceleration: forced_layers_accel = True if (profile.current or profile.default) and profile.addon_compat_check_disabled: addon_compat_check_disabled = True crash_reports = [] report_to_mtime = {} most_recent_report = None most_recent_mtime = 0 for crash in glob(os.path.join(conf_dir, 'Crash Reports', 'submitted', '*.txt')): id = re.sub(r'\.txt$', '', os.path.basename(crash)) report_to_mtime[id] = os.stat(crash).st_mtime crash_reports.append(id) if most_recent_report == None or report_to_mtime[id] > most_recent_mtime: most_recent_report = id most_recent_mtime = report_to_mtime[id] def crashes_sort(a, b): if report_to_mtime[b] > report_to_mtime[a]: return 1 elif report_to_mtime[b] < report_to_mtime[a]: return -1 else: return 0 # Put the most recent first crash_reports.sort(key=functools.cmp_to_key(crashes_sort)) crash_reports_str = '' i = 0 for crash in crash_reports: crash_reports_str += crash + '\n' i += 1 if i == 15: break populate_item('SubmittedCrashIDs', crash_reports_str) populate_item('MostRecentCrashID', most_recent_report) plugin_packages = [] for profile in profiles: profile.get_plugin_packages(plugin_packages) if len(plugin_packages) > 0: attach_related_packages(report, plugin_packages) report["RunningIncompatibleAddons"] = 'True' if running_incompatible_addons == True else 'False' report["ForcedLayersAccel"] = 'True' if forced_layers_accel == True else 'False' report["AddonCompatCheckDisabled"] = 'True' if addon_compat_check_disabled == True else 'False' if '@MOZ_APP_NAME@' == 'firefox-trunk': report["Channel"] = 'nightly' append_tag('nightly-channel') if report["SourcePackage"] == 'firefox-trunk': report["SourcePackage"] = 'firefox' else: channelpref = Prefs(None, ['/@MOZ_LIBDIR@/defaults/pref/channel-prefs.js'], whitelist = [ r'app\.update\.channel' ]) if "app.update.channel" in channelpref: report["Channel"] = channelpref["app.update.channel"].value append_tag(channelpref["app.update.channel"].value + '-channel') else: report["Channel"] = 'Unavailable' if os.path.exists('/sys/bus/pci'): report['Lspci'] = command_output(['lspci','-vvnn']) attach_alsa(report) attach_network(report) attach_wifi(report) # Get apparmor stuff if the profile isn't disabled. copied from # source_apparmor.py until apport runs hooks via attach_related_packages apparmor_disable_dir = "/etc/apparmor.d/disable" add_apparmor = True if os.path.isdir(apparmor_disable_dir): for f in os.listdir(apparmor_disable_dir): if f.startswith("usr.bin.@MOZ_PKG_NAME@"): add_apparmor = False break if add_apparmor: attach_related_packages(report, ['apparmor', 'libapparmor1', 'libapparmor-perl', 'apparmor-utils', 'auditd', 'libaudit0']) attach_file(report, '/proc/version_signature', 'ProcVersionSignature') attach_file(report, '/proc/cmdline', 'ProcCmdline') sec_re = re.compile('audit\(|apparmor|selinux|security', re.IGNORECASE) report['KernLog'] = recent_kernlog(sec_re) if os.path.exists("/var/log/audit"): # this needs to be run as root report['AuditLog'] = recent_auditlog(sec_re) if __name__ == "__main__": import apport from apport import packaging D = {} D['Package'] = '@MOZ_PKG_NAME@' D['SourcePackage'] = '@MOZ_PKG_NAME@' add_info(D, None) for KEY in D.keys(): print('''-------------------%s: ------------------\n%s''' % (KEY, D[KEY])) debian/apport/blacklist.in0000664000000000000000000000014012321600535012765 0ustar %%ifdef MOZ_ENABLE_BREAKPAD /@MOZ_LIBDIR@/@MOZ_APP_NAME@ /@MOZ_LIBDIR@/plugin-container %%endif debian/apport/native-origins.in0000664000000000000000000000014712321600535013762 0ustar LP-PPA-ubuntu-mozilla-daily LP-PPA-ubuntu-mozilla-daily-firefox-aurora LP-PPA-mozillateam-firefox-next debian/firefox-mozsymbols.install.in0000664000000000000000000000011412321600535015034 0ustar %%ifdef MOZ_ENABLE_BREAKPAD @MOZ_DISTDIR@/*symbols.zip @MOZ_LIBDIR@ %%endif debian/firefox.lintian-overrides.in0000664000000000000000000000030312321600535014610 0ustar @MOZ_PKG_NAME@ binary: embedded-library @MOZ_LIBDIR@/libxul.so: libjpeg @MOZ_PKG_NAME@ binary: embedded-library @MOZ_LIBDIR@/libmozsqlite3.so: sqlite @MOZ_PKG_NAME@ binary: image-file-in-usr-lib debian/firefox-dev.links.in0000664000000000000000000000100412321600535013045 0ustar %%if DISTRIB_VERSION < 1210 @MOZ_LIBDIR@ @MOZ_SDKDIR@/bin @MOZ_IDLDIR@ @MOZ_SDKDIR@/idl @MOZ_INCDIR@ @MOZ_SDKDIR@/include @MOZ_SDKDIR@/sdk/lib @MOZ_SDKDIR@/lib @MOZ_LIBDIR@/libnspr4.so @MOZ_SDKDIR@/sdk/lib/libnspr4.so @MOZ_LIBDIR@/libplc4.so @MOZ_SDKDIR@/sdk/lib/libplc4.so @MOZ_LIBDIR@/libplds4.so @MOZ_SDKDIR@/sdk/lib/libplds4.so @MOZ_LIBDIR@/libmozalloc.so @MOZ_SDKDIR@/sdk/lib/libmozalloc.so @MOZ_LIBDIR@/libxpcom.so @MOZ_SDKDIR@/sdk/lib/libxpcom.so @MOZ_LIBDIR@/libxul.so @MOZ_SDKDIR@/sdk/lib/libxul.so %%endif debian/firefox.1.in0000664000000000000000000000464512321600535011327 0ustar .TH FIREFOX 1 2011-02-09 @MOZ_APP_NAME@ .SH NAME @MOZ_APP_NAME@ \- a free and open source web browser from Mozilla .SH SYNOPSIS .B @MOZ_APP_NAME@ [\fIOPTIONS\fR] [\fIurl\fR] .SH DESCRIPTION See http://support.mozilla.com/ for help using the browser. This manpage only describes how to run it. .SH OPTIONS .TP \fB\-h, \-\-help\fR Prints the command line options. .TP \fB\-g, \-\-debug\fR Starts \fB@MOZ_APP_NAME@\fR in a debugger. .TP \fB\-d, \-\-debugger\fR Specify the debugger in which to start \fB@MOZ_APP_NAME@\fR. The default is gdb. Used in conjunction with \fB-g\fR. .TP \fB\-a, \-\-debugger\-args\fR Specify arguments to pass to the debugger. Used in conjunction with \fB-g\fR. .TP \fB\-no\-remote\fR Don't connect to any other running instances of \fB@MOZ_APP_NAME@\fR. Use this if you want to run \fB@MOZ_APP_NAME@\fR in an entirely new process. By default, \fB@MOZ_APP_NAME@\fR will delegate a command to an already running instance. .TP \fB\-ProfileManager\fR Start the profilemanager. Use this to choose the profile you would like to run \fB@MOZ_APP_NAME@\fR with. You will need to also use \fB\-no\-remote\fR if there is already a running \fB@MOZ_APP_NAME@\fR instance. .TP \fB\-P\fR \fIprofile\fR Start \fB@MOZ_APP_NAME@\fR with the profile named \fIprofile\fR. Will start the profile manager if a valid profile name is not specified. You will need to also use \fB\-no\-remote\fR if there is already a running \fB@MOZ_APP_NAME@\fR instance. .TP \fB\-safe\-mode\fR Start \fB@MOZ_APP_NAME@\fR in safe-mode. This disables all third-party extensions, and may be necessary if you are having problems with an extension you installed. .TP \fB\-new\-tab\fR \fIurl\fR Open \fIurl\fR in a new tab. .TP \fB\-new\-window\fR \fIurl\fR Open \fIurl\fR in a new window. .TP \fB\-v, \-version\fR Print the current version of \fB@MOZ_APP_NAME@\fR. .TP \fB\-UILocale\fR \fIlocale\fR Start \fB@MOZ_APP_NAME@\fR with the specified locale \fIlocale\fR. Use this to override your environment .TP \fB\-preferences\fR Open the preferences dialog. .TP \fB\-private\fR Start \fB@MOZ_APP_NAME@\fR in private browsing mode .TP \fB\-private\-toggle\fR Toggle private browsing mode .TP \fB\-setDefaultBrowser\fR Set \fB@MOZ_APP_NAME@\fR as the default web browser .TP \fB\-search\fR \fIterm\fR Search for \fIterm\fR with your default search engine .TP \fB\-jsconsole\fR Open the Error console. If \fB@MOZ_APP_NAME@\fR is not already running, this will open a new browser window too debian/MPL0000664000000000000000000007422512321600535007552 0ustar MOZILLA PUBLIC LICENSE Version 1.1 --------------- 1. Definitions. 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "Executable" means Covered Code in any form other than Source Code. 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8. "License" means this document. 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. 3. Distribution Obligations. 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4. Intellectual Property Matters (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. 6. Versions of the License. 6.1. New Versions. Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. EXHIBIT A -Mozilla Public License. ``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 ______________________________________. The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. Contributor(s): ______________________________________. Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] ---------------------------------------------------------------------- AMENDMENTS The Netscape Public License Version 1.1 ("NPL") consists of the Mozilla Public License Version 1.1 with the following Amendments, including Exhibit A-Netscape Public License. Files identified with "Exhibit A-Netscape Public License" are governed by the Netscape Public License Version 1.1. Additional Terms applicable to the Netscape Public License. I. Effect. These additional terms described in this Netscape Public License -- Amendments shall apply to the Mozilla Communicator client code and to all Covered Code under this License. II. "Netscape's Branded Code" means Covered Code that Netscape distributes and/or permits others to distribute under one or more trademark(s) which are controlled by Netscape but which are not licensed for use under this License. III. Netscape and logo. This License does not grant any rights to use the trademarks "Netscape", the "Netscape N and horizon" logo or the "Netscape lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript", "Smart Browsing" even if such marks are included in the Original Code or Modifications. IV. Inability to Comply Due to Contractual Obligation. Prior to licensing the Original Code under this License, Netscape has licensed third party code for use in Netscape's Branded Code. To the extent that Netscape is limited contractually from making such third party code available under this License, Netscape may choose to reintegrate such code into Covered Code without being required to distribute such code in Source Code form, even if such code would otherwise be considered "Modifications" under this License. V. Use of Modifications and Covered Code by Initial Developer. V.1. In General. The obligations of Section 3 apply to Netscape, except to the extent specified in this Amendment, Section V.2 and V.3. V.2. Other Products. Netscape may include Covered Code in products other than the Netscape's Branded Code which are released by Netscape during the two (2) years following the release date of the Original Code, without such additional products becoming subject to the terms of this License, and may license such additional products on different terms from those contained in this License. V.3. Alternative Licensing. Netscape may license the Source Code of Netscape's Branded Code, including Modifications incorporated therein, without such Netscape Branded Code becoming subject to the terms of this License, and may license such Netscape Branded Code on different terms from those contained in this License. VI. Litigation. Notwithstanding the limitations of Section 11 above, the provisions regarding litigation in Section 11(a), (b) and (c) of the License shall apply to all disputes relating to this License. EXHIBIT A-Netscape Public License. "The contents of this file are subject to the Netscape 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/NPL/ 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 Communicator client code, released March 31, 1998. The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are Copyright (C) 1998-1999 Netscape Communications Corporation. All Rights Reserved. Contributor(s): ______________________________________. Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the NPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the NPL or the [___] License." debian/control0000664000000000000000000007721212321600542010577 0ustar # vim:noexpandtab: Source: firefox Section: web Priority: optional Maintainer: Ubuntu Mozilla Team Vcs-Bzr: https://code.launchpad.net/~mozillateam/firefox/firefox.trusty Build-Depends: cdbs, locales, debhelper (>= 7), autotools-dev, autoconf2.13, quilt, zip, libx11-dev, libxt-dev, libxext-dev, libgtk2.0-dev (>= 2.14), libglib2.0-dev (>= 2.18), libpango1.0-dev (>= 1.14.0), libfontconfig1-dev, libfreetype6-dev (>= 2.0.1), libgconf2-dev (>= 1.2.1), libgnomeui-dev (>= 2.2.0), libstartup-notification0-dev, libasound2-dev, libcurl4-openssl-dev, libdbus-glib-1-dev (>= 0.60), libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, hardening-wrapper, lsb-release, libiw-dev, mesa-common-dev, libnotify-dev (>= 0.4), libxrender-dev, libpulse-dev, yasm (>= 1.1), unzip, dbus-x11, xvfb, python (>= 2.7), libffi-dev (>= 3.0.9) [arm64] Standards-Version: 3.9.1 #XS-Testsuite: autopkgtest Package: firefox Architecture: any Depends: lsb-release, ${misc:Depends}, ${shlibs:Depends} Recommends: xul-ext-ubufox, ${support:Recommends}, libcanberra0, libdbusmenu-glib4, libdbusmenu-gtk4 Provides: www-browser, iceweasel, gnome-www-browser, ${app:Provides} Suggests: fonts-lyx, ${support:Suggests} Breaks: ${transitional:Breaks} Replaces: ${transitional:Replaces} Conflicts: ${app:Conflicts}, ${transitional:Conflicts} XB-Xul-AppId: {ec8030f7-c20a-464f-9b0e-13a3a9e97384} Description: Safe and easy web browser from Mozilla Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. Package: firefox-dbg Architecture: any Section: debug Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, firefox (= ${binary:Version}) Provides: ${app:Provides} Conflicts: ${app:Conflicts}, Description: Safe and easy web browser from Mozilla - debug symbols Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the debugging symbols for the Firefox web browser Package: firefox-dev Architecture: any Section: devel Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, firefox (= ${binary:Version}) Provides: ${app:Provides} Conflicts: xulrunner-2.0-dev, xulrunner-1.9.2-dev, xulrunner-1.9-dev, ${app:Conflicts} Description: Safe and easy web browser from Mozilla - development files Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the headers and SDK for building plugins with Firefox Package: firefox-mozsymbols Architecture: amd64 i386 armel Section: debug Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, Provides: ${app:Provides} Conflicts: ${app:Conflicts} Description: Safe and easy web browser from Mozilla - Breakpad symbols Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the Firefox symbols in a format expected by Mozilla's Breakpad. Eventually this package should go away and the symbol upload be implemented in soyuz (or other builders that build this package) Package: firefox-testsuite Architecture: any Section: misc Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, firefox (= ${binary:Version}), firefox-locale-af (= ${binary:Version}), firefox-locale-an (= ${binary:Version}), firefox-locale-ar (= ${binary:Version}), firefox-locale-as (= ${binary:Version}), firefox-locale-ast (= ${binary:Version}), firefox-locale-be (= ${binary:Version}), firefox-locale-bg (= ${binary:Version}), firefox-locale-bn (= ${binary:Version}), firefox-locale-br (= ${binary:Version}), firefox-locale-bs (= ${binary:Version}), firefox-locale-ca (= ${binary:Version}), firefox-locale-cs (= ${binary:Version}), firefox-locale-csb (= ${binary:Version}), firefox-locale-cy (= ${binary:Version}), firefox-locale-da (= ${binary:Version}), firefox-locale-de (= ${binary:Version}), firefox-locale-el (= ${binary:Version}), firefox-locale-en (= ${binary:Version}), firefox-locale-eo (= ${binary:Version}), firefox-locale-es (= ${binary:Version}), firefox-locale-et (= ${binary:Version}), firefox-locale-eu (= ${binary:Version}), firefox-locale-fa (= ${binary:Version}), firefox-locale-fi (= ${binary:Version}), firefox-locale-fr (= ${binary:Version}), firefox-locale-fy (= ${binary:Version}), firefox-locale-ga (= ${binary:Version}), firefox-locale-gd (= ${binary:Version}), firefox-locale-gl (= ${binary:Version}), firefox-locale-gu (= ${binary:Version}), firefox-locale-he (= ${binary:Version}), firefox-locale-hi (= ${binary:Version}), firefox-locale-hr (= ${binary:Version}), firefox-locale-hu (= ${binary:Version}), firefox-locale-hy (= ${binary:Version}), firefox-locale-id (= ${binary:Version}), firefox-locale-is (= ${binary:Version}), firefox-locale-it (= ${binary:Version}), firefox-locale-ja (= ${binary:Version}), firefox-locale-ka (= ${binary:Version}), firefox-locale-kk (= ${binary:Version}), firefox-locale-km (= ${binary:Version}), firefox-locale-kn (= ${binary:Version}), firefox-locale-ko (= ${binary:Version}), firefox-locale-ku (= ${binary:Version}), firefox-locale-lg (= ${binary:Version}), firefox-locale-lt (= ${binary:Version}), firefox-locale-lv (= ${binary:Version}), firefox-locale-mai (= ${binary:Version}), firefox-locale-mk (= ${binary:Version}), firefox-locale-ml (= ${binary:Version}), firefox-locale-mn (= ${binary:Version}), firefox-locale-mr (= ${binary:Version}), firefox-locale-ms (= ${binary:Version}), firefox-locale-nb (= ${binary:Version}), firefox-locale-nl (= ${binary:Version}), firefox-locale-nn (= ${binary:Version}), firefox-locale-nso (= ${binary:Version}), firefox-locale-oc (= ${binary:Version}), firefox-locale-or (= ${binary:Version}), firefox-locale-pa (= ${binary:Version}), firefox-locale-pl (= ${binary:Version}), firefox-locale-pt (= ${binary:Version}), firefox-locale-ro (= ${binary:Version}), firefox-locale-ru (= ${binary:Version}), firefox-locale-si (= ${binary:Version}), firefox-locale-sk (= ${binary:Version}), firefox-locale-sl (= ${binary:Version}), firefox-locale-sq (= ${binary:Version}), firefox-locale-sr (= ${binary:Version}), firefox-locale-sv (= ${binary:Version}), firefox-locale-sw (= ${binary:Version}), firefox-locale-ta (= ${binary:Version}), firefox-locale-te (= ${binary:Version}), firefox-locale-th (= ${binary:Version}), firefox-locale-tr (= ${binary:Version}), firefox-locale-uk (= ${binary:Version}), firefox-locale-vi (= ${binary:Version}), firefox-locale-xh (= ${binary:Version}), firefox-locale-zh-hans (= ${binary:Version}), firefox-locale-zh-hant (= ${binary:Version}), firefox-locale-zu (= ${binary:Version}), python, dbus-x11, xvfb, make, notify-osd, metacity, language-pack-en-base, language-pack-es-base, language-pack-fr-base, language-pack-pt-base, fonts-arabeyes, fonts-kacst, fonts-takao-mincho, fonts-takao-gothic, fonts-wqy-zenhei, fonts-arphic-uming, fonts-arphic-ukai, fonts-nanum, fonts-nanum-coding, fonts-unfonts-core, fonts-liberation, gnome-session, gnome-settings-daemon, ubuntu-settings, light-themes, unzip, hunspell-en-us, libgl1-mesa-dri Provides: ${app:Provides} Conflicts: ${app:Conflicts} Description: Safe and easy web browser from Mozilla - testsuite Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the Firefox testsuite # Transitional packages below here # Can be dropped after 14.04 Package: firefox-globalmenu Architecture: any Section: oldlibs Priority: extra Depends: firefox, ${misc:Depends} Description: Safe and easy web browser from Mozilla (transitional package) This is a transitional package to ensure that upgrades work correctly. It can be safely removed # Language packs below here Package: firefox-locale-af Architecture: any Depends: ${misc:Depends} Replaces: language-pack-af-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Afrikaans language pack for Firefox This package contains Afrikaans translations and search plugins for Firefox Package: firefox-locale-an Architecture: any Depends: ${misc:Depends} Replaces: language-pack-an-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Aragonese language pack for Firefox This package contains Aragonese translations and search plugins for Firefox Package: firefox-locale-ar Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ar-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Arabic language pack for Firefox This package contains Arabic translations and search plugins for Firefox Package: firefox-locale-as Architecture: any Depends: ${misc:Depends} Replaces: language-pack-as-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Assamese language pack for Firefox This package contains Assamese translations and search plugins for Firefox Package: firefox-locale-ast Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ast-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Asturian language pack for Firefox This package contains Asturian translations and search plugins for Firefox Package: firefox-locale-be Architecture: any Depends: ${misc:Depends} Replaces: language-pack-be-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Belarusian language pack for Firefox This package contains Belarusian translations and search plugins for Firefox Package: firefox-locale-bg Architecture: any Depends: ${misc:Depends} Replaces: language-pack-bg-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Bulgarian language pack for Firefox This package contains Bulgarian translations and search plugins for Firefox Package: firefox-locale-bn Architecture: any Depends: ${misc:Depends} Replaces: language-pack-bn-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Bengali language pack for Firefox This package contains Bengali translations and search plugins for Firefox Package: firefox-locale-br Architecture: any Depends: ${misc:Depends} Replaces: language-pack-br-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Breton language pack for Firefox This package contains Breton translations and search plugins for Firefox Package: firefox-locale-bs Architecture: any Depends: ${misc:Depends} Replaces: language-pack-bs-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Bosnian language pack for Firefox This package contains Bosnian translations and search plugins for Firefox Package: firefox-locale-ca Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ca-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Catalan; Valencian language pack for Firefox This package contains Catalan; Valencian translations and search plugins for Firefox Package: firefox-locale-cs Architecture: any Depends: ${misc:Depends} Replaces: language-pack-cs-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Czech language pack for Firefox This package contains Czech translations and search plugins for Firefox Package: firefox-locale-csb Architecture: any Depends: ${misc:Depends} Replaces: language-pack-csb-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Kashubian language pack for Firefox This package contains Kashubian translations and search plugins for Firefox Package: firefox-locale-cy Architecture: any Depends: ${misc:Depends} Replaces: language-pack-cy-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Welsh language pack for Firefox This package contains Welsh translations and search plugins for Firefox Package: firefox-locale-da Architecture: any Depends: ${misc:Depends} Replaces: language-pack-da-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Danish language pack for Firefox This package contains Danish translations and search plugins for Firefox Package: firefox-locale-de Architecture: any Depends: ${misc:Depends} Replaces: language-pack-de-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: German language pack for Firefox This package contains German translations and search plugins for Firefox Package: firefox-locale-el Architecture: any Depends: ${misc:Depends} Replaces: language-pack-el-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Greek language pack for Firefox This package contains Greek translations and search plugins for Firefox Package: firefox-locale-en Architecture: any Depends: ${misc:Depends} Replaces: language-pack-en-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: English language pack for Firefox This package contains English translations and search plugins for Firefox Package: firefox-locale-eo Architecture: any Depends: ${misc:Depends} Replaces: language-pack-eo-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Esperanto language pack for Firefox This package contains Esperanto translations and search plugins for Firefox Package: firefox-locale-es Architecture: any Depends: ${misc:Depends} Replaces: language-pack-es-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Spanish; Castilian language pack for Firefox This package contains Spanish; Castilian translations and search plugins for Firefox Package: firefox-locale-et Architecture: any Depends: ${misc:Depends} Replaces: language-pack-et-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Estonian language pack for Firefox This package contains Estonian translations and search plugins for Firefox Package: firefox-locale-eu Architecture: any Depends: ${misc:Depends} Replaces: language-pack-eu-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Basque language pack for Firefox This package contains Basque translations and search plugins for Firefox Package: firefox-locale-fa Architecture: any Depends: ${misc:Depends} Replaces: language-pack-fa-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Persian language pack for Firefox This package contains Persian translations and search plugins for Firefox Package: firefox-locale-fi Architecture: any Depends: ${misc:Depends} Replaces: language-pack-fi-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Finnish language pack for Firefox This package contains Finnish translations and search plugins for Firefox Package: firefox-locale-fr Architecture: any Depends: ${misc:Depends} Replaces: language-pack-fr-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: French language pack for Firefox This package contains French translations and search plugins for Firefox Package: firefox-locale-fy Architecture: any Depends: ${misc:Depends} Replaces: language-pack-fy-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Western Frisian language pack for Firefox This package contains Western Frisian translations and search plugins for Firefox Package: firefox-locale-ga Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ga-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Irish language pack for Firefox This package contains Irish translations and search plugins for Firefox Package: firefox-locale-gd Architecture: any Depends: ${misc:Depends} Replaces: language-pack-gd-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Gaelic; Scottish Gaelic language pack for Firefox This package contains Gaelic; Scottish Gaelic translations and search plugins for Firefox Package: firefox-locale-gl Architecture: any Depends: ${misc:Depends} Replaces: language-pack-gl-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Galician language pack for Firefox This package contains Galician translations and search plugins for Firefox Package: firefox-locale-gu Architecture: any Depends: ${misc:Depends} Replaces: language-pack-gu-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Gujarati language pack for Firefox This package contains Gujarati translations and search plugins for Firefox Package: firefox-locale-he Architecture: any Depends: ${misc:Depends} Replaces: language-pack-he-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Hebrew language pack for Firefox This package contains Hebrew translations and search plugins for Firefox Package: firefox-locale-hi Architecture: any Depends: ${misc:Depends} Replaces: language-pack-hi-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Hindi language pack for Firefox This package contains Hindi translations and search plugins for Firefox Package: firefox-locale-hr Architecture: any Depends: ${misc:Depends} Replaces: language-pack-hr-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Croatian language pack for Firefox This package contains Croatian translations and search plugins for Firefox Package: firefox-locale-hu Architecture: any Depends: ${misc:Depends} Replaces: language-pack-hu-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Hungarian language pack for Firefox This package contains Hungarian translations and search plugins for Firefox Package: firefox-locale-hy Architecture: any Depends: ${misc:Depends} Replaces: language-pack-hy-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Armenian language pack for Firefox This package contains Armenian translations and search plugins for Firefox Package: firefox-locale-id Architecture: any Depends: ${misc:Depends} Replaces: language-pack-id-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Indonesian language pack for Firefox This package contains Indonesian translations and search plugins for Firefox Package: firefox-locale-is Architecture: any Depends: ${misc:Depends} Replaces: language-pack-is-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Icelandic language pack for Firefox This package contains Icelandic translations and search plugins for Firefox Package: firefox-locale-it Architecture: any Depends: ${misc:Depends} Replaces: language-pack-it-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Italian language pack for Firefox This package contains Italian translations and search plugins for Firefox Package: firefox-locale-ja Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ja-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Japanese language pack for Firefox This package contains Japanese translations and search plugins for Firefox Package: firefox-locale-ka Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-kk Architecture: any Depends: ${misc:Depends} Replaces: language-pack-kk-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Kazakh language pack for Firefox This package contains Kazakh translations and search plugins for Firefox Package: firefox-locale-km Architecture: any Depends: ${misc:Depends} Replaces: language-pack-km-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Central Khmer language pack for Firefox This package contains Central Khmer translations and search plugins for Firefox Package: firefox-locale-kn Architecture: any Depends: ${misc:Depends} Replaces: language-pack-kn-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Kannada language pack for Firefox This package contains Kannada translations and search plugins for Firefox Package: firefox-locale-ko Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ko-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Korean language pack for Firefox This package contains Korean translations and search plugins for Firefox Package: firefox-locale-ku Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ku-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Kurdish language pack for Firefox This package contains Kurdish translations and search plugins for Firefox Package: firefox-locale-lg Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-lt Architecture: any Depends: ${misc:Depends} Replaces: language-pack-lt-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Lithuanian language pack for Firefox This package contains Lithuanian translations and search plugins for Firefox Package: firefox-locale-lv Architecture: any Depends: ${misc:Depends} Replaces: language-pack-lv-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Latvian language pack for Firefox This package contains Latvian translations and search plugins for Firefox Package: firefox-locale-mai Architecture: any Depends: ${misc:Depends} Replaces: language-pack-mai-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Maithili language pack for Firefox This package contains Maithili translations and search plugins for Firefox Package: firefox-locale-mk Architecture: any Depends: ${misc:Depends} Replaces: language-pack-mk-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Macedonian language pack for Firefox This package contains Macedonian translations and search plugins for Firefox Package: firefox-locale-ml Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ml-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Malayalam language pack for Firefox This package contains Malayalam translations and search plugins for Firefox Package: firefox-locale-mn Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-mr Architecture: any Depends: ${misc:Depends} Replaces: language-pack-mr-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Marathi language pack for Firefox This package contains Marathi translations and search plugins for Firefox Package: firefox-locale-ms Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-nb Architecture: any Depends: ${misc:Depends} Replaces: language-pack-nb-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Bokmål, Norwegian; Norwegian Bokmål language pack for Firefox This package contains Bokmål, Norwegian; Norwegian Bokmål translations and search plugins for Firefox Package: firefox-locale-nl Architecture: any Depends: ${misc:Depends} Replaces: language-pack-nl-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Dutch; Flemish language pack for Firefox This package contains Dutch; Flemish translations and search plugins for Firefox Package: firefox-locale-nn Architecture: any Depends: ${misc:Depends} Replaces: language-pack-nn-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Norwegian Nynorsk; Nynorsk, Norwegian language pack for Firefox This package contains Norwegian Nynorsk; Nynorsk, Norwegian translations and search plugins for Firefox Package: firefox-locale-nso Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-oc Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-or Architecture: any Depends: ${misc:Depends} Replaces: language-pack-or-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Oriya language pack for Firefox This package contains Oriya translations and search plugins for Firefox Package: firefox-locale-pa Architecture: any Depends: ${misc:Depends} Replaces: language-pack-pa-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Panjabi; Punjabi language pack for Firefox This package contains Panjabi; Punjabi translations and search plugins for Firefox Package: firefox-locale-pl Architecture: any Depends: ${misc:Depends} Replaces: language-pack-pl-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Polish language pack for Firefox This package contains Polish translations and search plugins for Firefox Package: firefox-locale-pt Architecture: any Depends: ${misc:Depends} Replaces: language-pack-pt-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Portuguese language pack for Firefox This package contains Portuguese translations and search plugins for Firefox Package: firefox-locale-ro Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ro-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Romanian language pack for Firefox This package contains Romanian translations and search plugins for Firefox Package: firefox-locale-ru Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ru-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Russian language pack for Firefox This package contains Russian translations and search plugins for Firefox Package: firefox-locale-si Architecture: any Depends: ${misc:Depends} Replaces: language-pack-si-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Sinhala; Sinhalese language pack for Firefox This package contains Sinhala; Sinhalese translations and search plugins for Firefox Package: firefox-locale-sk Architecture: any Depends: ${misc:Depends} Replaces: language-pack-sk-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Slovak language pack for Firefox This package contains Slovak translations and search plugins for Firefox Package: firefox-locale-sl Architecture: any Depends: ${misc:Depends} Replaces: language-pack-sl-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Slovenian language pack for Firefox This package contains Slovenian translations and search plugins for Firefox Package: firefox-locale-sq Architecture: any Depends: ${misc:Depends} Replaces: language-pack-sq-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Albanian language pack for Firefox This package contains Albanian translations and search plugins for Firefox Package: firefox-locale-sr Architecture: any Depends: ${misc:Depends} Replaces: language-pack-sr-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Serbian language pack for Firefox This package contains Serbian translations and search plugins for Firefox Package: firefox-locale-sv Architecture: any Depends: ${misc:Depends} Replaces: language-pack-sv-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Swedish language pack for Firefox This package contains Swedish translations and search plugins for Firefox Package: firefox-locale-sw Architecture: any Depends: ${misc:Depends} Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Transitional package for unavailable language This language is unavailable for the current version of Firefox . This is an empty transitional package to ensure a clean upgrade process. You can safely remove this package after installation. Package: firefox-locale-ta Architecture: any Depends: ${misc:Depends} Replaces: language-pack-ta-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Tamil language pack for Firefox This package contains Tamil translations and search plugins for Firefox Package: firefox-locale-te Architecture: any Depends: ${misc:Depends} Replaces: language-pack-te-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Telugu language pack for Firefox This package contains Telugu translations and search plugins for Firefox Package: firefox-locale-th Architecture: any Depends: ${misc:Depends} Replaces: language-pack-th-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Thai language pack for Firefox This package contains Thai translations and search plugins for Firefox Package: firefox-locale-tr Architecture: any Depends: ${misc:Depends} Replaces: language-pack-tr-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Turkish language pack for Firefox This package contains Turkish translations and search plugins for Firefox Package: firefox-locale-uk Architecture: any Depends: ${misc:Depends} Replaces: language-pack-uk-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Ukrainian language pack for Firefox This package contains Ukrainian translations and search plugins for Firefox Package: firefox-locale-vi Architecture: any Depends: ${misc:Depends} Replaces: language-pack-vi-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Vietnamese language pack for Firefox This package contains Vietnamese translations and search plugins for Firefox Package: firefox-locale-xh Architecture: any Depends: ${misc:Depends} Replaces: language-pack-xh-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Xhosa language pack for Firefox This package contains Xhosa translations and search plugins for Firefox Package: firefox-locale-zh-hans Architecture: any Depends: ${misc:Depends} Replaces: language-pack-zh-hans-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Simplified Chinese language pack for Firefox This package contains Simplified Chinese translations and search plugins for Firefox Package: firefox-locale-zh-hant Architecture: any Depends: ${misc:Depends} Replaces: language-pack-zh-hant-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Traditional Chinese language pack for Firefox This package contains Traditional Chinese translations and search plugins for Firefox Package: firefox-locale-zu Architecture: any Depends: ${misc:Depends} Replaces: language-pack-zu-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: Zulu language pack for Firefox This package contains Zulu translations and search plugins for Firefox debian/build/0000775000000000000000000000000012321600535010264 5ustar debian/build/dump-langpack-control-entries.pl0000664000000000000000000000243112321600535016471 0ustar #!/usr/bin/perl use strict; use warnings; my $lp_avail_desc; my $lp_unavail_desc; my %all; my %shipped; { my $file; local $/=undef; open($file, "debian/control.langpacks") or die "Couldn't find control.langpacks"; $lp_avail_desc = <$file>; open($file, "debian/control.langpacks.unavail") or die "Couldn't find control.langpacks.unavail"; $lp_unavail_desc = <$file>; } open(my $all_file, "debian/config/locales.all") or die "Failed to open debian/config/locales.all"; open(my $shipped_file, "debian/config/locales.shipped") or die "Failed to open debian/config/locales.shipped"; while (<$all_file>) { chomp($_); /^([^:#]*):([^:]*)$/ && do { my $pkgname = $1; my $desc = $2; if ($desc eq "") { die "Malformed locales.all"; } $all{$pkgname} = $desc; } } while (<$shipped_file>) { chomp($_); /^([^:#]*):([^:]*)$/ && do { my $locale = $1; my $pkgname = $2; if ($pkgname eq "") { die "Malformed locales.shipped"; } $shipped{$pkgname} = 1; } } close($all_file); close($shipped_file); foreach my $pkg (sort(keys(%all))) { my $entry = exists $shipped{$pkg} ? $lp_avail_desc : $lp_unavail_desc; $entry =~ s/\@LANGCODE\@/$pkg/g; $entry =~ s/\@LANG\@/$all{$pkg}/g; print $entry; } debian/build/xpi-id.py0000664000000000000000000000110012321600535012020 0ustar #!/usr/bin/python import sys import xml.dom.minidom import os import zipfile if __name__ == '__main__': if not len(sys.argv) == 2: print >> sys.stderr, "Must specify an xpi" exit(1) dom_doc = xml.dom.minidom.parseString(zipfile.ZipFile(sys.argv[1]).open('install.rdf').read().strip()) try: attr = dom_doc.getElementsByTagName('RDF:Description')[0].attributes['em:id'] except IndexError: attr = dom_doc.getElementsByTagName('Description')[0].attributes['em:id'] assert attr.value print "%s" % attr.value exit(0) debian/build/keepalive-wrapper.py0000664000000000000000000000406712321600535014270 0ustar #!/usr/bin/python import datetime import os import select import subprocess import sys import thread proc = None def run_child(args, fd): global proc f = os.fdopen(fd, 'w') proc = subprocess.Popen(args) # Tell main thread to continue f.write('a') f.flush() f.write(str(proc.wait())) def main(): global proc def usage(): sys.stderr.write('Usage: %s [ ..]\n' % sys.argv[0]) sys.exit(1) if len(sys.argv) < 3: usage() try: max_mins = int(sys.argv[1]) except: usage() max_days = max_mins / (24 * 60) max_seconds = (max_mins % (max_days * 24 * 60) if max_days > 0 else max_mins) * 60 start = datetime.datetime.now() (rfd, wfd) = os.pipe() f = os.fdopen(rfd, 'r') thread.start_new_thread(run_child, (sys.argv[2:], wfd)) # Make sure that we have a process before continuing f.read(1) target_timeout = 60 last_target_timeout = target_timeout timeout = target_timeout terminated = False laststart = None while True: if target_timeout != last_target_timeout: last_target_timeout = target_timeout timeout = target_timeout elif laststart is not None: now = datetime.datetime.now() timeout = timeout - (((now - laststart).total_seconds() - target_timeout) / 4) laststart = datetime.datetime.now() (r, w, x) = select.select([f], [], [], timeout) if len(r) != 0: sys.exit(int(f.read())) duration = datetime.datetime.now() - start if not terminated: sys.stdout.write('*** KEEP ALIVE MARKER ***\n') sys.stdout.write('Total duration: %s\n' % str(duration)) sys.stdout.flush() if (duration.days >= max_days and duration.seconds >= max_seconds) or terminated: if not terminated: sys.stderr.write('Process max time exceeded, attempting to terminate\n') sys.stderr.flush() proc.terminate() terminated = True target_timeout = 15 else: sys.stderr.write('Attempting to kill process\n') sys.stderr.flush() proc.kill() if __name__ == '__main__': main() debian/build/fix-mozinfo-appname.py0000664000000000000000000000223012321600535014517 0ustar #!/usr/bin/python import os import sys class JsonValue: """ A class to serialize Python values into JSON-compatible representations. """ def __init__(self, v): if v is not None and not (isinstance(v,str) or isinstance(v,bool) or isinstance(v,int)): raise Exception("Unhandled data type: %s" % type(v)) self.v = v def __repr__(self): if self.v is None: return "null" if isinstance(self.v,bool): return str(self.v).lower() return repr(self.v) def jsonify(d): """ Return a JSON string of the dict |d|. Only handles a subset of Python value types: bool, str, int, None. """ jd = {} for k, v in d.iteritems(): jd[k] = JsonValue(v) return repr(jd) if __name__ == '__main__': if len(sys.argv) != 3: print >>sys.stderr, "Must specify a single file and appname" with open(sys.argv[1], 'r') as f: s = eval(f.read(),{'true':True,'false':False,'null':None}) s['appname'] = sys.argv[2] with open(sys.argv[1] + '.tmp', 'w') as g: g.write(jsonify(s)) os.rename(sys.argv[1] + '.tmp', sys.argv[1]) debian/build/Expression.py0000664000000000000000000001246012321600535013000 0ustar # 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/. """ Parses and evaluates simple statements for Preprocessor: Expression currently supports the following grammar, whitespace is ignored: expression : unary ( ( '==' | '!=' ) unary ) ? ; unary : '!'? value ; value : [0-9]+ # integer | \w+ # string identifier or value; """ import re class Expression: def __init__(self, expression_string): """ Create a new expression with this string. The expression will already be parsed into an Abstract Syntax Tree. """ self.content = expression_string self.offset = 0 self.__ignore_whitespace() self.e = self.__get_equality() if self.content: raise Expression.ParseError, self def __get_equality(self): """ Production: unary ( ( '==' | '!=' ) unary ) ? """ if not len(self.content): return None rv = Expression.__AST("equality") # unary rv.append(self.__get_unary()) self.__ignore_whitespace() if not re.match('([=!]=|[<>]=?|=[<>])', self.content): # no equality needed, short cut to our prime unary return rv[0] # append operator op_length = 1 if re.match('[<>][^=]', self.content) else 2 rv.append(Expression.__ASTLeaf('op', self.content[:op_length])) self.__strip(op_length) self.__ignore_whitespace() rv.append(self.__get_unary()) self.__ignore_whitespace() return rv def __get_unary(self): """ Production: '!'? value """ # eat whitespace right away, too not_ws = re.match('!\s*', self.content) if not not_ws: return self.__get_value() rv = Expression.__AST('not') self.__strip(not_ws.end()) rv.append(self.__get_value()) self.__ignore_whitespace() return rv def __get_value(self): """ Production: ( [0-9]+ | \w+) Note that the order is important, and the expression is kind-of ambiguous as \w includes 0-9. One could make it unambiguous by removing 0-9 from the first char of a string literal. """ rv = None word_len = re.match('[\-\+]?[0-9]*', self.content).end() if word_len: value = int(self.content[:word_len]) rv = Expression.__ASTLeaf('int', value) else: word_len = re.match('\w*', self.content).end() if word_len: rv = Expression.__ASTLeaf('string', self.content[:word_len]) else: raise Expression.ParseError, self self.__strip(word_len) self.__ignore_whitespace() return rv def __ignore_whitespace(self): ws_len = re.match('\s*', self.content).end() self.__strip(ws_len) return def __strip(self, length): """ Remove a given amount of chars from the input and update the offset. """ self.content = self.content[length:] self.offset += length def evaluate(self, context): """ Evaluate the expression with the given context """ # Helper function to evaluate __get_equality results def eval_equality(tok): left = opmap[tok[0].type](tok[0]) right = opmap[tok[2].type](tok[2]) rv = left == right if tok[1].value == '==': return left == right elif tok[1].value == '!=': return not left == right elif tok[1].value == '<': return left < right elif tok[1].value == '>': return left > right elif tok[1].value == '<=' or tok[1].value == '=<': return left <= right elif tok[1].value == '>=' or tok[1].value == '=>': return left >= right raise RuntimeError('Invalid operator "%s"' % tok[1].value) # Mapping from token types to evaluator functions # Apart from (non-)equality, all these can be simple lambda forms. opmap = { 'equality': eval_equality, 'not': lambda tok: not opmap[tok[0].type](tok[0]), 'string': lambda tok: context[tok.value], 'int': lambda tok: tok.value} return opmap[self.e.type](self.e); class __AST(list): """ Internal class implementing Abstract Syntax Tree nodes """ def __init__(self, type): self.type = type super(self.__class__, self).__init__(self) class __ASTLeaf: """ Internal class implementing Abstract Syntax Tree leafs """ def __init__(self, type, value): self.value = value self.type = type def __str__(self): return self.value.__str__() def __repr__(self): return self.value.__repr__() class ParseError(StandardError): """ Error raised when parsing fails. It has two members, offset and content, which give the offset of the error and the offending content. """ def __init__(self, expression): self.offset = expression.offset self.content = expression.content[:3] def __str__(self): return 'Unexpected content at offset %i, "%s"'%(self.offset, self.content) class Context(dict): """ This class holds variable values by subclassing dict, and while it truthfully reports True and False on name in context it returns the variable name itself on context["name"] to reflect the ambiguity between string literals and preprocessor variables. """ def __getitem__(self, key): if key in self: return super(self.__class__, self).__getitem__(key) return key debian/build/create-tarball.py0000664000000000000000000003330412321600535013523 0ustar #!/usr/bin/python from optparse import OptionParser import os import os.path import re import shutil import subprocess import sys import time import urllib import xml.dom.minidom import json import tempfile import select class DependencyNotFound(Exception): def __init__(self, depend): super(DependencyNotFound, self).__init__(depend) self.path = depend[0] self.package = depend[1] def __str__(self): return 'Dependency not found: %s. Please install package %s' % (self.path, self.package) class InvalidTagError(Exception): def __init__(self, tag): super(InvalidTagError, self).__init__(tag) self.tag = tag def __str__(self): return "Tag %s is invalid" % self.tag def do_exec(args, quiet=True, ignore_error=False, cwd=None): if quiet == False: print 'Running %s%s' % (' '.join([x for x in args]), '' if cwd == None else (' in %s' % cwd)) out = '' p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd) while p.poll() == None: (r, w, e) = select.select([p.stdout], [], [], 5) for f in r: d = f.read() out += d if quiet == False: print d if p.returncode != 0 and ignore_error == False: raise Exception("Command '%s' returned exit-status %d:\n%s" % (args[0], p.returncode, p.stderr.read())) return (p.returncode, out) def ensure_cache(repo, cache): dest = os.path.join(cache, os.path.basename(repo)) if os.path.isdir(dest): (ret, out) = do_exec(['hg', 'summary'], cwd=dest, quiet=True, ignore_error=True) if ret == 0: print 'Cache location %s exists, using it' % dest do_exec(['hg', 'pull', repo], quiet=False, cwd=dest) do_exec(['hg', 'update'], quiet=False, cwd=dest) return if not os.path.isdir(cache): os.makedirs(cache) print 'Creating cache location %s' % dest do_exec(['hg', 'clone', repo, dest], quiet=False) def do_checkout(source, dest, tag=None): dest = os.path.abspath(dest) dest_parent = os.path.dirname(dest) if dest_parent != '' and not os.path.isdir(dest_parent): os.makedirs(dest_parent) do_exec(['hg', 'clone', source, dest], quiet=False) try: args = ['hg', 'update'] if tag != None: args.append('-r') args.append(tag) do_exec(args, quiet=False, cwd=dest) except: if tag != None: raise Exception("Revision %s not found in %s" % (tag, source)) raise def checkout_source(repo, cache, dest, tag=None): print '\n' print '*** Checking out source from %s%s ***' % (repo, ' using cache from %s' % cache if cache != None else '') local_source = None if cache != None: ensure_cache(repo, cache) local_source = os.path.join(cache, os.path.basename(repo)) source = repo if local_source == None else local_source do_checkout(source, dest, tag=tag) print '\n' def get_setting(settings, name, default=None): return settings[name] if name in settings else default class ScopedTmpdir: def __enter__(self): self._tmpdir = tempfile.mkdtemp() print 'Using temporary directory %s' % self._tmpdir return self._tmpdir def __exit__(self, type, value, traceback): print 'Cleaning temporary directory %s' % self._tmpdir shutil.rmtree(self._tmpdir) class ScopedWorkingDirectory: def __init__(self, dir): self._wd = os.path.abspath(dir) def __enter__(self): self._saved_wd = os.getcwd() if not os.path.isdir(self._wd): os.makedirs(self._wd) os.chdir(self._wd) return self._saved_wd def __exit__(self, type, value, traceback): os.chdir(self._saved_wd) class ScopedRename: def __init__(self, src, dest): self._src = src self._dest = dest def __enter__(self): os.rename(self._src, self._dest) def __exit__(self, type, value, traceback): os.rename(self._dest, self._src) class TarballCreator(OptionParser): def __init__(self): OptionParser.__init__(self, 'usage: %prog [options]') self.add_option('-r', '--repo', dest='repo', help='The remote repository from which to pull the main source') self.add_option('-c', '--cache', dest='cache', help='A local cache of the remote repositories') self.add_option('-l', '--l10n-base-repo', dest='l10nbase', help='The base directory of the remote repositories to pull l10n data from') self.add_option('-t', '--tag', dest='tag', help='Release tag to base the checkout on') self.add_option('-n', '--name', dest='name', help='The package name') self.add_option('-a', '--application', dest='application', help='The application to build') self.add_option('-m', '--mozdir', dest='mozdir', help='The location of the Mozilla source', default='') def run(self): (options, args) = self.parse_args() if options.repo == None: self.error('Must specify a remote repository') if options.name == None: self.error('Must specify a package name') if options.application == None: self.error('Must specify an application') if options.cache != None and not os.path.isabs(options.cache): options.cache = os.path.join(os.getcwd(), options.cache) settings = None with open('debian/config/tarball.conf', 'r') as fd: settings = json.load(fd) DEPENDENCIES = [ [ 'hg', 'mercurial' ], [ 'tar', 'tar' ] ] print 'Checking dependencies' for depend in DEPENDENCIES: if os.path.isabs(depend[0]) and not os.access(depend[0], os.X_OK): raise DependencyNotFound(depend) else: found = False for path in os.environ['PATH'].split(os.pathsep): if os.access(os.path.join(path, depend[0]), os.X_OK): found = True break if found == False: raise DependencyNotFound(depend) repo = options.repo cache = options.cache tag = options.tag application = options.application l10nbase = options.l10nbase name = options.name mozdir = options.mozdir with ScopedTmpdir() as tmpdir: with ScopedWorkingDirectory(os.path.join(tmpdir, name)) as saved_wd: checkout_source(repo, cache, '', tag=tag) need_moz = get_setting(settings, 'need-post-checkout', False) if need_moz: print '\n' print '*** Running checkout script ***' moz_local = None moz_repo = os.path.join(os.path.dirname(repo), os.path.basename(repo).replace('comm', 'mozilla')) if cache != None: ensure_cache(moz_repo, cache) moz_local = os.path.join(cache, os.path.basename(moz_repo)) args = [sys.executable, 'client.py', 'checkout'] if moz_local != None: args.append('--mozilla-repo=%s' % moz_local) if tag != None: args.append('--comm-rev=%s' % tag) args.append('--mozilla-rev=%s' % tag) do_exec(args, quiet=False) print '\n' checkout_source('https://hg.mozilla.org/build/compare-locales', cache, os.path.join(mozdir, 'python/compare-locales'), tag=tag) # XXX: In the future we may have an additional l10n source from Launchpad if l10nbase != None: got_locales = {} shipped_locales = os.path.join(application, 'locales/shipped-locales') all_locales = os.path.join(application, 'locales/all-locales') blacklist_file = get_setting(settings, 'l10n-blacklist') print '\n\n' print '*** Checking out l10n source from %s%s ***' % (l10nbase, ' using cache from %s' % cache if cache != None else '') l10ndir = 'l10n' if not os.path.isdir(l10ndir): os.makedirs(l10ndir) with open(os.path.join(l10ndir, 'changesets'), 'w') as changesets: for l10nlist in [all_locales, shipped_locales]: with open(l10nlist, 'r') as fd: for line in fd: locale = line.split(' ')[0].strip() if locale.startswith('#') or locale in got_locales or locale == 'en-US': continue if l10nlist != all_locales: print 'WARNING: Locale %s is not in all-locales. This is an upstream oversight' % locale try: checkout_source(os.path.join(l10nbase, locale), os.path.join(cache, 'l10n') if cache != None else None, 'l10n/' + locale, tag=tag) (ret, out) = do_exec(['hg', 'tip'], cwd='l10n/' + locale, quiet=True) for line in out.split('\n'): if line.startswith('changeset:'): changesets.write('%s %s\n' % (locale, line.split()[1].strip())) print 'Got changeset %s' % line.split()[1].strip() break got_locales[locale] = 1 except Exception as e: # checkout_locale will throw if the specified revision isn't found # In this case, omit it from the tarball print >> sys.stderr, 'Failed to checkout %s: %s' % (locale, e) localedir = os.path.join(l10ndir, locale) if os.path.exists(localedir): shutil.rmtree(localedir) # When we also use translations from Launchpad, there will be a file # containing the additional locales we want to ship (locales.extra??) print '\n\n' print '*** Checking that required locales are present ***' blacklist = {} if blacklist_file: with open(os.path.join(saved_wd, blacklist_file), 'r') as fd: for line in fd: locale = line.strip() if locale.startswith('#'): continue blacklist[locale] = 1 with open(shipped_locales, 'r') as fd: for line in fd: line = line.strip() if line.startswith('#'): continue if line == 'en-US': print 'Ignoring en-US' continue locale = line.split(' ')[0].strip() platforms = line.split(' ')[1:] if blacklist.has_key(locale): print 'Ignoring blacklisted locale %s' % locale continue if len(platforms) > 0: for_linux = False for platform in platforms: if platform == 'linux': for_linux = True break if not for_linux: print 'Ignoring %s (not for linux)' % locale continue if not got_locales.has_key(locale): raise Exception("Locale %s is missing from the source tarball" % locale) print '%s - Yes' % locale version = None with open(os.path.join(options.application, 'config/version.txt'), 'r') as vf: version = re.sub(r'~$', '', re.sub(r'([0-9\.]*)(.*)', r'\1~\2', vf.read().strip())) if tag == None: (ret, out) = do_exec(['hg', 'tip'], quiet=True) for line in out.split('\n'): if line.startswith('changeset:'): rev = line.split()[1].split(':')[0].strip() changeset = line.split()[1].split(':')[1].strip() break u = urllib.urlopen('%s/pushlog?changeset=%s' % (repo, changeset)) dom = xml.dom.minidom.parseString(u.read()) t = time.strptime(dom.getElementsByTagName('updated')[0].firstChild.nodeValue.strip(), '%Y-%m-%dT%H:%M:%SZ') version += '~hg%s%s%sr%s' % ('%02d' % t.tm_year, '%02d' % t.tm_mon, '%02d' % t.tm_mday, rev) u.close() if need_moz: # Embed the moz revision in the version number too. Allows us to respin dailies for comm-central # even if the only changes landed in mozilla-central (ret, out) = do_exec(['hg', 'tip'], cwd='mozilla', quiet=True) for line in out.split('\n'): if line.startswith('changeset:'): version += '.%s' % line.split()[1].split(':')[0].strip() break else: parsed = False version_from_upstream = version version = '' build = None for comp in tag.split('_')[1:]: if parsed == True: raise InvalidTagError(tag) if comp.startswith('BUILD'): build = re.sub(r'BUILD', '', comp) parsed = True elif comp.startswith('RELEASE'): parsed = True else: if version != '': version += '.' version += re.sub(r'~$', '', re.sub(r'([0-9]*)(.*)', r'\1~\2', comp)) if parsed == True and version == '': raise InvalidTagError(tag) if version == '': raise InvalidTagError(tag) if build != None: version += '+build%s' % build if not version.startswith(version_from_upstream): raise InvalidTagError(tag) print '\n\n' print '*** Upstream version is %s' % version print '\n\n' print '*** Packing tarball ***' with ScopedWorkingDirectory('..'): topsrcdir = '%s-%s' % (name, version) with ScopedRename(name, topsrcdir): args = ['tar', '-jc', '--exclude-vcs'] for exclude in settings['excludes']: args.append('--no-wildcards-match-slash') if exclude['wms'] == False else args.append('--wildcards-match-slash') args.append('--exclude') args.append(os.path.join(topsrcdir , exclude['path'])) args.append('-f') args.append(os.path.join(saved_wd, '%s_%s.orig.tar.bz2' % (name, version))) for include in settings['includes']: args.append(os.path.join(topsrcdir, include)) do_exec(args, quiet=False) def main(): creator = TarballCreator() creator.run() if __name__ == '__main__': main() debian/build/Preprocessor.py0000664000000000000000000003441712321600535013335 0ustar """ This is a very primitive line based preprocessor, for times when using a C preprocessor isn't an option. """ # 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/. import sys import os import os.path import re from optparse import OptionParser # hack around win32 mangling our line endings # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443 if sys.platform == "win32": import msvcrt msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) os.linesep = '\n' import Expression __all__ = ['Preprocessor', 'preprocess'] class Preprocessor: """ Class for preprocessing text files. """ class Error(RuntimeError): def __init__(self, cpp, MSG, context): self.file = cpp.context['FILE'] self.line = cpp.context['LINE'] self.key = MSG RuntimeError.__init__(self, (self.file, self.line, self.key, context)) def __init__(self): self.context = Expression.Context() for k,v in {'FILE': '', 'LINE': 0, 'DIRECTORY': os.path.abspath('.')}.iteritems(): self.context[k] = v self.disableLevel = 0 # ifStates can be # 0: hadTrue # 1: wantsTrue # 2: #else found self.ifStates = [] self.checkLineNumbers = False self.writtenLines = 0 self.filters = [] self.cmds = {} for cmd, level in {'define': 0, 'undef': 0, 'if': sys.maxint, 'ifdef': sys.maxint, 'ifndef': sys.maxint, 'else': 1, 'elif': 1, 'elifdef': 1, 'elifndef': 1, 'endif': sys.maxint, 'expand': 0, 'literal': 0, 'filter': 0, 'unfilter': 0, 'include': 0, 'includesubst': 0, 'error': 0}.iteritems(): self.cmds[cmd] = (level, getattr(self, 'do_' + cmd)) self.out = sys.stdout self.setMarker('#') self.LE = '\n' self.varsubst = re.compile('@(?P\w+)@', re.U) def setLineEndings(self, aLE): """ Set the line endings to be used for output. """ self.LE = {'cr': '\x0D', 'lf': '\x0A', 'crlf': '\x0D\x0A'}[aLE] def setMarker(self, aMarker): """ Set the marker to be used for processing directives. Used for handling CSS files, with pp.setMarker('%'), for example. """ self.marker = aMarker self.instruction = re.compile('%s(?P[a-z]+)(?:\s(?P.*))?$'%aMarker, re.U) self.comment = re.compile(aMarker, re.U) def clone(self): """ Create a clone of the current processor, including line ending settings, marker, variable definitions, output stream. """ rv = Preprocessor() rv.context.update(self.context) rv.setMarker(self.marker) rv.LE = self.LE rv.out = self.out return rv def applyFilters(self, aLine): for f in self.filters: aLine = f[1](aLine) return aLine def write(self, aLine): """ Internal method for handling output. """ if self.checkLineNumbers: self.writtenLines += 1 ln = self.context['LINE'] if self.writtenLines != ln: self.out.write('//@line %(line)d "%(file)s"%(le)s'%{'line': ln, 'file': self.context['FILE'], 'le': self.LE}) self.writtenLines = ln aLine = self.applyFilters(aLine) # ensure our line ending. Only need to handle \n, as we're reading # with universal line ending support, at least for files. aLine = re.sub('\n', self.LE, aLine) self.out.write(aLine) def handleCommandLine(self, args, defaultToStdin = False): """ Parse a commandline into this parser. Uses OptionParser internally, no args mean sys.argv[1:]. """ p = self.getCommandLineParser() (options, args) = p.parse_args(args=args) includes = options.I if defaultToStdin and len(args) == 0: args = [sys.stdin] includes.extend(args) for f in includes: self.do_include(f, False) pass def getCommandLineParser(self, unescapeDefines = False): escapedValue = re.compile('".*"$') numberValue = re.compile('[\-\+]?\d+$') def handleE(option, opt, value, parser): for k,v in os.environ.iteritems(): self.context[k] = v def handleD(option, opt, value, parser): vals = value.split('=', 1) if len(vals) == 1: vals.append(1) elif unescapeDefines and escapedValue.match(vals[1]): # strip escaped string values vals[1] = vals[1][1:-1] elif numberValue.match(vals[1]): vals[1] = int(vals[1]) self.context[vals[0]] = vals[1] def handleU(option, opt, value, parser): del self.context[value] def handleF(option, opt, value, parser): self.do_filter(value) def handleLE(option, opt, value, parser): self.setLineEndings(value) def handleMarker(option, opt, value, parser): self.setMarker(value) p = OptionParser() p.add_option('-I', action='append', type="string", default = [], metavar="FILENAME", help='Include file') p.add_option('-E', action='callback', callback=handleE, help='Import the environment into the defined variables') p.add_option('-D', action='callback', callback=handleD, type="string", metavar="VAR[=VAL]", help='Define a variable') p.add_option('-U', action='callback', callback=handleU, type="string", metavar="VAR", help='Undefine a variable') p.add_option('-F', action='callback', callback=handleF, type="string", metavar="FILTER", help='Enable the specified filter') p.add_option('--line-endings', action='callback', callback=handleLE, type="string", metavar="[cr|lr|crlf]", help='Use the specified line endings [Default: OS dependent]') p.add_option('--marker', action='callback', callback=handleMarker, type="string", help='Use the specified marker instead of #') return p def handleLine(self, aLine): """ Handle a single line of input (internal). """ m = self.instruction.match(aLine) if m: args = None cmd = m.group('cmd') try: args = m.group('args') except IndexError: pass if cmd not in self.cmds: raise Preprocessor.Error(self, 'INVALID_CMD', aLine) level, cmd = self.cmds[cmd] if (level >= self.disableLevel): cmd(args) elif self.disableLevel == 0 and not self.comment.match(aLine): self.write(aLine) pass # Instruction handlers # These are named do_'instruction name' and take one argument # Variables def do_define(self, args): m = re.match('(?P\w+)(?:\s(?P.*))?', args, re.U) if not m: raise Preprocessor.Error(self, 'SYNTAX_DEF', args) val = 1 if m.group('value'): val = self.applyFilters(m.group('value')) try: val = int(val) except: pass self.context[m.group('name')] = val def do_undef(self, args): m = re.match('(?P\w+)$', args, re.U) if not m: raise Preprocessor.Error(self, 'SYNTAX_DEF', args) if args in self.context: del self.context[args] # Logic def ensure_not_else(self): if len(self.ifStates) == 0 or self.ifStates[-1] == 2: sys.stderr.write('WARNING: bad nesting of #else\n') def do_if(self, args, replace=False): if self.disableLevel and not replace: self.disableLevel += 1 return val = None try: e = Expression.Expression(args) val = e.evaluate(self.context) except Exception: # XXX do real error reporting raise Preprocessor.Error(self, 'SYNTAX_ERR', args) if type(val) == str: # we're looking for a number value, strings are false val = False if not val: self.disableLevel = 1 if replace: if val: self.disableLevel = 0 self.ifStates[-1] = self.disableLevel else: self.ifStates.append(self.disableLevel) pass def do_ifdef(self, args, replace=False): if self.disableLevel and not replace: self.disableLevel += 1 return if re.match('\W', args, re.U): raise Preprocessor.Error(self, 'INVALID_VAR', args) if args not in self.context: self.disableLevel = 1 if replace: if args in self.context: self.disableLevel = 0 self.ifStates[-1] = self.disableLevel else: self.ifStates.append(self.disableLevel) pass def do_ifndef(self, args, replace=False): if self.disableLevel and not replace: self.disableLevel += 1 return if re.match('\W', args, re.U): raise Preprocessor.Error(self, 'INVALID_VAR', args) if args in self.context: self.disableLevel = 1 if replace: if args not in self.context: self.disableLevel = 0 self.ifStates[-1] = self.disableLevel else: self.ifStates.append(self.disableLevel) pass def do_else(self, args, ifState = 2): self.ensure_not_else() hadTrue = self.ifStates[-1] == 0 self.ifStates[-1] = ifState # in-else if hadTrue: self.disableLevel = 1 return self.disableLevel = 0 def do_elif(self, args): if self.disableLevel == 1: if self.ifStates[-1] == 1: self.do_if(args, replace=True) else: self.do_else(None, self.ifStates[-1]) def do_elifdef(self, args): if self.disableLevel == 1: if self.ifStates[-1] == 1: self.do_ifdef(args, replace=True) else: self.do_else(None, self.ifStates[-1]) def do_elifndef(self, args): if self.disableLevel == 1: if self.ifStates[-1] == 1: self.do_ifndef(args, replace=True) else: self.do_else(None, self.ifStates[-1]) def do_endif(self, args): if self.disableLevel > 0: self.disableLevel -= 1 if self.disableLevel == 0: self.ifStates.pop() # output processing def do_expand(self, args): lst = re.split('__(\w+)__', args, re.U) do_replace = False def vsubst(v): if v in self.context: return str(self.context[v]) return '' for i in range(1, len(lst), 2): lst[i] = vsubst(lst[i]) lst.append('\n') # add back the newline self.write(reduce(lambda x, y: x+y, lst, '')) def do_literal(self, args): self.write(args + self.LE) def do_filter(self, args): filters = [f for f in args.split(' ') if hasattr(self, 'filter_' + f)] if len(filters) == 0: return current = dict(self.filters) for f in filters: current[f] = getattr(self, 'filter_' + f) filterNames = current.keys() filterNames.sort() self.filters = [(fn, current[fn]) for fn in filterNames] return def do_unfilter(self, args): filters = args.split(' ') current = dict(self.filters) for f in filters: if f in current: del current[f] filterNames = current.keys() filterNames.sort() self.filters = [(fn, current[fn]) for fn in filterNames] return # Filters # # emptyLines # Strips blank lines from the output. def filter_emptyLines(self, aLine): if aLine == '\n': return '' return aLine # slashslash # Strips everything after // def filter_slashslash(self, aLine): [aLine, rest] = aLine.split('//', 1) if rest: aLine += '\n' return aLine # spaces # Collapses sequences of spaces into a single space def filter_spaces(self, aLine): return re.sub(' +', ' ', aLine).strip(' ') # substition # helper to be used by both substition and attemptSubstitution def filter_substitution(self, aLine, fatal=True): def repl(matchobj): varname = matchobj.group('VAR') if varname in self.context: return str(self.context[varname]) if fatal: raise Preprocessor.Error(self, 'UNDEFINED_VAR', varname) return '' return self.varsubst.sub(repl, aLine) def filter_attemptSubstitution(self, aLine): return self.filter_substitution(aLine, fatal=False) # File ops def do_include(self, args, filters=True): """ Preprocess a given file. args can either be a file name, or a file-like object. Files should be opened, and will be closed after processing. """ isName = type(args) == str or type(args) == unicode oldWrittenLines = self.writtenLines oldCheckLineNumbers = self.checkLineNumbers self.checkLineNumbers = False if isName: try: args = str(args) if filters: args = self.applyFilters(args) if not os.path.isabs(args): args = os.path.join(self.context['DIRECTORY'], args) args = open(args, 'rU') except Preprocessor.Error: raise except: raise Preprocessor.Error(self, 'FILE_NOT_FOUND', str(args)) self.checkLineNumbers = bool(re.search('\.(js|java)(?:\.in)?$', args.name)) oldFile = self.context['FILE'] oldLine = self.context['LINE'] oldDir = self.context['DIRECTORY'] if args.isatty(): # we're stdin, use '-' and '' for file and dir self.context['FILE'] = '-' self.context['DIRECTORY'] = '' else: abspath = os.path.abspath(args.name) self.context['FILE'] = abspath self.context['DIRECTORY'] = os.path.dirname(abspath) self.context['LINE'] = 0 self.writtenLines = 0 for l in args: self.context['LINE'] += 1 self.handleLine(l) args.close() self.context['FILE'] = oldFile self.checkLineNumbers = oldCheckLineNumbers self.writtenLines = oldWrittenLines self.context['LINE'] = oldLine self.context['DIRECTORY'] = oldDir def do_includesubst(self, args): args = self.filter_substitution(args) self.do_include(args) def do_error(self, args): raise Preprocessor.Error(self, 'Error: ', str(args)) def main(): pp = Preprocessor() pp.handleCommandLine(None, True) return def preprocess(includes=[sys.stdin], defines={}, output = sys.stdout, line_endings='\n', marker='#'): pp = Preprocessor() pp.context.update(defines) pp.setLineEndings(line_endings) pp.setMarker(marker) pp.out = output for f in includes: pp.do_include(f, False) if __name__ == "__main__": main() debian/build/refresh-supported-locales.pl0000664000000000000000000001137112321600535015725 0ustar #!/usr/bin/perl use strict; use warnings; my $moz_supported_file; my $lpom_dir; my %blacklist; my %locale2pkgname; my %languages; my %pkglist; my $file; while (@ARGV) { my $arg = shift(@ARGV); if ($arg eq '-s') { $moz_supported_file = shift(@ARGV); } elsif ($arg eq '-l') { $lpom_dir = shift(@ARGV); } else { die "Unknown argument '$arg'"; } } (defined($moz_supported_file)) || die "Need to specify a supported language list"; if (defined($lpom_dir)) { my $lang_file = "$lpom_dir/maps/languages"; my $map_file = "$lpom_dir/maps/locale2pkgname"; my $variant_file = "$lpom_dir/maps/variants"; open($file, $lang_file) or die "Failed to open $lang_file"; while (<$file>) { chomp($_); my $langcode = my $lang = $_; $langcode =~ s/([^:]*):*([^:]*)/$1/; $lang =~ s/([^:]*):*([^:]*)/$2/; if ($lang ne "") { $languages{$langcode} = $lang; } } close($file); open($file, $map_file) or die "Failed to open $map_file"; while (<$file>) { chomp($_); my $langcode = my $pkgname = $_; $langcode =~ s/([^:]*):*([^:]*)/$1/; $pkgname =~ s/([^:]*):*([^:]*)/$2/; if ($pkgname ne "") { $locale2pkgname{$langcode} = $pkgname; } } close($file); open($file, $variant_file) or die "Failed to open $variant_file"; while (<$file>) { chomp($_); my $langcode = my $lang = $_; $langcode =~ s/([^:]*):*([^:]*)/$1/; $lang =~ s/([^:]*):*([^:]*)/$2/; if ($lang ne "") { $languages{$langcode} = $lang; } } close($file); } if (-e "debian/config/locales.all") { open($file, "debian/config/locales.all"); while (<$file>) { $_ =~ s/#.*//; s/\s*$//; /^$/ || do { chomp($_); my $pkgname = my $lang = $_; $pkgname =~ s/([^:]*):*([^:]*)/$1/; $lang =~ s/([^:]*):*([^:]*)/$2/; $pkglist{$pkgname} = 1; if ($lang ne "") { $languages{$pkgname} = $lang; } } } } if (-e "debian/config/locales.shipped") { open($file, "debian/config/locales.shipped"); while (<$file>) { $_ =~ s/#.*//; s/\s*$//; /^$/ || do { chomp($_); my $langcode = my $pkgname = $_; $langcode =~ s/([^:]*):*([^:]*)/$1/; $pkgname =~ s/([^:]*):*([^:]*)/$2/; if ($pkgname eq "") { die "Malformed locales.shipped file"; } if (not exists $pkglist{$pkgname}) { die "WTF? Language in locales.shipped is not present in locales.all. Did we produce broken output last time?"; } $locale2pkgname{lc($langcode)} = $pkgname; } } close($file); } if (-e "debian/config/locales.blacklist") { open($file, "debian/config/locales.blacklist"); while (<$file>) { $_ =~ s/#.*//; s/\s*$//; /^$/ || do { chomp($_); $blacklist{$_} = 1; } } close($file); } my $have_language = 0; open($file, $moz_supported_file) or die "Failed to open $moz_supported_file"; open(my $outfile, ">debian/config/locales.shipped"); while (<$file>) { chomp($_); my $langcode = my $platforms = $_; $langcode =~ s/^([[:alnum:]\-]*)[[:space:]]*(.*)/$1/; $platforms =~ s/^([[:alnum:]\-]*)[[:space:]]*(.*)/$2/; next if (($langcode eq "en-US") || (($platforms ne "") && (rindex($platforms, "linux") eq -1)) || (exists $blacklist{$langcode})); my $llangcode = lc($langcode); my $pkgname = $llangcode; if (exists $locale2pkgname{$llangcode}) { $pkgname = $locale2pkgname{$llangcode}; } if (not exists $languages{$pkgname}) { if ($pkgname eq $llangcode) { $pkgname =~ s/\-.*//; } if (not exists $languages{$pkgname}) { die "No description for $pkgname"; } } if ($have_language eq 0) { print $outfile "# List of shipped locales. This list is automatically generated. Do not edit by hand\n"; } $have_language = 1; print $outfile "$langcode:$pkgname\n"; $pkglist{$pkgname} = 1; } if ($have_language eq 0) { print $outfile "# Placeholder file for the list of shipped languages. Do not delete"; } close($file); close($outfile); open($outfile, ">debian/config/locales.all"); my @completelist = keys(%pkglist); if (scalar(@completelist) gt 0) { @completelist = sort(@completelist); print $outfile "# List of all language packs, past and present. Please don't delete any entries from this file\n"; foreach my $lang (@completelist) { if (not exists $languages{$lang}) { die "How on earth did we get here?"; } my $desc = $languages{$lang}; print $outfile "$lang:$desc\n"; } } else { print $outfile "# Placeholder file for the list of all language packs. Do not delete"; } close($outfile); debian/build/config.mk0000664000000000000000000000371212321600535012065 0ustar #!/usr/bin/make -f DISTRIB_VERSION_MAJOR := $(shell lsb_release -s -r | cut -d '.' -f 1) DISTRIB_VERSION_MINOR := $(shell lsb_release -s -r | cut -d '.' -f 2) DISTRIB_CODENAME := $(shell lsb_release -s -c) include $(CURDIR)/debian/config/branch.mk -include /usr/share/cdbs/1/rules/buildvars.mk # Various build defaults # 1 = Build crashreporter (if supported) MOZ_ENABLE_BREAKPAD ?= 0 # 1 = Enable official build MOZ_BUILD_OFFICIAL ?= 0 # 1 = Build without jemalloc suitable for valgrind debugging MOZ_VALGRIND ?= 0 # 1 = Profile guided build MOZ_BUILD_PGO ?= 0 # 1 = Build and run the testsuite MOZ_WANT_UNIT_TESTS ?= 0 # 1 = Turn on debugging bits and disable optimizations MOZ_DEBUG ?= 0 # 1 = Disable optimizations MOZ_NO_OPTIMIZE ?= 0 # The package name MOZ_PKG_NAME := $(shell dpkg-parsechangelog | sed -n 's/^Source: *\(.*\)$$/\1/ p') # The binary name to use (derived from the package name by default) MOZ_APP_NAME ?= $(MOZ_PKG_NAME) # Define other variables used throughout the build MOZ_DEFAULT_APP_NAME ?= $(MOZ_PKG_BASENAME) MOZ_APP_BASENAME ?= $(shell echo $(MOZ_APP_NAME) | sed -n 's/\-.\|\<./\U&/g p') MOZ_DEFAULT_APP_BASENAME ?= $(shell echo $(MOZ_DEFAULT_APP_NAME) | sed -n 's/\-.\|\<./\U&/g p') MOZ_FORCE_UNOFFICIAL_BRANDING = 0 ifeq (1,$(MOZ_VALGRIND)) MOZ_FORCE_UNOFFICIAL_BRANDING = 1 endif ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) MOZ_BUILD_PGO = 0 MOZ_NO_OPTIMIZE = 1 MOZ_FORCE_UNOFFICIAL_BRANDING = 1 endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) MOZ_NO_OPTIMIZE = 1 MOZ_DEBUG = 1 MOZ_FORCE_UNOFFICIAL_BRANDING = 1 endif ifneq ($(MOZ_APP_NAME)$(MOZ_APP_BASENAME),$(MOZ_DEFAULT_APP_NAME)$(MOZ_DEFAULT_APP_BASENAME)) # If we change MOZ_APP_NAME or MOZ_APP_BASENAME, don't use official branding MOZ_FORCE_UNOFFICIAL_BRANDING = 1 endif MOZ_LOCALE_PKGS = $(strip $(shell dh_listpackages | grep $(MOZ_PKG_NAME)-locale-)) MOZ_LOCALES := $(shell sed -n 's/\#.*//;/^$$/d;s/\([^\:]*\)\:\?.*/\1/ p' < $(CURDIR)/debian/config/locales.shipped) debian/build/rules.mk0000664000000000000000000004746312321600535011765 0ustar #!/usr/bin/make -f # We need this to execute before the debian/control target gets called # and before patches are unapplied clean:: restore-upstream-files ifneq (1, $(MOZ_DISABLE_CLEAN_CHECKS)) cp debian/control debian/control.old touch debian/control.in else touch debian/control endif -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/rules/patchsys-quilt.mk -include /usr/share/cdbs/1/class/makefile.mk MOZ_OBJDIR := $(DEB_BUILDDIR)/obj-$(DEB_HOST_GNU_TYPE) MOZ_DISTDIR := $(MOZ_OBJDIR)/$(MOZ_MOZDIR)/dist ifeq (,$(MOZ_APP)) $(error "Need to set MOZ_APP") endif ifeq (,$(MOZ_APP_NAME)) $(error "Need to set MOZ_APP_NAME") endif ifeq (,$(MOZ_PKG_NAME)) $(error "Need to set MOZ_PKG_NAME") endif ifeq (,$(MOZ_PKG_BASENAME)) $(error "Need to set MOZ_PKG_BASENAME") endif ifeq (,$(MOZ_BRANDING_OPTION)) $(error "Need to set MOZ_BRANDING_OPTION") endif ifeq (,$(MOZ_BRANDING_DIR)) $(error "Need to set MOZ_BRANDING_DIR") endif DEB_MAKE_MAKEFILE := client.mk # Without this, CDBS passes CFLAGS and CXXFLAGS options to client.mk, which breaks the build DEB_MAKE_EXTRA_ARGS := # These normally come from autotools.mk, which we no longer include (because we # don't want to run configure) DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(CURDIR)/debian/tmp DEB_MAKE_CLEAN_TARGET := cleansrcdir # Don't save debug symbols in firefox-dbg (rely on pkg-create-dbgsym to create # ddeb packages for us). This is needed as long as there is a firefox-dbg # transitional package DEB_DH_STRIP_ARGS := --dbg-package=$(MOZ_PKG_NAME)-dbg # We don't want build-tree/mozilla/README to be shipped as a doc DEB_INSTALL_DOCS_ALL := $(NULL) # scour breaks the testsuite DEB_DH_SCOUR_ARGS := -N$(MOZ_PKG_NAME)-testsuite # Stop the buildd from timing out during long links MAKE := python $(CURDIR)/debian/build/keepalive-wrapper.py 1440 $(MAKE) MOZ_VERSION := $(shell cat $(DEB_SRCDIR)/$(MOZ_APP)/config/version.txt) MOZ_LIBDIR := usr/lib/$(MOZ_APP_NAME) MOZ_INCDIR := usr/include/$(MOZ_APP_NAME) MOZ_IDLDIR := usr/share/idl/$(MOZ_APP_NAME) MOZ_SDKDIR := usr/lib/$(MOZ_APP_NAME)-devel MOZ_ADDONDIR := usr/lib/$(MOZ_APP_NAME)-addons MOZ_APP_SUBDIR ?= # The profile directory is determined from the Vendor and Name fields of # the application.ini ifeq (,$(MOZ_VENDOR)) PROFILE_BASE = else PROFILE_BASE = $(shell echo $(MOZ_VENDOR) | tr A-Z a-z)/ endif MOZ_PROFILEDIR := .$(PROFILE_BASE)$(shell echo $(MOZ_APP_BASENAME) | tr A-Z a-z) MOZ_DEFAULT_PROFILEDIR := .$(PROFILE_BASE)$(shell echo $(MOZ_DEFAULT_APP_BASENAME) | tr A-Z a-z) DEB_AUTO_UPDATE_DEBIAN_CONTROL = no VIRTENV_PATH := $(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_virtualenv MOZ_PYTHON := $(VIRTENV_PATH)/bin/python DISTRIB := $(shell lsb_release -i -s) CFLAGS := -g CXXFLAGS := -g LDFLAGS := $(shell echo $$LDFLAGS | sed -e 's/-Wl,-Bsymbolic-functions//') ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) MOZ_WANT_UNIT_TESTS = 0 endif include $(CURDIR)/debian/build/testsuite.mk # enable the crash reporter only on i386, amd64 and armel ifeq (,$(filter i386 amd64 armhf,$(DEB_HOST_ARCH))) MOZ_ENABLE_BREAKPAD = 0 endif # powerpc sucks ifneq (,$(filter powerpc,$(DEB_HOST_ARCH))) MOZ_WANT_UNIT_TESTS = 0 endif # Ensure the crash reporter gets disabled for derivatives ifneq (Ubuntu, $(DISTRIB)) MOZ_BUILD_OFFICIAL = 0 MOZ_ENABLE_BREAKPAD = 0 endif MOZ_DISPLAY_NAME = $(shell cat $(DEB_SRCDIR)/$(MOZ_BRANDING_DIR)/locales/en-US/brand.properties \ | grep brandShortName | sed -e 's/brandShortName\=//') ifeq (,$(filter 4.7, $(shell $(CC) -dumpversion))) MOZ_BUILD_PGO = 0 endif ifeq (,$(filter i386 amd64, $(DEB_HOST_ARCH))) MOZ_BUILD_PGO = 0 endif export SHELL=/bin/bash export NO_PNG_PKG_MANGLE=1 export LDFLAGS export DEB_BUILD_HARDENING=1 ifeq (Ubuntu, $(DISTRIB)) export MOZ_UA_VENDOR=Ubuntu endif ifeq (1,$(MOZ_BUILD_OFFICIAL)) export MOZILLA_OFFICIAL=1 endif ifeq (linux-gnu, $(DEB_HOST_GNU_SYSTEM)) LANGPACK_DIR := linux-$(DEB_HOST_GNU_CPU)/xpi else LANGPACK_DIR := $(DEB_HOST_GNU_SYSTEM)-$(DEB_HOST_GNU_CPU)/xpi endif MOZ_PKG_SUPPORT_SUGGESTS ?= # Defines used for the Mozilla text preprocessor MOZ_DEFINES += -DMOZ_LIBDIR="$(MOZ_LIBDIR)" -DMOZ_APP_NAME="$(MOZ_APP_NAME)" -DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \ -DMOZ_INCDIR="$(MOZ_INCDIR)" -DMOZ_IDLDIR="$(MOZ_IDLDIR)" -DMOZ_VERSION="$(MOZ_VERSION)" -DDEB_HOST_ARCH="$(DEB_HOST_ARCH)" \ -DMOZ_DISPLAY_NAME="$(MOZ_DISPLAY_NAME)" -DMOZ_PKG_NAME="$(MOZ_PKG_NAME)" \ -DMOZ_BRANDING_OPTION="$(MOZ_BRANDING_OPTION)" -DTOPSRCDIR="$(CURDIR)" -DDEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ -DMOZ_ADDONDIR="$(MOZ_ADDONDIR)" -DMOZ_SDKDIR="$(MOZ_SDKDIR)" -DMOZ_DISTDIR="$(MOZ_DISTDIR)" -DMOZ_UPDATE_CHANNEL="$(CHANNEL)" \ -DMOZ_OBJDIR="$(MOZ_OBJDIR)" -DDEB_BUILDDIR="$(DEB_BUILDDIR)" -DMOZ_PYTHON="$(MOZ_PYTHON)" -DMOZ_PROFILEDIR="$(MOZ_PROFILEDIR)" \ -DMOZ_PKG_BASENAME="$(MOZ_PKG_BASENAME)" -DMOZ_DEFAULT_PROFILEDIR="$(MOZ_DEFAULT_PROFILEDIR)" \ -DMOZ_DEFAULT_APP_NAME="$(MOZ_DEFAULT_APP_NAME)" -DMOZ_DEFAULT_APP_BASENAME="$(MOZ_DEFAULT_APP_BASENAME)" \ -DDISTRIB_VERSION="$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" ifeq (1, $(MOZ_ENABLE_BREAKPAD)) MOZ_DEFINES += -DMOZ_ENABLE_BREAKPAD endif ifeq (1, $(MOZ_BUILD_OFFICIAL)) MOZ_DEFINES += -DMOZ_BUILD_OFFICIAL endif ifeq (1, $(MOZ_VALGRIND)) MOZ_DEFINES += -DMOZ_VALGRIND endif ifeq (1,$(MOZ_NO_OPTIMIZE)) MOZ_DEFINES += -DMOZ_NO_OPTIMIZE endif ifeq (1,$(MOZ_WANT_UNIT_TESTS)) MOZ_DEFINES += -DMOZ_WANT_UNIT_TESTS endif ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) MOZ_DEFINES += -DDEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" endif ifeq (1,$(MOZ_BUILD_PGO)) MOZ_DEFINES += -DMOZ_BUILD_PGO endif ifeq (1,$(MOZ_DEBUG)) MOZ_DEFINES += -DMOZ_DEBUG endif ifeq (official, $(MOZ_BRANDING)) MOZ_DEFINES += -DMOZ_OFFICIAL_BRANDING endif ifneq (,$(DEB_PARALLEL_JOBS)) MOZ_DEFINES += -DDEB_PARALLEL_JOBS=$(DEB_PARALLEL_JOBS) endif MOZ_EXECUTABLES_$(MOZ_PKG_NAME) += $(MOZ_LIBDIR)/$(MOZ_PKG_BASENAME).sh \ $(NULL) pkgname_subst_files = \ debian/config/mozconfig \ $(MOZ_PKGNAME_SUBST_FILES) \ $(NULL) $(foreach pkg,$(DEB_ALL_PACKAGES), \ $(foreach e,install dirs links manpages postinst preinst postrm prerm lintian-overrides,\ $(if $(wildcard debian/$(subst $(MOZ_PKG_NAME),$(MOZ_PKG_BASENAME),$(pkg)).$(e).in),\ $(eval pkgname_subst_files += debian/$(pkg).$(e))))) appname_subst_files = \ debian/$(MOZ_APP_NAME).desktop \ $(MOZ_APPNAME_SUBST_FILES) \ $(NULL) pkgconfig_files = \ $(MOZ_PKGCONFIG_FILES) \ $(NULL) debian/tests/control: debian/tests/control.in sed -e 's/@MOZ_PKG_NAME@/$(MOZ_PKG_NAME)/g' < debian/tests/control.in > debian/tests/control debian/control:: debian/control.in debian/control.langpacks debian/control.langpacks.unavail debian/config/locales.shipped debian/config/locales.all @echo "" @echo "*****************************" @echo "* Refreshing debian/control *" @echo "*****************************" @echo "" cp debian/control.in debian/control.tmp perl debian/build/dump-langpack-control-entries.pl >> debian/control.tmp sed -e 's/@MOZ_PKG_NAME@/$(MOZ_PKG_NAME)/g' < debian/control.tmp > debian/control rm -f debian/control.tmp sed -i -e 's/@MOZ_LOCALE_PKGS@/$(foreach p,$(MOZ_LOCALE_PKGS),$(p) \(= $${binary:Version}\),)/' debian/control $(pkgname_subst_files): $(foreach file,$(pkgname_subst_files),$(subst $(MOZ_PKG_NAME),$(MOZ_PKG_BASENAME),$(file).in)) PYTHONDONTWRITEBYTECODE=1 python $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) $(CURDIR)/$(subst $(MOZ_PKG_NAME),$(MOZ_PKG_BASENAME),$@.in) > $(CURDIR)/$@ $(appname_subst_files): $(foreach file,$(appname_subst_files),$(subst $(MOZ_APP_NAME),$(MOZ_PKG_BASENAME),$(file).in)) PYTHONDONTWRITEBYTECODE=1 python $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) $(CURDIR)/$(subst $(MOZ_APP_NAME),$(MOZ_PKG_BASENAME),$@.in) > $(CURDIR)/$@ %.pc: WCHAR_CFLAGS = $(shell cat $(MOZ_OBJDIR)/config/autoconf.mk | grep WCHAR_CFLAGS | sed 's/^[^=]*=[[:space:]]*\(.*\)$$/\1/') %.pc: %.pc.in debian/stamp-makefile-build PYTHONDONTWRITEBYTECODE=1 python $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) -DWCHAR_CFLAGS="$(WCHAR_CFLAGS)" $(CURDIR)/$< > $(CURDIR)/$@ make-buildsymbols: debian/stamp-makebuildsymbols debian/stamp-makebuildsymbols: debian/stamp-makefile-build $(MAKE) -C $(MOZ_OBJDIR) buildsymbols MOZ_SYMBOLS_EXTRA_BUILDID=$(shell date -d "`dpkg-parsechangelog | grep Date: | sed -e 's/^Date: //'`" +%y%m%d%H%M%S)-$(DEB_HOST_GNU_CPU) @touch $@ make-testsuite: debian/stamp-maketestsuite debian/stamp-maketestsuite: debian/stamp-makefile-build ifneq ($(MOZ_APP_NAME),$(MOZ_DEFAULT_APP_NAME)) PYTHONDONTWRITEBYTECODE=1 python $(CURDIR)/debian/build/fix-mozinfo-appname.py $(MOZ_OBJDIR)/$(MOZ_MOZDIR)/mozinfo.json $(MOZ_DEFAULT_APP_NAME) endif $(MAKE) -C $(MOZ_OBJDIR) package-tests ifneq (,$(wildcard debian/testing/extra)) cp -r debian/testing/extra debian/testing/extra-stage mkdir -p debian/testing/extra-stage/xpcshell/package-tests/data cp debian/config/locales.shipped debian/testing/extra-stage/xpcshell/package-tests/data cd debian/testing/extra-stage; \ zip -rq9D $(CURDIR)/debian/testing/extra.test.zip * endif @touch $@ install-testsuite: debian/stamp-installtestsuite debian/stamp-installtestsuite: debian/stamp-maketestsuite debian/stamp-makefile-install install $(MOZ_DISTDIR)/bin/OCSPStaplingServer debian/tmp/$(MOZ_LIBDIR) install $(MOZ_DISTDIR)/bin/xpcshell debian/tmp/$(MOZ_LIBDIR) install $(MOZ_DISTDIR)/bin/components/httpd.js debian/tmp/$(MOZ_LIBDIR)/components install $(MOZ_DISTDIR)/bin/components/httpd.manifest debian/tmp/$(MOZ_LIBDIR)/components install $(MOZ_DISTDIR)/bin/components/test_necko.xpt debian/tmp/$(MOZ_LIBDIR)/components install -d debian/tmp/$(MOZ_LIBDIR)/testing install $(MOZ_DISTDIR)/$(MOZ_APP_NAME)-$(MOZ_VERSION).en-US.linux-*.tests.zip debian/tmp/$(MOZ_LIBDIR)/testing @touch $@ $(VIRTENV_PATH)/bin/compare-locales: cd $(CURDIR)/$(MOZ_MOZDIR)/python/compare-locales; $(MOZ_PYTHON) $(CURDIR)/$(MOZ_MOZDIR)/python/compare-locales/setup.py install make-langpack-xpis: $(VIRTENV_PATH)/bin/compare-locales $(foreach locale,$(MOZ_LOCALES),debian/stamp-make-langpack-xpi-$(locale)) debian/stamp-make-langpack-xpi-%: @echo "" @echo "" @echo "* Building language pack xpi for $*" @echo "" rm -rf $(CURDIR)/debian/l10n-mergedirs/$* mkdir -p $(CURDIR)/debian/l10n-mergedirs/$* export PATH=$(VIRTENV_PATH)/bin/:$$PATH ; \ cd $(MOZ_OBJDIR)/$(MOZ_APP)/locales ; \ $(MAKE) merge-$* LOCALE_MERGEDIR=$(CURDIR)/debian/l10n-mergedirs/$* || exit 1 ; \ $(MAKE) langpack-$* LOCALE_MERGEDIR=$(CURDIR)/debian/l10n-mergedirs/$* || exit 1; @touch $@ common-build-arch:: make-langpack-xpis $(pkgconfig_files) make-testsuite run-tests install/$(MOZ_PKG_NAME):: @echo "Adding suggests / recommends on support packages" echo "$(MOZ_PKG_SUPPORT_SUGGESTS)" | perl -0 -ne 's/[ \t\n]+/ /g; /\w/ and print "support:Suggests=$$_\n"' >> debian/$(MOZ_PKG_NAME).substvars echo "$(MOZ_PKG_SUPPORT_RECOMMENDS)" | perl -0 -ne 's/[ \t\n]+/ /g; /\w/ and print "support:Recommends=$$_\n"' >> debian/$(MOZ_PKG_NAME).substvars ifneq ($(MOZ_PKG_NAME),$(MOZ_APP_NAME)) install/%:: @echo "Adding conflicts / provides for renamed package" echo "app:Conflicts=$(subst $(subst $(MOZ_APP_NAME),,$(MOZ_PKG_NAME)),,$*)" >> debian/$*.substvars echo "app:Provides=$(subst $(subst $(MOZ_APP_NAME),,$(MOZ_PKG_NAME)),,$*)" >> debian/$*.substvars endif common-install-arch common-install-indep:: $(foreach dir,$(MOZ_LIBDIR) $(MOZ_INCDIR) $(MOZ_IDLDIR) $(MOZ_SDKDIR), \ if [ -d debian/tmp/$(dir)-$(MOZ_VERSION) ]; \ then \ mv debian/tmp/$(dir)-$(MOZ_VERSION) debian/tmp/$(dir); \ fi; ) common-install-arch:: install-testsuite common-binary-arch:: make-buildsymbols binary-install/$(MOZ_PKG_NAME):: install -m 0644 $(CURDIR)/debian/apport/blacklist $(CURDIR)/debian/$(MOZ_PKG_NAME)/etc/apport/blacklist.d/$(MOZ_PKG_NAME) install -m 0644 $(CURDIR)/debian/apport/native-origins $(CURDIR)/debian/$(MOZ_PKG_NAME)/etc/apport/native-origins.d/$(MOZ_PKG_NAME) binary-post-install/$(MOZ_PKG_NAME):: install-searchplugins-$(MOZ_PKG_NAME) $(patsubst %,binary-post-install/%,$(MOZ_LOCALE_PKGS)):: binary-post-install/%: install-langpack-xpis-% install-searchplugins-% binary-post-install/$(MOZ_PKG_NAME)-dev:: rm -f debian/$(MOZ_PKG_NAME)-dev/$(MOZ_INCDIR)/nspr/md/_linux.cfg dh_link -p$(MOZ_PKG_NAME)-dev $(MOZ_INCDIR)/nspr/prcpucfg.h $(MOZ_INCDIR)/nspr/md/_linux.cfg $(patsubst %,binary-post-install/%,$(DEB_ALL_PACKAGES)) :: binary-post-install/%: find debian/$(cdbs_curpkg) -name .mkdir.done -delete define locales_for_langpack $(strip $(if $(filter $(MOZ_PKG_NAME),$(1)),\ en-US,\ $(shell grep $(subst $(MOZ_PKG_NAME)-locale-,,$(1))$$ debian/config/locales.shipped | sed -n 's/\([^\:]*\)\:\?.*/\1/ p'))) endef install-langpack-xpis-%: @echo "" @echo "Installing language pack xpis for $*" dh_installdirs -p$* $(MOZ_ADDONDIR)/extensions $(foreach lang,$(call locales_for_langpack,$*), \ id=`PYTHONDONTWRITEBYTECODE=1 python $(CURDIR)/debian/build/xpi-id.py $(CURDIR)/$(MOZ_DISTDIR)/$(LANGPACK_DIR)/$(MOZ_APP_NAME)-$(MOZ_VERSION).$(lang).langpack.xpi 2>/dev/null`; \ install -m 0644 $(CURDIR)/$(MOZ_DISTDIR)/$(LANGPACK_DIR)/$(MOZ_APP_NAME)-$(MOZ_VERSION).$(lang).langpack.xpi \ $(CURDIR)/debian/$*/$(MOZ_ADDONDIR)/extensions/$$id.xpi;) $(patsubst %,install-searchplugins-%,$(MOZ_LOCALE_PKGS) $(MOZ_PKG_NAME)) :: install-searchplugins-% : @echo "" @echo "Installing searchplugins for $*" $(patsubst %,install-searchplugins-%,$(MOZ_LOCALE_PKGS) $(MOZ_PKG_NAME)) :: install-searchplugins-% : install-searchplugins-IMPL-% customize-searchplugins-IMPL-% $(patsubst %,install-searchplugins-%,$(MOZ_LOCALE_PKGS) $(MOZ_PKG_NAME)) :: install-searchplugins-% : @echo "" define search_mod_list $(shell sed -n '/^\[$(1)\]/,/^\[/{/^\[/d;/^$$/d; p}' < $(firstword $(wildcard debian/searchplugins/$(2)/list.txt) debian/searchplugins/list.txt)) endef define searchplugin_source_path $(firstword $(wildcard debian/searchplugins/$(2)/$(1).xml) $(wildcard debian/searchplugins/en-US/$(1).xml)) endef customize-searchplugins-IMPL-%: $(foreach lang,$(call locales_for_langpack,$*),$(if $(wildcard debian/searchplugins), \ $(foreach o,$(call search_mod_list,Overrides,$(lang)), \ $(if $(call searchplugin_source_path,$(o),$(lang)),,$(error No plugin to override for $(o))) \ $(if $(wildcard debian/$*/$(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang)/$(notdir $(call searchplugin_source_path,$(o),$(lang)))),, \ $(error No plugin $(notdir $(call searchplugin_source_path,$(o),$(lang))) to override)) \ dh_install -p$* $(call searchplugin_source_path,$(o),$(lang)) $(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang);) \ $(foreach a,$(call search_mod_list,Additions,$(lang)), \ $(if $(wildcard debian/$*/$(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang)/$(notdir $(call searchplugin_source_path,$(a),$(lang)))), \ $(error Plugin $(notdir $(call searchplugin_source_path,$(a),$(lang))) already exists)) \ dh_install -p$* $(call searchplugin_source_path,$(a),$(lang)) $(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang);))) install-searchplugins-IMPL-%: $(foreach lang,$(call locales_for_langpack,$*), \ rm -rf debian/$*/$(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang); \ dh_installdirs -p$* $(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang); \ dh_install -p$* $(firstword $(wildcard $(MOZ_DISTDIR)/xpi-stage/locale-$(lang)/$(MOZ_APP_SUBDIR)/searchplugins) \ debian/tmp/$(MOZ_LIBDIR)/$(MOZ_APP_SUBDIR)/searchplugins)/*.xml \ $(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang);) $(patsubst %,binary-fixup/%,$(DEB_ALL_PACKAGES)) :: binary-fixup/%: find debian/$(cdbs_curpkg) -type f -perm -5 \( -name '*.zip' -or -name '*.xml' -or -name '*.js' -or -name '*.manifest' -or -name '*.xpt' \) -print0 2>/dev/null | xargs -0r chmod 644 $(foreach f,$(call cdbs_expand_curvar,MOZ_EXECUTABLES),chmod a+x debian/$(cdbs_curpkg)/$(f);) binary-predeb/$(MOZ_PKG_NAME):: $(foreach lib,libsoftokn3.so libfreebl3.so libnssdbm3.so, \ LD_LIBRARY_PATH=debian/$(MOZ_PKG_NAME)/$(MOZ_LIBDIR):$$LD_LIBRARY_PATH \ $(MOZ_DISTDIR)/bin/shlibsign -v -i debian/$(MOZ_PKG_NAME)/$(MOZ_LIBDIR)/$(lib);) mozconfig: debian/config/mozconfig cp $< $@ define cmp_auto_generated_file @if ! cmp -s $(1) $(1).old; then \ echo ""; \ diff -Nurp $(1).old $(1); \ echo ""; \ echo "****************************************************************************"; \ echo "* An automatically generated file is out of date and needs to be refreshed *"; \ echo "****************************************************************************"; \ echo ""; \ echo "$(1) is out of date. Please run \"debian/rules $(firstword $(2) $(1))\" in VCS"; \ echo ""; \ rm -f $(1).old; \ exit 1; \ fi rm -f $(1).old endef pre-build:: cp debian/config/locales.shipped debian/config/locales.shipped.old pre-build:: debian/config/locales.shipped $(pkgname_subst_files) $(appname_subst_files) mozconfig $(call cmp_auto_generated_file,debian/config/locales.shipped,refresh-supported-locales) pre-build:: debian/stamp-monkey-patch-upstream-files debian/stamp-monkey-patch-upstream-files: @touch debian/monkey-patch-files @echo "#!/bin/sh" >> debian/monkey-patch-files.sh make -f debian/rules monkey-patch-upstream-files @while read line; do \ cp $$line $$line.moz-orig; \ done < debian/monkey-patch-files sh debian/monkey-patch-files.sh @rm debian/monkey-patch-files.sh @touch $@ monkey-patch-upstream-files:: restore-upstream-files:: @$(if $(wildcard debian/monkey-patch-files), \ while read line; do \ if [ -f $$line.moz-orig ]; then \ mv $$line.moz-orig $$line; \ fi \ done < debian/monkey-patch-files; \ rm debian/monkey-patch-files) EXTRACT_TARBALL = $(firstword $(shell TMPDIR=`mktemp -d`; tar -jxf $(1) -C $$TMPDIR > /dev/null 2>&1; echo $$TMPDIR/`ls $$TMPDIR/ | head -n1`)) ifdef LANGPACK_O_MATIC refresh-supported-locales:: LPOM_OPT = -l $(LANGPACK_O_MATIC) endif refresh-supported-locales:: EXTRACTED := $(if $(wildcard $(MOZ_APP)/locales/shipped-locales),,$(call EXTRACT_TARBALL,$(TARBALL))) refresh-supported-locales:: SHIPPED_LOCALES = $(firstword $(wildcard $(CURDIR)/$(MOZ_APP)/locales/shipped-locales) $(wildcard $(EXTRACTED)/$(MOZ_APP)/locales/shipped-locales)) refresh-supported-locales:: @echo "" @echo "****************************************" @echo "* Refreshing list of shipped languages *" @echo "****************************************" @echo "" $(if $(SHIPPED_LOCALES),,$(error We aren't in the full source directory. Please use "TARBALL=")) perl debian/build/refresh-supported-locales.pl -s $(SHIPPED_LOCALES) $(LPOM_OPT) refresh-supported-locales:: debian/control $(if $(EXTRACTED),rm -rf $(dir $(EXTRACTED))) define moz_monkey_patch_file $(if $(wildcard debian/stamp-monkey-patch-upstream-files),$(error Too late to use moz_monkey_patch_file), \ echo "$(1)" >> debian/monkey-patch-files; \ echo "$(2) $(1)" >> debian/monkey-patch-files.sh) endef get-orig-source: ARGS = -r $(MOZILLA_REPO) -l $(L10N_REPO) -n $(MOZ_PKG_NAME) -a $(MOZ_APP) ifdef DEBIAN_TAG get-orig-source: ARGS += -t $(DEBIAN_TAG) endif ifdef LOCAL_BRANCH get-orig-source: ARGS += -c $(LOCAL_BRANCH) endif ifdef MOZ_MOZDIR get-orig-source: ARGS += -m $(MOZ_MOZDIR) endif get-orig-source: PYTHONDONTWRITEBYTECODE=1 python $(CURDIR)/debian/build/create-tarball.py $(ARGS) echo-%: @echo "$($*)" ifneq (1, $(MOZ_DISABLE_CLEAN_CHECKS)) clean:: cp debian/tests/control debian/tests/control.old cp debian/config/locales.shipped debian/config/locales.shipped.old clean:: debian/tests/control refresh-supported-locales $(call cmp_auto_generated_file,debian/config/locales.shipped,refresh-supported-locales) $(call cmp_auto_generated_file,debian/control) $(call cmp_auto_generated_file,debian/tests/control) endif clean:: rm -f $(pkgname_subst_files) $(appname_subst_files) rm -f debian/stamp-* rm -rf debian/l10n-mergedirs rm -rf $(MOZ_OBJDIR) rm -f mozconfig rm -f debian/testing/extra.test.zip rm -rf debian/testing/extra-stage .PHONY: make-buildsymbols make-testsuite make-langpack-xpis refresh-supported-locales get-orig-source monkey-patch-upstream-files debian/build/testsuite.mk0000664000000000000000000000601612321600535012651 0ustar #!/usr/bin/make -f MOZ_TEST_LOCALE ?= en_US.UTF-8 MOZ_TESTS ?= check xpcshell-tests-build #ifneq (,$(filter amd64 i386,$(DEB_HOST_ARCH))) #MOZ_TEST_FAILURES_FATAL ?= 1 #endif MOZ_TEST_X_WRAPPER ?= xvfb-run -a -s "-screen 0 1024x768x24" dbus-launch --exit-with-session MOZ_TESTS_NEED_X ?= xpcshell-tests xpcshell-tests-build jstestbrowser reftest crashtest mochitest MOZ_TESTS_TZ_ENV ?= TZ=:/usr/share/zoneinfo/posix/US/Pacific MOZ_TESTS_NEED_TZ ?= check jstestbrowser MOZ_TESTS_NEED_LOCALE ?= xpcshell-tests jstestbrowser reftest TEST_LOCALES = $(CURDIR)/$(MOZ_OBJDIR)/_ubuntu_build_test_tmp/locales TEST_HOME = $(CURDIR)/$(MOZ_OBJDIR)/_ubuntu_build_test_tmp/home GET_WRAPPER = $(if $(filter $(1),$(MOZ_TESTS_NEED_X)),$(MOZ_TEST_X_WRAPPER)) GET_TZ = $(if $(filter $(1),$(MOZ_TESTS_NEED_TZ)),$(MOZ_TESTS_TZ_ENV)) DOIF_NEEDS_LOCALE = $(if $(filter $(1),$(MOZ_TESTS_NEED_LOCALE)),$(call $(2))) MAKE_LOCALE = $(TEST_LOCALES)/$(MOZ_TEST_LOCALE) GET_LOCALE_ENV = LOCPATH=$(TEST_LOCALES) LC_ALL=$(MOZ_TEST_LOCALE) ifneq (1,$(MOZ_TEST_FAILURES_FATAL)) CMD_APPEND = || true endif ifneq (1,$(MOZ_WANT_UNIT_TESTS)) MOZ_TESTS = endif $(TEST_LOCALES) $(TEST_HOME):: mkdir -p $@ $(TEST_LOCALES)/$(MOZ_TEST_LOCALE): $(TEST_LOCALES) localedef -f $(shell echo $(notdir $@) | cut -d '.' -f 2) -i $(shell echo $(notdir $@) | cut -d '.' -f 1) $@ run-tests: $(MOZ_TESTS) $(MOZ_TESTS):: %: debian/stamp-test-% $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: TZ=$(call GET_TZ,$*) $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: WRAPPER=$(call GET_WRAPPER,$*) $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: $(call DOIF_NEEDS_LOCALE,$*,MAKE_LOCALE) $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: LOCALE_ENV=$(call DOIF_NEEDS_LOCALE,$*,GET_LOCALE_ENV) $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: $(TEST_HOME) $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: TEST_CMD=HOME=$(TEST_HOME) $(LOCALE_ENV) $(TZ) $(WRAPPER) $(if $(findstring -build,$*),debian/rules run-$*,$(MAKE) -C $(CURDIR)/$(MOZ_OBJDIR) $*) $(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: debian/stamp-test-%: debian/stamp-makefile-build @echo "\nRunning $(TEST_CMD)\n" $(TEST_CMD) $(CMD_APPEND) touch $@ $(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell/xpcshell-build.ini: cp $(CURDIR)/debian/testing/xpcshell-build.ini $@ run-xpcshell-tests-build: $(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell/xpcshell-build.ini cd $(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR); \ PYTHONDONTWRITEBYTECODE=1 $(MOZ_PYTHON) -u $(CURDIR)/$(MOZ_MOZDIR)/config/pythonpath.py \ -I./build \ -I$(CURDIR)/$(MOZ_MOZDIR)/build \ -I./_tests/mozbase/mozinfo \ $(CURDIR)/$(MOZ_MOZDIR)/testing/xpcshell/runxpcshelltests.py \ --manifest=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell/xpcshell-build.ini \ --build-info-json=./mozinfo.json \ --no-logfiles \ --tests-root-dir=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell \ --testing-modules-dir=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/modules \ $(CURDIR)/$(MOZ_DISTDIR)/bin/xpcshell .PHONY: run-tests $(MOZ_TESTS) run-xpcshell-tests-build debian/config/0000775000000000000000000000000012321600551010430 5ustar debian/config/locales.blacklist0000664000000000000000000000042712321600535013751 0ustar ach # Not supported on Ubuntu ak # Not supported on Ubuntu lij # Not supported on Ubuntu ff # Not supported on Ubuntu mn # Missing MOZ_LANG_TITLE from toolkit/defines.inc rm # Not supported on Ubuntu son # Not supported on Ubuntu ta-LK # Not supported on Ubuntu (but we keep ta) debian/config/branch.mk0000664000000000000000000000033512321600535012221 0ustar CHANNEL = release MOZ_WANT_UNIT_TESTS = 1 # MOZ_BUILD_OFFICIAL = 1 MOZ_ENABLE_BREAKPAD = 1 MOZILLA_REPO = http://hg.mozilla.org/releases/mozilla-release L10N_REPO = http://hg.mozilla.org/releases/l10n/mozilla-release debian/config/locales.shipped0000664000000000000000000000121212321600551013424 0ustar # List of shipped locales. This list is automatically generated. Do not edit by hand af:af an:an ar:ar as:as ast:ast be:be bg:bg bn-BD:bn bn-IN:bn br:br bs:bs ca:ca cs:cs csb:csb cy:cy da:da de:de el:el en-GB:en en-ZA:en eo:eo es-AR:es es-CL:es es-ES:es es-MX:es et:et eu:eu fa:fa fi:fi fr:fr fy-NL:fy ga-IE:ga gd:gd gl:gl gu-IN:gu he:he hi-IN:hi hr:hr hu:hu hy-AM:hy id:id is:is it:it ja:ja kk:kk km:km kn:kn ko:ko ku:ku lt:lt lv:lv mai:mai mk:mk ml:ml mr:mr nb-NO:nb nl:nl nn-NO:nn or:or pa-IN:pa pl:pl pt-BR:pt pt-PT:pt ro:ro ru:ru si:si sk:sk sl:sl sq:sq sr:sr sv-SE:sv ta:ta te:te th:th tr:tr uk:uk vi:vi xh:xh zh-CN:zh-hans zh-TW:zh-hant zu:zu debian/config/tarball.conf0000664000000000000000000000336212321600535012726 0ustar { "l10n-blacklist": "debian/config/locales.blacklist", "need-post-checkout": false, "includes": [ "" ], "excludes": [ { "path": "build/*.exe", "wms": true }, { "path": "build/mobile/sutagent/android/network-libs", "wms": false }, { "path": "build/package/mac_osx/mozilla.dsstore", "wms": false}, { "path": "*.pyc", "wms": true }, { "path": "*.sfx", "wms": true }, { "path": "*.dll", "wms": true }, { "path": "intl/unicharutil/tools/data", "wms": false }, { "path": "layout/doc/object_diagram_template.sda", "wms": false }, { "path": "layout/doc/SpaceMgr_BlockReflSt_OD.sda", "wms": false }, { "path": "l10n/*/calendar", "wms": false }, { "path": "l10n/*/editor", "wms": false }, { "path": "l10n/*/embedding", "wms": false }, { "path": "l10n/*/extensions", "wms": false }, { "path": "l10n/*/mail", "wms": false }, { "path": "l10n/*/mobile", "wms": false }, { "path": "l10n/*/other-licenses/branding/sunbird", "wms": false }, { "path": "l10n/*/other-licenses/branding/thunderbird", "wms": false }, { "path": "l10n/*/suite", "wms": false }, { "path": "other-licenses/*.exe", "wms": true }, { "path": "security/nss/cmd/samples", "wms": false }, { "path": "toolkit/crashreporter/*.exe", "wms": true }, { "path": "toolkit/crashreporter/google-breakpad/src/client/mac/testapp/crashduringload", "wms": false }, { "path": "toolkit/crashreporter/google-breakpad/src/client/mac/testapp/crashInMain", "wms": false }, { "path": "toolkit/mozapps/*.exe", "wms": true }, { "path": "xpcom/tests/unit/data/SmallApp.app/Contents/MacOS/SmallApp", "wms": false } ] } debian/config/locales.all0000664000000000000000000000226712321600551012553 0ustar # List of all language packs, past and present. Please don't delete any entries from this file af:Afrikaans an:Aragonese ar:Arabic as:Assamese ast:Asturian be:Belarusian bg:Bulgarian bn:Bengali br:Breton bs:Bosnian ca:Catalan; Valencian cs:Czech csb:Kashubian cy:Welsh da:Danish de:German el:Greek en:English eo:Esperanto es:Spanish; Castilian et:Estonian eu:Basque fa:Persian fi:Finnish fr:French fy:Western Frisian ga:Irish gd:Gaelic; Scottish Gaelic gl:Galician gu:Gujarati he:Hebrew hi:Hindi hr:Croatian hu:Hungarian hy:Armenian id:Indonesian is:Icelandic it:Italian ja:Japanese ka:Georgian kk:Kazakh km:Central Khmer kn:Kannada ko:Korean ku:Kurdish lg:Ganda lt:Lithuanian lv:Latvian mai:Maithili mk:Macedonian ml:Malayalam mn:Mongolian mr:Marathi ms:Malay nb:Bokmål, Norwegian; Norwegian Bokmål nl:Dutch; Flemish nn:Norwegian Nynorsk; Nynorsk, Norwegian nso:Sotho, Northern oc:Occitan (post 1500) or:Oriya pa:Panjabi; Punjabi pl:Polish pt:Portuguese ro:Romanian ru:Russian si:Sinhala; Sinhalese sk:Slovak sl:Slovenian sq:Albanian sr:Serbian sv:Swedish sw:Swahili ta:Tamil te:Telugu th:Thai tr:Turkish uk:Ukrainian vi:Vietnamese xh:Xhosa zh-hans:Simplified Chinese zh-hant:Traditional Chinese zu:Zulu debian/config/mozconfig.in0000664000000000000000000000433312321600535012760 0ustar %%ifdef DEB_BUILD_GNU_TYPE ac_add_options --build=@DEB_BUILD_GNU_TYPE@ %%endif ac_add_options --host=@DEB_HOST_GNU_TYPE@ ac_add_options --prefix=/usr ac_add_options --libexecdir=/@MOZ_LIBDIR@ ac_add_options --with-l10n-base=@TOPSRCDIR@/@DEB_BUILDDIR@/l10n ac_add_options --srcdir=@TOPSRCDIR@/@DEB_BUILDDIR@ mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/@MOZ_OBJDIR@ ac_add_options --enable-release ac_add_options --disable-install-strip ac_add_options --disable-updater ac_add_options --enable-application=browser ac_add_options --enable-startup-notification ac_add_options --with-distribution-id=com.ubuntu %%if DEB_HOST_ARCH == armel %%if DISTRIB_VERSION < 1210 ac_add_options --enable-thumb2 %%else ac_add_options --disable-methodjit %%endif %%endif %%ifdef MOZ_NO_OPTIMIZE ac_add_options --disable-optimize %%else %%ifndef MOZ_VALGRIND ac_add_options --enable-optimize %%else ac_add_options --enable-optimize="-g -O -freorder-blocks" %%endif %%endif %%ifdef MOZ_VALGRIND ac_add_options --disable-jemalloc ac_add_options --enable-valgrind %%endif %%ifdef DEB_PARALLEL_JOBS mk_add_options MOZ_MAKE_FLAGS=-j@DEB_PARALLEL_JOBS@ %%endif ac_add_options --enable-tests %%ifdef MOZ_ENABLE_BREAKPAD ac_add_options --enable-crashreporter %%else ac_add_options --disable-crashreporter %%endif ac_add_options @MOZ_BRANDING_OPTION@ %%ifdef MOZ_BUILD_PGO mk_add_options MOZ_PGO=1 mk_add_options PROFILE_GEN_SCRIPT='xvfb-run -a @MOZ_PYTHON@ @TOPSRCDIR@/@MOZ_OBJDIR@/_profile/pgo/profileserver.py 10' %%endif ac_add_options --disable-gnomevfs ac_add_options --enable-gio ac_add_options --enable-update-channel=@MOZ_UPDATE_CHANNEL@ %%ifdef MOZ_DEBUG ac_add_options --enable-debug %%else ac_add_options --disable-debug %%endif ac_add_options --disable-elf-hack %%if MOZ_APP_BASENAME != MOZ_DEFAULT_APP_BASENAME ac_add_options --with-app-basename=@MOZ_APP_BASENAME@ %%else %%if MOZ_APP_NAME != MOZ_DEFAULT_APP_NAME ac_add_options --with-app-name=@MOZ_APP_NAME@ %%endif %%endif %%if MOZ_UPDATE_CHANNEL == nightly ac_add_options --enable-profiling %%endif %%if DEB_HOST_ARCH != i386 %%if DEB_HOST_ARCH != amd64 ac_add_options --disable-webrtc %%endif %%endif %%if DEB_HOST_ARCH == arm64 ac_add_options --enable-system-ffi %%endif ac_add_options --with-google-api-keyfile=@TOPSRCDIR@/debian/g debian/source/0000775000000000000000000000000012321600535010465 5ustar debian/source/options0000664000000000000000000000004612321600535012103 0ustar extend-diff-ignore = "^\.mozconfig\." debian/source/format0000664000000000000000000000001412321600535011673 0ustar 3.0 (quilt) debian/vendor-gre.js0000664000000000000000000000731212321600535011576 0ustar // Use LANG environment variable to choose locale pref("intl.locale.matchOS", true); // Fall back to en-US search plugins if none exist for the current locale pref("distribution.searchplugins.defaultLocale", "en-US"); // Enable Network Manager integration pref("network.manage-offline-status", true); // Map to hyphenation patterns from openoffice.org-hyphenation and openoffice.org-dictionaries pref("intl.hyphenation-alias.af", "af-za"); pref("intl.hyphenation-alias.af-*", "af-za"); pref("intl.hyphenation-alias.bn", "bn-in"); pref("intl.hyphenation-alias.bn-*", "bn-in"); pref("intl.hyphenation-alias.ca-*", "ca"); pref("intl.hyphenation-alias.cs", "cs-cz"); pref("intl.hyphenation-alias.cs-*", "cs-cz"); pref("intl.hyphenation-alias.da", "da-dk"); pref("intl.hyphenation-alias.da-*", "da-dk"); pref("intl.hyphenation-alias.de", "de-de"); pref("intl.hyphenation-alias.de-*", "de-de"); pref("intl.hyphenation-alias.de-AT-1901", "de-de"); pref("intl.hyphenation-alias.de-CH-*", "de-de"); pref("intl.hyphenation-alias.de-DE-1901", "de-de"); pref("intl.hyphenation-alias.el", "el-gr"); pref("intl.hyphenation-alias.el-*", "el-gr"); pref("intl.hyphenation-alias.en", "en-us"); pref("intl.hyphenation-alias.en-*", "en-us"); pref("intl.hyphenation-alias.es", "es-es"); pref("intl.hyphenation-alias.es-*", "es-es"); pref("intl.hyphenation-alias.et", "et-ee"); pref("intl.hyphenation-alias.et-*", "et-ee"); pref("intl.hyphenation-alias.fi", "fi-fi"); pref("intl.hyphenation-alias.fi-*", "fi-fi"); pref("intl.hyphenation-alias.fr-*", "fr"); pref("intl.hyphenation-alias.ga", "ga-ie"); pref("intl.hyphenation-alias.ga-*", "ga-ie"); pref("intl.hyphenation-alias.gu", "gu-in"); pref("intl.hyphenation-alias.gu-*", "gu-in"); pref("intl.hyphenation-alias.hi", "hi-in"); pref("intl-hyphenation-alias.hi-in", "hi-in"); pref("intl.hyphenation-alias.hr", "hr-hr"); pref("intl.hyphenation-alias.hr-*", "hr-hr"); pref("intl.hyphenation-alias.hu", "hu-hu"); pref("intl.hyphenation-alias.hu-*", "hu-hu"); pref("intl.hyphenation-alias.id", "id-id"); pref("intl-hyphenation-alias.id-*", "id-id"); pref("intl.hyphenation-alias.is", "is-is"); pref("intl.hyphenation-alias.is-*", "is-is"); pref("intl.hyphenation-alias.it", "it-it"); pref("intl.hyphenation-alias.it-*", "it-it"); pref("intl.hyphenation-alias.kn", "kn-in"); pref("intl.hyphenation-alias.kn-*", "kn-in"); pref("intl.hyphenation-alias.lt", "lt-lt"); pref("intl.hyphenation-alias.lt-*", "lt-lt"); pref("intl.hyphenation-alias.lv", "lv-lv"); pref("intl.hyphenation-alias.lv-*", "lv-lv"); pref("intl.hyphenation-alias.nb", "nb-no"); pref("intl.hyphenation-alias.nb-*", "nb-no"); pref("intl.hyphenation-alias.nl", "nl-nl"); pref("intl.hyphenation-alias.nl-*", "nl-nl"); pref("intl.hyphenation-alias.nn", "nn-no"); pref("intl.hyphenation-alias.nn-*", "nn-no"); pref("intl.hyphenation-alias.pa", "pa-in"); pref("intl.hyphenation-alias.pa-*", "pa-in"); pref("intl.hyphenation-alias.pl", "pl-pl"); pref("intl.hyphenation-alias.pl-*", "pl-pl"); pref("intl.hyphenation-alias.pt", "pt-pt"); pref("intl.hyphenation-alias.pt-*", "pt-pt"); pref("intl.hyphenation-alias.ro", "ro-ro"); pref("intl.hyphenation-alias.ro-*", "ro-ro"); pref("intl.hyphenation-alias.ru", "ru-ru"); pref("intl.hyphenation-alias.ru-*", "ru-ru"); pref("intl.hyphenation-alias.sh-*", "sh"); pref("intl.hyphenation-alias.sk", "sk-sk"); pref("intl.hyphenation-alias.sk-*", "sk-sk"); pref("intl.hyphenation-alias.sl", "sl-si"); pref("intl.hyphenation-alias.sl-*", "sl-si"); pref("intl.hyphenation-alias.sr-*", "sr"); pref("intl.hyphenation-alias.sv", "sv-se"); pref("intl.hyphenation-alias.sv-*", "sv-se"); pref("intl.hyphenation-alias.uk", "uk-ua"); pref("intl.hyphenation-alias.uk-*", "uk-ua"); pref("intl.hyphenation-alias.zu", "zu-za"); pref("intl.hyphenation-alias.zu-*", "zu-za"); debian/patches/0000775000000000000000000000000012321600535010614 5ustar debian/patches/test-overrides/0000775000000000000000000000000012321600535013573 5ustar debian/patches/test-overrides/disable-failing-python-tests.patch0000664000000000000000000000137112321600535022307 0ustar Description: Disable make check tests in mozbuild/mozpack/test, which fail on our builds due to characters in the source path Author: Chris Coulson Forwarded: no Index: firefox-trunk-23.0~a1~hg20130503r130725/python/Makefile.in =================================================================== --- firefox-trunk-23.0~a1~hg20130503r130725.orig/python/Makefile.in 2013-05-03 19:22:12.000000000 -0700 +++ firefox-trunk-23.0~a1~hg20130503r130725/python/Makefile.in 2013-05-04 14:44:42.272253199 -0700 @@ -15,7 +15,7 @@ mozbuild/mozbuild/test/controller \ mozbuild/mozbuild/test/compilation \ mozbuild/mozbuild/test/frontend \ - mozbuild/mozpack/test \ +# mozbuild/mozpack/test \ mozbuild/dumbmake/test \ $(NULL) debian/patches/normalize-distribution-searchplugins.patch0000664000000000000000000000255412321600535021225 0ustar Description: Normalize the paths to distribution searchplugins so that associated metadata is not lost on upgrades (when the install location changes) Author: Alexander Sack Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=534663 Forwarded: no --- toolkit/components/search/nsSearchService.js | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/toolkit/components/search/nsSearchService.js +++ b/toolkit/components/search/nsSearchService.js @@ -54,6 +54,7 @@ const MODE_APPEND = 0x10; const MODE_TRUNCATE = 0x20; // Directory service keys +const NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProcD"; const NS_APP_SEARCH_DIR_LIST = "SrchPluginsDL"; const NS_APP_USER_SEARCH_DIR = "UsrSrchPlugns"; const NS_APP_SEARCH_DIR = "SrchPlugns"; @@ -2776,6 +2777,13 @@ SearchService.prototype = { if (!file.isFile() || file.fileSize == 0 || file.isHidden()) continue; + var appdirstr = getDir (NS_XPCOM_CURRENT_PROCESS_DIR).path + + "/distribution/searchplugins"; + + // normalize distribution searchplugins if they are following links + if (file.path.indexOf(appdirstr) == 0) + file.normalize(); + var fileURL = NetUtil.ioService.newFileURI(file).QueryInterface(Ci.nsIURL); var fileExtension = fileURL.fileExtension.toLowerCase(); var isWritable = isInProfile && file.isWritable(); debian/patches/unity-menubar.patch0000664000000000000000000053325512321600535014451 0ustar Index: firefox-28.0~a2~hg20140102r168999/browser/base/content/browser-menubar.inc =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/browser/base/content/browser-menubar.inc 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/browser/base/content/browser-menubar.inc 2014-01-03 00:27:21.553660361 +0000 @@ -5,7 +5,11 @@ Index: firefox-28.0~a2~hg20140102r168999/browser/base/content/browser.js =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/browser/base/content/browser.js 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/browser/base/content/browser.js 2014-01-03 00:27:21.553660361 +0000 @@ -4468,6 +4468,10 @@ toolbarNodes.push(document.getElementById("addon-bar")); for (let toolbar of toolbarNodes) { + if (toolbar.id == "toolbar-menubar" && + document.documentElement.getAttribute("shellshowingmenubar") == "true") { + continue; + } let toolbarName = toolbar.getAttribute("toolbarname"); if (toolbarName) { let menuItem = document.createElement("menuitem"); Index: firefox-28.0~a2~hg20140102r168999/browser/components/places/content/places.xul =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/browser/components/places/content/places.xul 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/browser/components/places/content/places.xul 2014-01-03 00:27:21.553660361 +0000 @@ -157,7 +157,7 @@ + - + + + Index: firefox-28.0~a2~hg20140102r168999/toolkit/content/xul.css =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/toolkit/content/xul.css 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/toolkit/content/xul.css 2014-01-03 00:27:21.557660361 +0000 @@ -289,6 +289,18 @@ } %endif +%ifdef MOZ_WIDGET_GTK +window[shellshowingmenubar="true"] menubar { + display: none !important; +} + +window[shellshowingmenubar="true"] +toolbar[type="menubar"]:not([customizing="true"]) { + min-height: 0 !important; + border: 0 !important; +} +%endif + toolbarseparator { -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration"); } Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsDbusmenu.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsDbusmenu.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "nsDbusmenu.h" +#include "prlink.h" +#include "mozilla/ArrayUtils.h" + +#define FUNC(name, type, params) \ +nsDbusmenuFunctions::_##name##_fn nsDbusmenuFunctions::s_##name; +DBUSMENU_GLIB_FUNCTIONS +DBUSMENU_GTK_FUNCTIONS +#undef FUNC + +static PRLibrary *gDbusmenuGlib = nullptr; +static PRLibrary *gDbusmenuGtk = nullptr; + +typedef void (*nsDbusmenuFunc)(); +struct nsDbusmenuDynamicFunction { + const char *functionName; + nsDbusmenuFunc *function; +}; + +/* static */ nsresult +nsDbusmenuFunctions::Init() +{ +#define FUNC(name, type, params) \ + { #name, (nsDbusmenuFunc *)&nsDbusmenuFunctions::s_##name }, + static const nsDbusmenuDynamicFunction kDbusmenuGlibSymbols[] = { + DBUSMENU_GLIB_FUNCTIONS + }; + static const nsDbusmenuDynamicFunction kDbusmenuGtkSymbols[] = { + DBUSMENU_GTK_FUNCTIONS + }; + +#define LOAD_LIBRARY(symbol, name) \ + if (!g##symbol) { \ + g##symbol = PR_LoadLibrary(name); \ + if (!g##symbol) { \ + return NS_ERROR_FAILURE; \ + } \ + } \ + for (uint32_t i = 0; i < mozilla::ArrayLength(k##symbol##Symbols); ++i) { \ + *k##symbol##Symbols[i].function = \ + PR_FindFunctionSymbol(g##symbol, k##symbol##Symbols[i].functionName); \ + if (!*k##symbol##Symbols[i].function) { \ + return NS_ERROR_FAILURE; \ + } \ + } + + LOAD_LIBRARY(DbusmenuGlib, "libdbusmenu-glib.so.4") + LOAD_LIBRARY(DbusmenuGtk, "libdbusmenu-gtk.so.4") +#undef LOAD_LIBRARY + + return NS_OK; +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsDbusmenu.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsDbusmenu.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,99 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsDbusmenu_h__ +#define __nsDbusmenu_h__ + +#include "nsError.h" + +#include +#include + +#define DBUSMENU_GLIB_FUNCTIONS \ + FUNC(dbusmenu_menuitem_child_add_position, gboolean, (DbusmenuMenuitem *mi, DbusmenuMenuitem *child, guint position)) \ + FUNC(dbusmenu_menuitem_child_append, gboolean, (DbusmenuMenuitem *mi, DbusmenuMenuitem *child)) \ + FUNC(dbusmenu_menuitem_child_delete, gboolean, (DbusmenuMenuitem *mi, DbusmenuMenuitem *child)) \ + FUNC(dbusmenu_menuitem_get_children, GList*, (DbusmenuMenuitem *mi)) \ + FUNC(dbusmenu_menuitem_new, DbusmenuMenuitem*, (void)) \ + FUNC(dbusmenu_menuitem_property_get, const gchar*, (DbusmenuMenuitem *mi, const gchar *property)) \ + FUNC(dbusmenu_menuitem_property_get_bool, gboolean, (DbusmenuMenuitem *mi, const gchar *property)) \ + FUNC(dbusmenu_menuitem_property_remove, void, (DbusmenuMenuitem *mi, const gchar *property)) \ + FUNC(dbusmenu_menuitem_property_set, gboolean, (DbusmenuMenuitem *mi, const gchar *property, const gchar *value)) \ + FUNC(dbusmenu_menuitem_property_set_bool, gboolean, (DbusmenuMenuitem *mi, const gchar *property, const gboolean value)) \ + FUNC(dbusmenu_menuitem_property_set_int, gboolean, (DbusmenuMenuitem *mi, const gchar *property, const gint value)) \ + FUNC(dbusmenu_menuitem_show_to_user, void, (DbusmenuMenuitem *mi, guint timestamp)) \ + FUNC(dbusmenu_menuitem_take_children, GList*, (DbusmenuMenuitem *mi)) \ + FUNC(dbusmenu_server_new, DbusmenuServer*, (const gchar *object)) \ + FUNC(dbusmenu_server_set_root, void, (DbusmenuServer *server, DbusmenuMenuitem *root)) \ + FUNC(dbusmenu_server_set_status, void, (DbusmenuServer *server, DbusmenuStatus status)) + +#define DBUSMENU_GTK_FUNCTIONS \ + FUNC(dbusmenu_menuitem_property_set_image, gboolean, (DbusmenuMenuitem *menuitem, const gchar *property, const GdkPixbuf *data)) \ + FUNC(dbusmenu_menuitem_property_set_shortcut, gboolean, (DbusmenuMenuitem *menuitem, guint key, GdkModifierType modifier)) + +typedef struct _DbusmenuMenuitem DbusmenuMenuitem; +typedef struct _DbusmenuServer DbusmenuServer; + +enum DbusmenuStatus { + DBUSMENU_STATUS_NORMAL, + DBUSMENU_STATUS_NOTICE +}; + +#define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu" +#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display" +#define DBUSMENU_MENUITEM_PROP_ENABLED "enabled" +#define DBUSMENU_MENUITEM_PROP_ICON_DATA "icon-data" +#define DBUSMENU_MENUITEM_PROP_LABEL "label" +#define DBUSMENU_MENUITEM_PROP_SHORTCUT "shortcut" +#define DBUSMENU_MENUITEM_PROP_TYPE "type" +#define DBUSMENU_MENUITEM_PROP_TOGGLE_STATE "toggle-state" +#define DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE "toggle-type" +#define DBUSMENU_MENUITEM_PROP_VISIBLE "visible" +#define DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW "about-to-show" +#define DBUSMENU_MENUITEM_SIGNAL_EVENT "event" +#define DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED "item-activated" +#define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark" +#define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio" +#define DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED 1 +#define DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED 0 +#define DBUSMENU_SERVER_PROP_DBUS_OBJECT "dbus-object" + +class nsDbusmenuFunctions +{ +public: + static nsresult Init(); + +#define FUNC(name, type, params) \ + typedef type (*_##name##_fn) params; \ + static _##name##_fn s_##name; + DBUSMENU_GLIB_FUNCTIONS + DBUSMENU_GTK_FUNCTIONS +#undef FUNC + +}; + +#define dbusmenu_menuitem_child_add_position nsDbusmenuFunctions::s_dbusmenu_menuitem_child_add_position +#define dbusmenu_menuitem_child_append nsDbusmenuFunctions::s_dbusmenu_menuitem_child_append +#define dbusmenu_menuitem_child_delete nsDbusmenuFunctions::s_dbusmenu_menuitem_child_delete +#define dbusmenu_menuitem_get_children nsDbusmenuFunctions::s_dbusmenu_menuitem_get_children +#define dbusmenu_menuitem_new nsDbusmenuFunctions::s_dbusmenu_menuitem_new +#define dbusmenu_menuitem_property_get nsDbusmenuFunctions::s_dbusmenu_menuitem_property_get +#define dbusmenu_menuitem_property_get_bool nsDbusmenuFunctions::s_dbusmenu_menuitem_property_get_bool +#define dbusmenu_menuitem_property_remove nsDbusmenuFunctions::s_dbusmenu_menuitem_property_remove +#define dbusmenu_menuitem_property_set nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set +#define dbusmenu_menuitem_property_set_bool nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_bool +#define dbusmenu_menuitem_property_set_int nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_int +#define dbusmenu_menuitem_show_to_user nsDbusmenuFunctions::s_dbusmenu_menuitem_show_to_user +#define dbusmenu_menuitem_take_children nsDbusmenuFunctions::s_dbusmenu_menuitem_take_children +#define dbusmenu_server_new nsDbusmenuFunctions::s_dbusmenu_server_new +#define dbusmenu_server_set_root nsDbusmenuFunctions::s_dbusmenu_server_set_root +#define dbusmenu_server_set_status nsDbusmenuFunctions::s_dbusmenu_server_set_status + +#define dbusmenu_menuitem_property_set_image nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_image +#define dbusmenu_menuitem_property_set_shortcut nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_shortcut + +#endif /* __nsDbusmenu_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenu.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenu.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,866 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#define _IMPL_NS_LAYOUT + +#include "mozilla/GuardObjects.h" +#include "mozilla/MouseEvents.h" +#include "nsAutoPtr.h" +#include "nsBindingManager.h" +#include "nsComponentManagerUtils.h" +#include "nsContentUtils.h" +#include "nsCSSValue.h" +#include "nsGkAtoms.h" +#include "nsGtkUtils.h" +#include "nsIAtom.h" +#include "nsIContent.h" +#include "nsIDocument.h" +#include "nsIPresShell.h" +#include "nsIRunnable.h" +#include "nsITimer.h" +#include "nsString.h" +#include "nsStyleContext.h" +#include "nsStyleSet.h" +#include "nsStyleStruct.h" +#include "nsXBLBinding.h" +#include "nsXBLService.h" + +#include "nsNativeMenuAtoms.h" +#include "nsNativeMenuDocListener.h" + +#include + +#include "nsMenu.h" + +using namespace mozilla; + +class MOZ_STACK_CLASS nsMenuUpdateBatch +{ +public: + nsMenuUpdateBatch(nsMenu *aMenu MOZ_GUARD_OBJECT_NOTIFIER_PARAM) : + mMenu(aMenu) + { + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + mMenu->BeginUpdateBatchInternal(); + } + + ~nsMenuUpdateBatch() + { + mMenu->EndUpdateBatch(); + } + +private: + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER + nsMenu *mMenu; +}; + +class nsSetAttrRunnableNoNotify : public nsRunnable +{ +public: + nsSetAttrRunnableNoNotify(nsIContent *aContent, nsIAtom *aAttribute, + nsAString& aValue) : + mContent(aContent), mAttribute(aAttribute), mValue(aValue) { }; + + NS_IMETHODIMP Run() + { + return mContent->SetAttr(kNameSpaceID_None, mAttribute, mValue, false); + } + +private: + nsCOMPtr mContent; + nsCOMPtr mAttribute; + nsAutoString mValue; +}; + +class nsUnsetAttrRunnableNoNotify : public nsRunnable +{ +public: + nsUnsetAttrRunnableNoNotify(nsIContent *aContent, nsIAtom *aAttribute) : + mContent(aContent), mAttribute(aAttribute) { }; + + NS_IMETHODIMP Run() + { + return mContent->UnsetAttr(kNameSpaceID_None, mAttribute, false); + } + +private: + nsCOMPtr mContent; + nsCOMPtr mAttribute; +}; + +static void +AttachXBLBindings(nsIContent *aContent) +{ + nsIDocument *doc = aContent->OwnerDoc(); + nsIPresShell *shell = doc->GetShell(); + if (!shell) { + return; + } + + nsRefPtr sc = + shell->StyleSet()->ResolveStyleFor(aContent->AsElement(), + nullptr); + if (!sc) { + return; + } + + const nsStyleDisplay* display = sc->StyleDisplay(); + if (!display->mBinding) { + return; + } + + nsXBLService* xbl = nsXBLService::GetInstance(); + if (!xbl) { + return; + } + + nsRefPtr binding; + bool dummy; + nsresult rv = xbl->LoadBindings(aContent, display->mBinding->GetURI(), + display->mBinding->mOriginPrincipal, + getter_AddRefs(binding), &dummy); + if ((NS_FAILED(rv) && rv != NS_ERROR_XBL_BLOCKED) || !binding) { + return; + } + + doc->BindingManager()->AddToAttachedQueue(binding); +} + +void +nsMenu::SetPopupState(EPopupState aState) +{ + ClearFlags(((1U << NSMENU_NUMBER_OF_POPUPSTATE_BITS) - 1U) << NSMENU_NUMBER_OF_FLAGS); + SetFlags(aState << NSMENU_NUMBER_OF_FLAGS); + + if (!mPopupContent) { + return; + } + + nsAutoString state; + switch (aState) { + case ePopupState_Showing: + state.Assign(NS_LITERAL_STRING("showing")); + break; + case ePopupState_Open: + state.Assign(NS_LITERAL_STRING("open")); + break; + case ePopupState_Hiding: + state.Assign(NS_LITERAL_STRING("hiding")); + break; + default: + break; + } + + if (nsContentUtils::IsSafeToRunScript()) { + if (state.IsEmpty()) { + mPopupContent->UnsetAttr(kNameSpaceID_None, + nsNativeMenuAtoms::_moz_menupopupstate, + false); + } else { + mPopupContent->SetAttr(kNameSpaceID_None, + nsNativeMenuAtoms::_moz_menupopupstate, + state, false); + } + } else { + nsCOMPtr r; + if (state.IsEmpty()) { + r = new nsUnsetAttrRunnableNoNotify( + mPopupContent, nsNativeMenuAtoms::_moz_menupopupstate); + } else { + r = new nsSetAttrRunnableNoNotify( + mPopupContent, nsNativeMenuAtoms::_moz_menupopupstate, + state); + } + nsContentUtils::AddScriptRunner(r); + } +} + +/* static */ void +nsMenu::menu_event_cb(DbusmenuMenuitem *menu, + const gchar *name, + GVariant *value, + guint timestamp, + gpointer user_data) +{ + nsMenu *self = static_cast(user_data); + + nsAutoCString event(name); + + if (event.Equals(NS_LITERAL_CSTRING("closed"))) { + self->OnClose(); + return; + } + + if (event.Equals(NS_LITERAL_CSTRING("opened"))) { + self->OnOpen(); + return; + } +} + +void +nsMenu::MaybeAddPlaceholderItem() +{ + NS_ASSERTION(!IsInUpdateBatch(), + "Shouldn't be modifying the native menu structure now"); + + GList *children = dbusmenu_menuitem_get_children(GetNativeData()); + if (!children) { + NS_ASSERTION(!HasPlaceholderItem(), "Huh?"); + + DbusmenuMenuitem *ph = dbusmenu_menuitem_new(); + if (!ph) { + return; + } + + dbusmenu_menuitem_property_set_bool( + ph, DBUSMENU_MENUITEM_PROP_VISIBLE, false); + + if (!dbusmenu_menuitem_child_append(GetNativeData(), ph)) { + NS_WARNING("Failed to create placeholder item"); + g_object_unref(ph); + return; + } + + g_object_unref(ph); + + SetHasPlaceholderItem(true); + } +} + +bool +nsMenu::EnsureNoPlaceholderItem() +{ + NS_ASSERTION(!IsInUpdateBatch(), + "Shouldn't be modifying the native menu structure now"); + + if (HasPlaceholderItem()) { + GList *children = dbusmenu_menuitem_get_children(GetNativeData()); + + NS_ASSERTION(g_list_length(children) == 1, + "Unexpected number of children in native menu (should be 1!)"); + + SetHasPlaceholderItem(false); + + if (!children) { + return true; + } + + if (!dbusmenu_menuitem_child_delete( + GetNativeData(), static_cast(children->data))) { + NS_ERROR("Failed to remove placeholder item"); + return false; + } + } + + return true; +} + +static void +DispatchMouseEvent(nsIContent *aTarget, uint32_t aMsg) +{ + if (!aTarget) { + return; + } + + WidgetMouseEvent event(true, aMsg, nullptr, WidgetMouseEvent::eReal); + aTarget->DispatchDOMEvent(&event, nullptr, nullptr, nullptr); +} + +void +nsMenu::OnOpen() +{ + if (NeedsRebuild()) { + Build(); + } + + nsWeakMenuObject self(this); + nsCOMPtr origPopupContent(mPopupContent); + { + nsNativeMenuAutoUpdateBatch batch; + + SetPopupState(ePopupState_Showing); + DispatchMouseEvent(mPopupContent, NS_XUL_POPUP_SHOWING); + + ContentNode()->SetAttr(kNameSpaceID_None, nsGkAtoms::open, + NS_LITERAL_STRING("true"), true); + } + + if (!self) { + // We were deleted! + return; + } + + // I guess that the popup could have changed + if (origPopupContent != mPopupContent) { + return; + } + + nsNativeMenuAutoUpdateBatch batch; + + uint32_t count = ChildCount(); + for (uint32_t i = 0; i < count; ++i) { + ChildAt(i)->ContainerIsOpening(); + } + + SetPopupState(ePopupState_Open); + DispatchMouseEvent(mPopupContent, NS_XUL_POPUP_SHOWN); +} + +void +nsMenu::Build() +{ + nsMenuUpdateBatch batch(this); + + SetNeedsRebuild(false); + + while (ChildCount() > 0) { + RemoveChildAt(0); + } + + InitializePopup(); + + if (!mPopupContent) { + return; + } + + uint32_t count = mPopupContent->GetChildCount(); + for (uint32_t i = 0; i < count; ++i) { + nsIContent *childContent = mPopupContent->GetChildAt(i); + + nsresult rv; + nsMenuObject *child = CreateChild(childContent, &rv); + + if (child) { + rv = AppendChild(child); + } + + if (NS_FAILED(rv)) { + NS_ERROR("Menu build failed"); + SetNeedsRebuild(true); + return; + } + } +} + +void +nsMenu::InitializeNativeData() +{ + // Dbusmenu provides an "about-to-show" signal, and also "opened" and + // "closed" events. However, Unity is the only thing that sends + // both "about-to-show" and "opened" events. Unity 2D and the HUD only + // send "opened" events, so we ignore "about-to-show" (I don't think + // there's any real difference between them anyway). + // To complicate things, there are certain conditions where we don't + // get a "closed" event, so we need to be able to handle this :/ + g_signal_connect(G_OBJECT(GetNativeData()), "event", + G_CALLBACK(menu_event_cb), this); + + UpdateLabel(); + UpdateSensitivity(); + + SetNeedsRebuild(true); + MaybeAddPlaceholderItem(); + + AttachXBLBindings(ContentNode()); +} + +void +nsMenu::Update(nsStyleContext *aStyleContext) +{ + UpdateVisibility(aStyleContext); + UpdateIcon(aStyleContext); +} + +void +nsMenu::InitializePopup() +{ + nsCOMPtr oldPopupContent; + oldPopupContent.swap(mPopupContent); + + for (uint32_t i = 0; i < ContentNode()->GetChildCount(); ++i) { + nsIContent *child = ContentNode()->GetChildAt(i); + + int32_t dummy; + nsCOMPtr tag = child->OwnerDoc()->BindingManager()->ResolveTag(child, &dummy); + if (tag == nsGkAtoms::menupopup) { + mPopupContent = child; + break; + } + } + + if (oldPopupContent == mPopupContent) { + return; + } + + // The popup has changed + + if (oldPopupContent) { + DocListener()->UnregisterForContentChanges(oldPopupContent); + } + + SetPopupState(ePopupState_Closed); + + if (!mPopupContent) { + return; + } + + AttachXBLBindings(mPopupContent); + + DocListener()->RegisterForContentChanges(mPopupContent, this); +} + +void +nsMenu::BeginUpdateBatchInternal() +{ + NS_ASSERTION(!IsInUpdateBatch(), "Already in an update batch!"); + + SetIsInUpdateBatch(true); + SetDidStructureMutate(false); +} + +nsresult +nsMenu::RemoveChildAt(uint32_t aIndex) +{ + NS_ASSERTION(IsInUpdateBatch() || !HasPlaceholderItem(), + "Shouldn't have a placeholder menuitem"); + + SetDidStructureMutate(true); + + nsresult rv = nsMenuContainer::RemoveChildAt(aIndex, !IsInUpdateBatch()); + + if (!IsInUpdateBatch()) { + MaybeAddPlaceholderItem(); + } + + return rv; +} + +nsresult +nsMenu::RemoveChild(nsIContent *aChild) +{ + uint32_t index = IndexOf(aChild); + if (index == NoIndex) { + return NS_ERROR_INVALID_ARG; + } + + return RemoveChildAt(index); +} + +nsresult +nsMenu::InsertChildAfter(nsMenuObject *aChild, nsIContent *aPrevSibling) +{ + if (!IsInUpdateBatch() && !EnsureNoPlaceholderItem()) { + return NS_ERROR_FAILURE; + } + + SetDidStructureMutate(true); + + return nsMenuContainer::InsertChildAfter(aChild, aPrevSibling, + !IsInUpdateBatch()); +} + +nsresult +nsMenu::AppendChild(nsMenuObject *aChild) +{ + if (!IsInUpdateBatch() && !EnsureNoPlaceholderItem()) { + return NS_ERROR_FAILURE; + } + + SetDidStructureMutate(true); + + return nsMenuContainer::AppendChild(aChild, !IsInUpdateBatch()); +} + +bool +nsMenu::CanOpen() const +{ + bool isVisible = dbusmenu_menuitem_property_get_bool(GetNativeData(), + DBUSMENU_MENUITEM_PROP_VISIBLE); + bool isDisabled = ContentNode()->AttrValueIs(kNameSpaceID_None, + nsGkAtoms::disabled, + nsGkAtoms::_true, + eCaseMatters); + + return (isVisible && !isDisabled); +} + +nsMenuObject::PropertyFlags +nsMenu::SupportedProperties() const +{ + return static_cast( + nsMenuObject::ePropLabel | + nsMenuObject::ePropEnabled | + nsMenuObject::ePropVisible | + nsMenuObject::ePropIconData | + nsMenuObject::ePropChildDisplay + ); +} + +nsMenu::nsMenu() : + nsMenuContainer() +{ + MOZ_COUNT_CTOR(nsMenu); +} + +nsMenu::~nsMenu() +{ + if (IsInUpdateBatch()) { + EndUpdateBatch(); + } + + // Although nsTArray will take care of this in its destructor, + // we have to manually ensure children are removed from our native menu + // item, just in case our parent recycles us + while (ChildCount() > 0) { + RemoveChildAt(0); + } + + EnsureNoPlaceholderItem(); + + if (DocListener() && mPopupContent) { + DocListener()->UnregisterForContentChanges(mPopupContent); + } + + if (GetNativeData()) { + g_signal_handlers_disconnect_by_func(GetNativeData(), + FuncToGpointer(menu_event_cb), + this); + } + + MOZ_COUNT_DTOR(nsMenu); +} + +/* static */ nsMenuObject* +nsMenu::Create(nsMenuContainer *aParent, nsIContent *aContent) +{ + nsAutoPtr menu(new nsMenu()); + if (NS_FAILED(menu->Init(aParent, aContent))) { + return nullptr; + } + + return menu.forget(); +} + +static void +DoOpen(nsITimer *aTimer, void *aClosure) +{ + nsAutoWeakMenuObject weakMenu( + static_cast *>(aClosure)); + + if (weakMenu) { + dbusmenu_menuitem_show_to_user(weakMenu->GetNativeData(), 0); + } + + NS_RELEASE(aTimer); +} + +nsMenuObject::EType +nsMenu::Type() const +{ + return nsMenuObject::eType_Menu; +} + +bool +nsMenu::IsBeingDisplayed() const +{ + return PopupState() == ePopupState_Open; +} + +bool +nsMenu::NeedsRebuild() const +{ + return HasFlags(eFlag_NeedsRebuild); +} + +void +nsMenu::OpenMenu() +{ + if (!CanOpen()) { + return; + } + + // Here, we synchronously fire popupshowing and popupshown events and then + // open the menu after a short delay. This allows the menu to refresh before + // it's shown, and avoids an issue where keyboard focus is not on the first + // item of the history menu in Firefox when opening it with the keyboard, + // because extra items to appear at the top of the menu + + OnOpen(); + + nsCOMPtr timer = do_CreateInstance(NS_TIMER_CONTRACTID); + if (!timer) { + return; + } + + nsAutoWeakMenuObject weakMenu(this); + + if (NS_FAILED(timer->InitWithFuncCallback(DoOpen, weakMenu.getWeakPtr(), + 100, nsITimer::TYPE_ONE_SHOT))) { + return; + } + + timer.forget(); + weakMenu.forget(); +} + +void +nsMenu::OnClose() +{ + if (PopupState() == ePopupState_Closed) { + return; + } + + // We do this to avoid mutating our view of the menu until + // after we have finished + nsNativeMenuAutoUpdateBatch batch; + + SetPopupState(ePopupState_Hiding); + DispatchMouseEvent(mPopupContent, NS_XUL_POPUP_HIDING); + + // Sigh, make sure all of our descendants are closed, as we don't + // always get closed events for submenus when scrubbing quickly through + // the menu + uint32_t count = ChildCount(); + for (uint32_t i = 0; i < count; ++i) { + if (ChildAt(i)->Type() == nsMenuObject::eType_Menu) { + static_cast(ChildAt(i))->OnClose(); + } + } + + SetPopupState(ePopupState_Closed); + DispatchMouseEvent(mPopupContent, NS_XUL_POPUP_HIDDEN); + + ContentNode()->UnsetAttr(kNameSpaceID_None, nsGkAtoms::open, true); +} + +void +nsMenu::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) +{ + NS_ASSERTION(aContent == ContentNode() || aContent == mPopupContent, + "Received an event that wasn't meant for us!"); + + if (aAttribute == nsGkAtoms::open) { + return; + } + + if (Parent()->NeedsRebuild()) { + return; + } + + if (aContent == ContentNode()) { + if (aAttribute == nsGkAtoms::disabled) { + UpdateSensitivity(); + } else if (aAttribute == nsGkAtoms::label || + aAttribute == nsGkAtoms::accesskey || + aAttribute == nsGkAtoms::crop) { + UpdateLabel(); + } + } + + if (!Parent()->IsBeingDisplayed() || aContent != ContentNode()) { + return; + } + + if (aAttribute == nsGkAtoms::hidden || + aAttribute == nsGkAtoms::collapsed) { + nsRefPtr sc = GetStyleContext(); + UpdateVisibility(sc); + } else if (aAttribute == nsGkAtoms::image) { + nsRefPtr sc = GetStyleContext(); + UpdateIcon(sc); + } +} + +void +nsMenu::OnContentInserted(nsIContent *aContainer, nsIContent *aChild, + nsIContent *aPrevSibling) +{ + NS_ASSERTION(aContainer == ContentNode() || aContainer == mPopupContent, + "Received an event that wasn't meant for us!"); + + if (NeedsRebuild()) { + return; + } + + if (PopupState() == ePopupState_Closed) { + SetNeedsRebuild(true); + return; + } + + if (aContainer == mPopupContent) { + nsresult rv; + nsMenuObject *child = CreateChild(aChild, &rv); + + if (child) { + rv = InsertChildAfter(child, aPrevSibling); + } + if (NS_FAILED(rv)) { + NS_ERROR("OnContentInserted() failed"); + SetNeedsRebuild(true); + } + } else { + Build(); + } +} + +void +nsMenu::OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) +{ + NS_ASSERTION(aContainer == ContentNode() || aContainer == mPopupContent, + "Received an event that wasn't meant for us!"); + + if (NeedsRebuild()) { + return; + } + + if (PopupState() == ePopupState_Closed) { + SetNeedsRebuild(true); + return; + } + + if (aContainer == mPopupContent) { + if (NS_FAILED(RemoveChild(aChild))) { + NS_ERROR("OnContentRemoved() failed"); + SetNeedsRebuild(true); + } + } else { + Build(); + } +} + +/* + * Some menus (eg, the History menu in Firefox) refresh themselves on + * opening by removing all children and then re-adding new ones. As this + * happens whilst the menu is opening in Unity, it causes some flickering + * as the menu popup is resized multiple times. To avoid this, we try to + * reuse native menu items when the menu structure changes during a + * batched update. If we can handle menu structure changes from Gecko + * just by updating properties of native menu items (rather than destroying + * and creating new ones), then we eliminate any flickering that occurs as + * the menu is opened. To do this, we don't modify any native menu items + * until the end of the update batch. + */ + +void +nsMenu::BeginUpdateBatch(nsIContent *aContent) +{ + NS_ASSERTION(aContent == ContentNode() || aContent == mPopupContent, + "Received an event that wasn't meant for us!"); + + if (aContent == mPopupContent) { + BeginUpdateBatchInternal(); + } +} + +void +nsMenu::EndUpdateBatch() +{ + NS_ASSERTION(IsInUpdateBatch(), "Not in an update batch"); + + SetIsInUpdateBatch(false); + + /* Optimize for the case where we only had attribute changes */ + if (!DidStructureMutate()) { + return; + } + + if (!EnsureNoPlaceholderItem()) { + SetNeedsRebuild(true); + return; + } + + GList *nextNativeChild = dbusmenu_menuitem_get_children(GetNativeData()); + DbusmenuMenuitem *nextOwnedNativeChild = nullptr; + + uint32_t count = ChildCount(); + + // Find the first native menu item that is `owned` by a corresponding + // Gecko menuitem + for (uint32_t i = 0; i < count; ++i) { + if (ChildAt(i)->GetNativeData()) { + nextOwnedNativeChild = ChildAt(i)->GetNativeData(); + break; + } + } + + // Now iterate over all Gecko menuitems + for (uint32_t i = 0; i < count; ++i) { + nsMenuObject *child = ChildAt(i); + + if (child->GetNativeData()) { + // This child already has a corresponding native menuitem. + // Remove all preceding orphaned native items. At this point, we + // modify the native menu structure. + while (nextNativeChild && + nextNativeChild->data != nextOwnedNativeChild) { + + DbusmenuMenuitem *data = + static_cast(nextNativeChild->data); + nextNativeChild = nextNativeChild->next; + + if (!dbusmenu_menuitem_child_delete(GetNativeData(), data)) { + NS_ERROR("Failed to remove orphaned native item from menu"); + SetNeedsRebuild(true); + return; + } + } + + if (nextNativeChild) { + nextNativeChild = nextNativeChild->next; + } + + // Now find the next native menu item that is `owned` + nextOwnedNativeChild = nullptr; + for (uint32_t j = i + 1; j < count; ++j) { + if (ChildAt(j)->GetNativeData()) { + nextOwnedNativeChild = ChildAt(j)->GetNativeData(); + break; + } + } + } else { + // This child is new, and doesn't have a native menu item. Find one! + if (nextNativeChild && + nextNativeChild->data != nextOwnedNativeChild) { + + DbusmenuMenuitem *data = + static_cast(nextNativeChild->data); + + if (NS_SUCCEEDED(child->AdoptNativeData(data))) { + nextNativeChild = nextNativeChild->next; + } + } + + // There wasn't a suitable one available, so create a new one. + // At this point, we modify the native menu structure. + if (!child->GetNativeData()) { + child->CreateNativeData(); + if (!dbusmenu_menuitem_child_add_position(GetNativeData(), + child->GetNativeData(), + i)) { + NS_ERROR("Failed to add new native item"); + SetNeedsRebuild(true); + return; + } + } + } + } + + while (nextNativeChild) { + + DbusmenuMenuitem *data = + static_cast(nextNativeChild->data); + nextNativeChild = nextNativeChild->next; + + if (!dbusmenu_menuitem_child_delete(GetNativeData(), data)) { + NS_ERROR("Failed to remove orphaned native item from menu"); + SetNeedsRebuild(true); + return; + } + } + + MaybeAddPlaceholderItem(); +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenu.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenu.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,166 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsMenu_h__ +#define __nsMenu_h__ + +#include "mozilla/Attributes.h" +#include "nsCOMPtr.h" + +#include "nsDbusmenu.h" +#include "nsMenuContainer.h" +#include "nsMenuObject.h" + +#include + +class nsIAtom; +class nsIContent; +class nsStyleContext; + +#define NSMENU_NUMBER_OF_POPUPSTATE_BITS 2U +#define NSMENU_NUMBER_OF_FLAGS 4U + +// This class represents a menu +class nsMenu MOZ_FINAL : public nsMenuContainer +{ +public: + ~nsMenu(); + + static nsMenuObject* Create(nsMenuContainer *aParent, + nsIContent *aContent); + + nsMenuObject::EType Type() const; + + bool IsBeingDisplayed() const; + bool NeedsRebuild() const; + + // Tell the desktop shell to display this menu + void OpenMenu(); + + // Normally called via the shell, but it's public so that child + // menuitems can do the shells work. Sigh.... + void OnClose(); + + void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute); + void OnContentInserted(nsIContent *aContainer, nsIContent *aChild, + nsIContent *aPrevSibling); + void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild); + void BeginUpdateBatch(nsIContent *aContent); + void EndUpdateBatch(); + +private: + friend class nsMenuUpdateBatch; + + enum { + // This menu needs rebuilding the next time it is opened + eFlag_NeedsRebuild = 1 << 0, + + // This menu contains a placeholder + eFlag_HasPlaceholderItem = 1 << 1, + + // This menu is currently receiving a batch of updates, and + // the native structure should not be modified + eFlag_InUpdateBatch = 1 << 2, + + // Children were added to / removed from this menu (only valid + // when eFlag_InUpdateBatch is set) + eFlag_StructureMutated = 1 << 3 + }; + + enum EPopupState { + ePopupState_Closed, + ePopupState_Showing, + ePopupState_Open, + ePopupState_Hiding + }; + + nsMenu(); + + void SetNeedsRebuild(bool aValue) + { + if (aValue) { + SetFlags(eFlag_NeedsRebuild); + } else { + ClearFlags(eFlag_NeedsRebuild); + } + } + bool HasPlaceholderItem() const + { + return HasFlags(eFlag_HasPlaceholderItem); + } + void SetHasPlaceholderItem(bool aValue) + { + if (aValue) { + SetFlags(eFlag_HasPlaceholderItem); + } else { + ClearFlags(eFlag_HasPlaceholderItem); + } + } + + bool IsInUpdateBatch() const + { + return HasFlags(eFlag_InUpdateBatch); + } + void SetIsInUpdateBatch(bool aValue) + { + if (aValue) { + SetFlags(eFlag_InUpdateBatch); + } else { + ClearFlags(eFlag_InUpdateBatch); + } + } + + bool DidStructureMutate() const + { + return HasFlags(eFlag_StructureMutated); + } + void SetDidStructureMutate(bool aValue) + { + if (aValue) { + SetFlags(eFlag_StructureMutated); + } else { + ClearFlags(eFlag_StructureMutated); + } + } + + EPopupState PopupState() const + { + return static_cast( + (GetFlags() & + (((1U << NSMENU_NUMBER_OF_POPUPSTATE_BITS) - 1U) + << NSMENU_NUMBER_OF_FLAGS)) >> NSMENU_NUMBER_OF_FLAGS); + }; + void SetPopupState(EPopupState aState); + + static void menu_event_cb(DbusmenuMenuitem *menu, + const gchar *name, + GVariant *value, + guint timestamp, + gpointer user_data); + + // We add a placeholder item to empty menus so that Unity actually treats + // us as a proper menu, rather than a menuitem without a submenu + void MaybeAddPlaceholderItem(); + bool EnsureNoPlaceholderItem(); + + void OnOpen(); + void Build(); + void InitializeNativeData(); + void Update(nsStyleContext *aStyleContext); + void InitializePopup(); + void BeginUpdateBatchInternal(); + nsresult RemoveChildAt(uint32_t aIndex); + nsresult RemoveChild(nsIContent *aChild); + nsresult InsertChildAfter(nsMenuObject *aChild, nsIContent *aPrevSibling); + nsresult AppendChild(nsMenuObject *aChild); + bool CanOpen() const; + nsMenuObject::PropertyFlags SupportedProperties() const; + + nsCOMPtr mPopupContent; +}; + +#endif /* __nsMenu_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuBar.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuBar.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,544 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "mozilla/DebugOnly.h" +#include "mozilla/dom/Element.h" +#include "mozilla/Preferences.h" +#include "nsAutoPtr.h" +#include "nsIDocument.h" +#include "nsIDOMEvent.h" +#include "nsIDOMEventListener.h" +#include "nsIDOMEventTarget.h" +#include "nsIDOMKeyEvent.h" +#include "nsIWidget.h" +#include "nsTArray.h" +#include "nsUnicharUtils.h" + +#include "nsMenu.h" +#include "nsNativeMenuAtoms.h" +#include "nsNativeMenuService.h" + +#include +#include +#include +#include + +#include "nsMenuBar.h" + +using namespace mozilla; + +class nsMenuBarDocEventListener MOZ_FINAL : public nsIDOMEventListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDOMEVENTLISTENER + + nsMenuBarDocEventListener(nsMenuBar *aOwner) : mOwner(aOwner) { }; + ~nsMenuBarDocEventListener() { }; + +private: + nsMenuBar *mOwner; +}; + +NS_IMPL_ISUPPORTS1(nsMenuBarDocEventListener, nsIDOMEventListener) + +NS_IMETHODIMP +nsMenuBarDocEventListener::HandleEvent(nsIDOMEvent *aEvent) +{ + nsAutoString type; + nsresult rv = aEvent->GetType(type); + if (NS_FAILED(rv)) { + NS_WARNING("Failed to determine event type"); + return rv; + } + + if (type.Equals(NS_LITERAL_STRING("focus"))) { + mOwner->Focus(); + } else if (type.Equals(NS_LITERAL_STRING("blur"))) { + mOwner->Blur(); + } else if (type.Equals(NS_LITERAL_STRING("keypress"))) { + rv = mOwner->Keypress(aEvent); + } else if (type.Equals(NS_LITERAL_STRING("keydown"))) { + rv = mOwner->KeyDown(aEvent); + } else if (type.Equals(NS_LITERAL_STRING("keyup"))) { + rv = mOwner->KeyUp(aEvent); + } + + return rv; +} + +void +nsMenuBar::Build() +{ + uint32_t count = ContentNode()->GetChildCount(); + for (uint32_t i = 0; i < count; ++i) { + nsIContent *childContent = ContentNode()->GetChildAt(i); + + nsresult rv; + nsMenuObject *child = CreateChild(childContent, &rv); + + if (child) { + rv = AppendChild(child); + } + + if (NS_FAILED(rv)) { + NS_ERROR("Failed to build menubar"); + return; + } + } +} + +void +nsMenuBar::DisconnectDocumentEventListeners() +{ + mDocument->RemoveEventListener(NS_LITERAL_STRING("focus"), + mEventListener, + true); + mDocument->RemoveEventListener(NS_LITERAL_STRING("blur"), + mEventListener, + true); + mDocument->RemoveEventListener(NS_LITERAL_STRING("keypress"), + mEventListener, + false); + mDocument->RemoveEventListener(NS_LITERAL_STRING("keydown"), + mEventListener, + false); + mDocument->RemoveEventListener(NS_LITERAL_STRING("keyup"), + mEventListener, + false); +} + +void +nsMenuBar::SetShellShowingMenuBar(bool aShowing) +{ + ContentNode()->OwnerDoc()->GetRootElement()->SetAttr( + kNameSpaceID_None, nsNativeMenuAtoms::shellshowingmenubar, + aShowing ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false"), + true); +} + +void +nsMenuBar::Focus() +{ + ContentNode()->SetAttr(kNameSpaceID_None, nsNativeMenuAtoms::openedwithkey, + NS_LITERAL_STRING("false"), true); +} + +void +nsMenuBar::Blur() +{ + // We do this here in case we lose focus before getting the + // keyup event, which leaves the menubar state looking like + // the alt key is stuck down + dbusmenu_server_set_status(mServer, DBUSMENU_STATUS_NORMAL); +} + +static bool +ShouldHandleKeyEvent(nsIDOMEvent *aEvent) +{ + bool handled, trusted = false; + aEvent->GetPreventDefault(&handled); + aEvent->GetIsTrusted(&trusted); + + if (handled || !trusted) { + return false; + } + + return true; +} + +nsMenuBar::ModifierFlags +nsMenuBar::GetModifiersFromEvent(nsIDOMKeyEvent *aEvent) +{ + ModifierFlags modifiers = static_cast(0); + bool modifier; + + aEvent->GetAltKey(&modifier); + if (modifier) { + modifiers = static_cast(modifiers | eModifierAlt); + } + + aEvent->GetShiftKey(&modifier); + if (modifier) { + modifiers = static_cast(modifiers | eModifierShift); + } + + aEvent->GetCtrlKey(&modifier); + if (modifier) { + modifiers = static_cast(modifiers | eModifierCtrl); + } + + aEvent->GetMetaKey(&modifier); + if (modifier) { + modifiers = static_cast(modifiers | eModifierMeta); + } + + return modifiers; +} + +nsresult +nsMenuBar::Keypress(nsIDOMEvent *aEvent) +{ + if (!ShouldHandleKeyEvent(aEvent)) { + return NS_OK; + } + + nsCOMPtr keyEvent = do_QueryInterface(aEvent); + if (!keyEvent) { + return NS_OK; + } + + ModifierFlags modifiers = GetModifiersFromEvent(keyEvent); + if (((modifiers & mAccessKeyMask) == 0) || + ((modifiers & ~mAccessKeyMask) != 0)) { + return NS_OK; + } + + uint32_t charCode; + keyEvent->GetCharCode(&charCode); + if (charCode == 0) { + return NS_OK; + } + + PRUnichar ch = PRUnichar(charCode); + PRUnichar chl = ToLowerCase(ch); + PRUnichar chu = ToUpperCase(ch); + + nsMenuObject *found = nullptr; + uint32_t count = ChildCount(); + for (uint32_t i = 0; i < count; ++i) { + nsAutoString accesskey; + ChildAt(i)->ContentNode()->GetAttr(kNameSpaceID_None, + nsGkAtoms::accesskey, + accesskey); + const nsAutoString::char_type *key = accesskey.BeginReading(); + if (*key == chu || *key == chl) { + found = ChildAt(i); + break; + } + } + + if (!found || found->Type() != nsMenuObject::eType_Menu) { + return NS_OK; + } + + ContentNode()->SetAttr(kNameSpaceID_None, nsNativeMenuAtoms::openedwithkey, + NS_LITERAL_STRING("true"), true); + static_cast(found)->OpenMenu(); + + aEvent->StopPropagation(); + aEvent->PreventDefault(); + + return NS_OK; +} + +nsresult +nsMenuBar::KeyDown(nsIDOMEvent *aEvent) +{ + if (!ShouldHandleKeyEvent(aEvent)) { + return NS_OK; + } + + nsCOMPtr keyEvent = do_QueryInterface(aEvent); + if (!keyEvent) { + return NS_OK; + } + + uint32_t keyCode; + keyEvent->GetKeyCode(&keyCode); + ModifierFlags modifiers = GetModifiersFromEvent(keyEvent); + if ((keyCode != mAccessKey) || ((modifiers & ~mAccessKeyMask) != 0)) { + return NS_OK; + } + + dbusmenu_server_set_status(mServer, DBUSMENU_STATUS_NOTICE); + + return NS_OK; +} + +nsresult +nsMenuBar::KeyUp(nsIDOMEvent *aEvent) +{ + if (!ShouldHandleKeyEvent(aEvent)) { + return NS_OK; + } + + nsCOMPtr keyEvent = do_QueryInterface(aEvent); + if (!keyEvent) { + return NS_OK; + } + + uint32_t keyCode; + keyEvent->GetKeyCode(&keyCode); + if (keyCode == mAccessKey) { + dbusmenu_server_set_status(mServer, DBUSMENU_STATUS_NORMAL); + } + + return NS_OK; +} + +nsMenuBar::nsMenuBar() : + nsMenuContainer(), + mTopLevel(nullptr), + mServer(nullptr), + mIsActive(false) +{ + MOZ_COUNT_CTOR(nsMenuBar); +} + +nsresult +nsMenuBar::Init(nsIWidget *aParent, nsIContent *aMenuBarNode) +{ + NS_ENSURE_ARG(aParent); + NS_ENSURE_ARG(aMenuBarNode); + + GdkWindow *gdkWin = static_cast( + aParent->GetNativeData(NS_NATIVE_WINDOW)); + if (!gdkWin) { + return NS_ERROR_FAILURE; + } + + gpointer user_data = nullptr; + gdk_window_get_user_data(gdkWin, &user_data); + if (!user_data || !GTK_IS_CONTAINER(user_data)) { + return NS_ERROR_FAILURE; + } + + mTopLevel = gtk_widget_get_toplevel(GTK_WIDGET(user_data)); + if (!mTopLevel) { + return NS_ERROR_FAILURE; + } + + g_object_ref(mTopLevel); + + nsRefPtr listener = + nsNativeMenuDocListener::Create(aMenuBarNode); + if (!listener) { + return NS_ERROR_FAILURE; + } + + nsMenuObject::Init(listener, aMenuBarNode); + + nsAutoCString path; + path.Append(NS_LITERAL_CSTRING("/com/canonical/menu/")); + char xid[10]; + sprintf(xid, "%X", static_cast( + GDK_WINDOW_XID(gtk_widget_get_window(mTopLevel)))); + path.Append(xid); + + mServer = dbusmenu_server_new(path.get()); + if (!mServer) { + return NS_ERROR_FAILURE; + } + + CreateNativeData(); + if (!GetNativeData()) { + return NS_ERROR_FAILURE; + } + + dbusmenu_server_set_root(mServer, GetNativeData()); + + mEventListener = new nsMenuBarDocEventListener(this); + + mDocument = do_QueryInterface(ContentNode()->OwnerDoc()); + + mAccessKey = Preferences::GetInt("ui.key.menuAccessKey"); + if (mAccessKey == nsIDOMKeyEvent::DOM_VK_SHIFT) { + mAccessKeyMask = eModifierShift; + } else if (mAccessKey == nsIDOMKeyEvent::DOM_VK_CONTROL) { + mAccessKeyMask = eModifierCtrl; + } else if (mAccessKey == nsIDOMKeyEvent::DOM_VK_ALT) { + mAccessKeyMask = eModifierAlt; + } else if (mAccessKey == nsIDOMKeyEvent::DOM_VK_META) { + mAccessKeyMask = eModifierMeta; + } else { + mAccessKeyMask = eModifierAlt; + } + + return NS_OK; +} + +nsMenuBar::~nsMenuBar() +{ + nsNativeMenuService *service = nsNativeMenuService::GetSingleton(); + if (service) { + service->NotifyNativeMenuBarDestroyed(this); + } + + if (ContentNode()) { + SetShellShowingMenuBar(false); + } + + // We want to destroy all children before dropping our reference + // to the doc listener + while (ChildCount() > 0) { + RemoveChildAt(0); + } + + if (mTopLevel) { + g_object_unref(mTopLevel); + } + + if (DocListener()) { + DocListener()->Stop(); + } + + if (mDocument) { + DisconnectDocumentEventListeners(); + } + + if (mServer) { + g_object_unref(mServer); + } + + MOZ_COUNT_DTOR(nsMenuBar); +} + +/* static */ nsMenuBar* +nsMenuBar::Create(nsIWidget *aParent, nsIContent *aMenuBarNode) +{ + nsAutoPtr menubar(new nsMenuBar()); + if (NS_FAILED(menubar->Init(aParent, aMenuBarNode))) { + return nullptr; + } + + return menubar.forget(); +} + +nsMenuObject::EType +nsMenuBar::Type() const +{ + return nsMenuObject::eType_MenuBar; +} + +bool +nsMenuBar::IsBeingDisplayed() const +{ + return true; +} + +uint32_t +nsMenuBar::WindowId() const +{ + return static_cast(GDK_WINDOW_XID(gtk_widget_get_window(mTopLevel))); +} + +nsAdoptingCString +nsMenuBar::ObjectPath() const +{ + gchar *tmp; + g_object_get(mServer, DBUSMENU_SERVER_PROP_DBUS_OBJECT, &tmp, NULL); + nsAdoptingCString result(tmp); + + return result; +} + +nsNativeMenuGIORequest& +nsMenuBar::BeginRegisterRequest() +{ + mRegisterRequestCanceller.Start(); + return mRegisterRequestCanceller; +} + +void +nsMenuBar::EndRegisterRequest() +{ + NS_ASSERTION(RegisterRequestInProgress(), "No request in progress"); + mRegisterRequestCanceller.Finish(); +} + +bool +nsMenuBar::RegisterRequestInProgress() const +{ + return mRegisterRequestCanceller.InProgress(); +} + +void +nsMenuBar::Activate() +{ + if (mIsActive) { + return; + } + + mIsActive = true; + + mDocument->AddEventListener(NS_LITERAL_STRING("focus"), + mEventListener, + true); + mDocument->AddEventListener(NS_LITERAL_STRING("blur"), + mEventListener, + true); + mDocument->AddEventListener(NS_LITERAL_STRING("keypress"), + mEventListener, + false); + mDocument->AddEventListener(NS_LITERAL_STRING("keydown"), + mEventListener, + false); + mDocument->AddEventListener(NS_LITERAL_STRING("keyup"), + mEventListener, + false); + + // Clear this. Not sure if we really need to though + ContentNode()->SetAttr(kNameSpaceID_None, nsNativeMenuAtoms::openedwithkey, + NS_LITERAL_STRING("false"), true); + + DocListener()->Start(); + Build(); + SetShellShowingMenuBar(true); +} + +void +nsMenuBar::Deactivate() +{ + if (!mIsActive) { + return; + } + + mIsActive = false; + + mRegisterRequestCanceller.Cancel(); + + SetShellShowingMenuBar(false); + while (ChildCount() > 0) { + RemoveChildAt(0); + } + DocListener()->Stop(); + DisconnectDocumentEventListeners(); +} + +void +nsMenuBar::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) +{ + +} + +void +nsMenuBar::OnContentInserted(nsIContent *aContainer, nsIContent *aChild, + nsIContent *aPrevSibling) +{ + NS_ASSERTION(aContainer == ContentNode(), + "Received an event that wasn't meant for us"); + + nsresult rv; + nsMenuObject *child = CreateChild(aChild, &rv); + + if (child) { + rv = InsertChildAfter(child, aPrevSibling); + } + + NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to insert item in to menubar"); +} + +void +nsMenuBar::OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) +{ + NS_ASSERTION(aContainer == ContentNode(), + "Received an event that wasn't meant for us"); + + DebugOnly rv = RemoveChild(aChild); + NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to remove item from menubar"); +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuBar.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuBar.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,112 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsMenuBar_h__ +#define __nsMenuBar_h__ + +#include "mozilla/Attributes.h" +#include "nsCOMPtr.h" +#include "nsString.h" + +#include "nsDbusmenu.h" +#include "nsMenuContainer.h" +#include "nsMenuObject.h" +#include "nsNativeMenuUtils.h" + +#include + +class nsIAtom; +class nsIContent; +class nsIDOMEvent; +class nsIDOMKeyEvent; +class nsIWidget; +class nsMenuBarDocEventListener; + +/* + * The menubar class. There is one of these per window (and the window + * owns its menubar). Each menubar has an object path, and the service is + * responsible for telling the desktop shell which object path corresponds + * to a particular window. A menubar and its hierarchy also own a + * nsNativeMenuDocListener. + */ +class nsMenuBar MOZ_FINAL : public nsMenuContainer +{ +public: + ~nsMenuBar(); + + static nsMenuBar* Create(nsIWidget *aParent, + nsIContent *aMenuBarNode); + + nsMenuObject::EType Type() const; + + bool IsBeingDisplayed() const; + + // Get the native window ID for this menubar + uint32_t WindowId() const; + + // Get the object path for this menubar + nsAdoptingCString ObjectPath() const; + + // Initializes and returns a cancellable request object, used + // by the menuservice when registering this menubar + nsNativeMenuGIORequest& BeginRegisterRequest(); + + // Finishes the current request to register the menubar + void EndRegisterRequest(); + + bool RegisterRequestInProgress() const; + + // Get the top-level GtkWindow handle + GtkWidget* TopLevelWindow() { return mTopLevel; } + + // Called from the menuservice when the menubar is about to be registered. + // Causes the native menubar to be created, and the XUL menubar to be hidden + void Activate(); + + // Called from the menuservice when the menubar is no longer registered + // with the desktop shell. Will cause the XUL menubar to be shown again + void Deactivate(); + + void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute); + void OnContentInserted(nsIContent *aContainer, nsIContent *aChild, + nsIContent *aPrevSibling); + void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild); + +private: + friend class nsMenuBarDocEventListener; + + enum ModifierFlags { + eModifierShift = (1 << 0), + eModifierCtrl = (1 << 1), + eModifierAlt = (1 << 2), + eModifierMeta = (1 << 3) + }; + + nsMenuBar(); + nsresult Init(nsIWidget *aParent, nsIContent *aMenuBarNode); + void Build(); + void DisconnectDocumentEventListeners(); + void SetShellShowingMenuBar(bool aShowing); + void Focus(); + void Blur(); + ModifierFlags GetModifiersFromEvent(nsIDOMKeyEvent *aEvent); + nsresult Keypress(nsIDOMEvent *aEvent); + nsresult KeyDown(nsIDOMEvent *aEvent); + nsresult KeyUp(nsIDOMEvent *aEvent); + + GtkWidget *mTopLevel; + DbusmenuServer *mServer; + nsCOMPtr mDocument; + nsNativeMenuGIORequest mRegisterRequestCanceller; + nsRefPtr mEventListener; + + uint32_t mAccessKey; + ModifierFlags mAccessKeyMask; + bool mIsActive; +}; + +#endif /* __nsMenuBar_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuContainer.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuContainer.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,179 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "nsGkAtoms.h" +#include "nsIAtom.h" +#include "nsIContent.h" + +#include "nsDbusmenu.h" +#include "nsMenu.h" +#include "nsMenuItem.h" +#include "nsMenuSeparator.h" + +#include "nsMenuContainer.h" + +const nsMenuContainer::ChildTArray::index_type nsMenuContainer::NoIndex = nsMenuContainer::ChildTArray::NoIndex; + +typedef nsMenuObject* (*nsMenuObjectConstructor)(nsMenuContainer*, + nsIContent*); +static nsMenuObjectConstructor +GetMenuObjectConstructor(nsIContent *aContent) +{ + if (!aContent->IsXUL()) { + return nullptr; + } + + nsIAtom *tag = aContent->Tag(); + if (tag == nsGkAtoms::menuitem) { + return nsMenuItem::Create; + } else if (tag == nsGkAtoms::menu) { + return nsMenu::Create; + } else if (tag == nsGkAtoms::menuseparator) { + return nsMenuSeparator::Create; + } + + return nullptr; +} + +static bool +ContentIsSupported(nsIContent *aContent) +{ + return GetMenuObjectConstructor(aContent) ? true : false; +} + +nsMenuObject* +nsMenuContainer::CreateChild(nsIContent *aContent, nsresult *aRv) +{ + nsMenuObjectConstructor ctor = GetMenuObjectConstructor(aContent); + if (!ctor) { + // There are plenty of node types we might stumble across that + // aren't supported. This isn't an error though + if (aRv) { + *aRv = NS_OK; + } + return nullptr; + } + + nsMenuObject *res = ctor(this, aContent); + if (!res) { + if (aRv) { + *aRv = NS_ERROR_FAILURE; + } + return nullptr; + } + + if (aRv) { + *aRv = NS_OK; + } + return res; +} + +uint32_t +nsMenuContainer::IndexOf(nsIContent *aChild) const +{ + if (!aChild) { + return NoIndex; + } + + uint32_t count = ChildCount(); + for (uint32_t i = 0; i < count; ++i) { + if (ChildAt(i)->ContentNode() == aChild) { + return i; + } + } + + return NoIndex; +} + +nsresult +nsMenuContainer::RemoveChildAt(uint32_t aIndex, bool aUpdateNative) +{ + if (aIndex >= ChildCount()) { + return NS_ERROR_INVALID_ARG; + } + + if (aUpdateNative) { + if (!dbusmenu_menuitem_child_delete(GetNativeData(), + ChildAt(aIndex)->GetNativeData())) { + return NS_ERROR_FAILURE; + } + } + + mChildren.RemoveElementAt(aIndex); + + return NS_OK; +} + +nsresult +nsMenuContainer::RemoveChild(nsIContent *aChild, bool aUpdateNative) +{ + uint32_t index = IndexOf(aChild); + if (index == NoIndex) { + return NS_ERROR_INVALID_ARG; + } + + return RemoveChildAt(index, aUpdateNative); +} + +nsresult +nsMenuContainer::InsertChildAfter(nsMenuObject *aChild, + nsIContent *aPrevSibling, + bool aUpdateNative) +{ + uint32_t index = IndexOf(aPrevSibling); + if (index == NoIndex && aPrevSibling) { + return NS_ERROR_INVALID_ARG; + } + + ++index; + + if (aUpdateNative) { + aChild->CreateNativeData(); + if (!dbusmenu_menuitem_child_add_position(GetNativeData(), + aChild->GetNativeData(), + index)) { + return NS_ERROR_FAILURE; + } + } + + return mChildren.InsertElementAt(index, aChild) ? NS_OK : NS_ERROR_FAILURE; +} + +nsresult +nsMenuContainer::AppendChild(nsMenuObject *aChild, bool aUpdateNative) +{ + if (aUpdateNative) { + aChild->CreateNativeData(); + if (!dbusmenu_menuitem_child_append(GetNativeData(), + aChild->GetNativeData())) { + return NS_ERROR_FAILURE; + } + } + + return mChildren.AppendElement(aChild) ? NS_OK : NS_ERROR_FAILURE; +} + +nsMenuContainer::nsMenuContainer() : + nsMenuObject() +{ +} + +bool +nsMenuContainer::NeedsRebuild() const +{ + return false; +} + +/* static */ nsIContent* +nsMenuContainer::GetPreviousSupportedSibling(nsIContent *aContent) +{ + do { + aContent = aContent->GetPreviousSibling(); + } while (aContent && !ContentIsSupported(aContent)); + + return aContent; +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuContainer.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuContainer.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsMenuContainer_h__ +#define __nsMenuContainer_h__ + +#include "nsAutoPtr.h" +#include "nsTArray.h" + +#include "nsMenuObject.h" + +class nsIContent; + +// Base class for containers (menus and menubars) +class nsMenuContainer : public nsMenuObject +{ +public: + typedef nsTArray > ChildTArray; + + // Determine if this container is being displayed on screen. Must be + // implemented by subclasses. Must return true if the container is + // in the fully open state, or false otherwise + virtual bool IsBeingDisplayed() const = 0; + + // Determine if this container will be rebuilt the next time it opens. + // Returns false by default but can be overridden by subclasses + virtual bool NeedsRebuild() const; + + // Return the first previous sibling that is of a type supported by the + // menu system + static nsIContent* GetPreviousSupportedSibling(nsIContent *aContent); + + static const ChildTArray::index_type NoIndex; + +protected: + nsMenuContainer(); + + // Create a new child element for the specified content node + nsMenuObject* CreateChild(nsIContent *aContent, nsresult *aRv); + + // Return the index of the child for the specified content node + uint32_t IndexOf(nsIContent *aChild) const; + + uint32_t ChildCount() const { return mChildren.Length(); } + nsMenuObject* ChildAt(uint32_t aIndex) const { return mChildren[aIndex]; } + + nsresult RemoveChildAt(uint32_t aIndex, bool aUpdateNative = true); + + // Remove the child that owns the specified content node + nsresult RemoveChild(nsIContent *aChild, bool aUpdateNative = true); + + // Insert a new child after the child that owns the specified content node + nsresult InsertChildAfter(nsMenuObject *aChild, nsIContent *aPrevSibling, + bool aUpdateNative = true); + + nsresult AppendChild(nsMenuObject *aChild, bool aUpdateNative = true); + +private: + ChildTArray mChildren; +}; + +#endif /* __nsMenuContainer_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuItem.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuItem.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,739 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "mozilla/ArrayUtils.h" +#include "mozilla/dom/Element.h" +#include "mozilla/Preferences.h" +#include "mozilla/TextEvents.h" +#include "nsAutoPtr.h" +#include "nsContentUtils.h" +#include "nsCRT.h" +#include "nsGkAtoms.h" +#include "nsGtkUtils.h" +#include "nsIContent.h" +#include "nsIDocument.h" +#include "nsIDOMDocument.h" +#include "nsIDOMEvent.h" +#include "nsIDOMEventTarget.h" +#include "nsIDOMKeyEvent.h" +#include "nsIDOMXULCommandEvent.h" +#include "nsIRunnable.h" +#include "nsReadableUtils.h" +#include "nsString.h" +#include "nsStyleContext.h" +#include "nsThreadUtils.h" + +#include "nsMenu.h" +#include "nsMenuBar.h" +#include "nsMenuContainer.h" +#include "nsNativeMenuDocListener.h" + +#include +#include +#include +#include + +#include "nsMenuItem.h" + +using namespace mozilla; +using namespace mozilla::widget; + +struct KeyCodeData { + const char* str; + size_t strlength; + uint32_t keycode; +}; + +static struct KeyCodeData gKeyCodes[] = { +#define NS_DEFINE_VK(aDOMKeyName, aDOMKeyCode) \ + { #aDOMKeyName, sizeof(#aDOMKeyName) - 1, aDOMKeyCode } +#include "nsVKList.h" +#undef NS_DEFINE_VK +}; + +struct KeyPair { + uint32_t DOMKeyCode; + guint GDKKeyval; +}; + +// +// Netscape keycodes are defined in widget/public/nsGUIEvent.h +// GTK keycodes are defined in +// +static const KeyPair gKeyPairs[] = { + { NS_VK_CANCEL, GDK_Cancel }, + { NS_VK_BACK, GDK_BackSpace }, + { NS_VK_TAB, GDK_Tab }, + { NS_VK_TAB, GDK_ISO_Left_Tab }, + { NS_VK_CLEAR, GDK_Clear }, + { NS_VK_RETURN, GDK_Return }, + { NS_VK_SHIFT, GDK_Shift_L }, + { NS_VK_SHIFT, GDK_Shift_R }, + { NS_VK_SHIFT, GDK_Shift_Lock }, + { NS_VK_CONTROL, GDK_Control_L }, + { NS_VK_CONTROL, GDK_Control_R }, + { NS_VK_ALT, GDK_Alt_L }, + { NS_VK_ALT, GDK_Alt_R }, + { NS_VK_META, GDK_Meta_L }, + { NS_VK_META, GDK_Meta_R }, + + // Assume that Super or Hyper is always mapped to physical Win key. + { NS_VK_WIN, GDK_Super_L }, + { NS_VK_WIN, GDK_Super_R }, + { NS_VK_WIN, GDK_Hyper_L }, + { NS_VK_WIN, GDK_Hyper_R }, + + // GTK's AltGraph key is similar to Mac's Option (Alt) key. However, + // unfortunately, browsers on Mac are using NS_VK_ALT for it even though + // it's really different from Alt key on Windows. + // On the other hand, GTK's AltGrapsh keys are really different from + // Alt key. However, there is no AltGrapsh key on Windows. On Windows, + // both Ctrl and Alt keys are pressed internally when AltGr key is pressed. + // For some languages' users, AltGraph key is important, so, web + // applications on such locale may want to know AltGraph key press. + // Therefore, we should map AltGr keycode for them only on GTK. + { NS_VK_ALTGR, GDK_ISO_Level3_Shift }, + { NS_VK_ALTGR, GDK_ISO_Level5_Shift }, + // We assume that Mode_switch is always used for level3 shift. + { NS_VK_ALTGR, GDK_Mode_switch }, + + { NS_VK_PAUSE, GDK_Pause }, + { NS_VK_CAPS_LOCK, GDK_Caps_Lock }, + { NS_VK_KANA, GDK_Kana_Lock }, + { NS_VK_KANA, GDK_Kana_Shift }, + { NS_VK_HANGUL, GDK_Hangul }, + // { NS_VK_JUNJA, GDK_XXX }, + // { NS_VK_FINAL, GDK_XXX }, + { NS_VK_HANJA, GDK_Hangul_Hanja }, + { NS_VK_KANJI, GDK_Kanji }, + { NS_VK_ESCAPE, GDK_Escape }, + { NS_VK_CONVERT, GDK_Henkan }, + { NS_VK_NONCONVERT, GDK_Muhenkan }, + // { NS_VK_ACCEPT, GDK_XXX }, + // { NS_VK_MODECHANGE, GDK_XXX }, + { NS_VK_SPACE, GDK_space }, + { NS_VK_PAGE_UP, GDK_Page_Up }, + { NS_VK_PAGE_DOWN, GDK_Page_Down }, + { NS_VK_END, GDK_End }, + { NS_VK_HOME, GDK_Home }, + { NS_VK_LEFT, GDK_Left }, + { NS_VK_UP, GDK_Up }, + { NS_VK_RIGHT, GDK_Right }, + { NS_VK_DOWN, GDK_Down }, + { NS_VK_SELECT, GDK_Select }, + { NS_VK_PRINT, GDK_Print }, + { NS_VK_EXECUTE, GDK_Execute }, + { NS_VK_PRINTSCREEN, GDK_Print }, + { NS_VK_INSERT, GDK_Insert }, + { NS_VK_DELETE, GDK_Delete }, + { NS_VK_HELP, GDK_Help }, + + // keypad keys + { NS_VK_LEFT, GDK_KP_Left }, + { NS_VK_RIGHT, GDK_KP_Right }, + { NS_VK_UP, GDK_KP_Up }, + { NS_VK_DOWN, GDK_KP_Down }, + { NS_VK_PAGE_UP, GDK_KP_Page_Up }, + // Not sure what these are + //{ NS_VK_, GDK_KP_Prior }, + //{ NS_VK_, GDK_KP_Next }, + { NS_VK_CLEAR, GDK_KP_Begin }, // Num-unlocked 5 + { NS_VK_PAGE_DOWN, GDK_KP_Page_Down }, + { NS_VK_HOME, GDK_KP_Home }, + { NS_VK_END, GDK_KP_End }, + { NS_VK_INSERT, GDK_KP_Insert }, + { NS_VK_DELETE, GDK_KP_Delete }, + { NS_VK_RETURN, GDK_KP_Enter }, + + { NS_VK_NUM_LOCK, GDK_Num_Lock }, + { NS_VK_SCROLL_LOCK,GDK_Scroll_Lock }, + + // Function keys + { NS_VK_F1, GDK_F1 }, + { NS_VK_F2, GDK_F2 }, + { NS_VK_F3, GDK_F3 }, + { NS_VK_F4, GDK_F4 }, + { NS_VK_F5, GDK_F5 }, + { NS_VK_F6, GDK_F6 }, + { NS_VK_F7, GDK_F7 }, + { NS_VK_F8, GDK_F8 }, + { NS_VK_F9, GDK_F9 }, + { NS_VK_F10, GDK_F10 }, + { NS_VK_F11, GDK_F11 }, + { NS_VK_F12, GDK_F12 }, + { NS_VK_F13, GDK_F13 }, + { NS_VK_F14, GDK_F14 }, + { NS_VK_F15, GDK_F15 }, + { NS_VK_F16, GDK_F16 }, + { NS_VK_F17, GDK_F17 }, + { NS_VK_F18, GDK_F18 }, + { NS_VK_F19, GDK_F19 }, + { NS_VK_F20, GDK_F20 }, + { NS_VK_F21, GDK_F21 }, + { NS_VK_F22, GDK_F22 }, + { NS_VK_F23, GDK_F23 }, + { NS_VK_F24, GDK_F24 }, + + // context menu key, keysym 0xff67, typically keycode 117 on 105-key (Microsoft) + // x86 keyboards, located between right 'Windows' key and right Ctrl key + { NS_VK_CONTEXT_MENU, GDK_Menu }, + { NS_VK_SLEEP, GDK_Sleep }, + + { NS_VK_ATTN, GDK_3270_Attn }, + { NS_VK_CRSEL, GDK_3270_CursorSelect }, + { NS_VK_EXSEL, GDK_3270_ExSelect }, + { NS_VK_EREOF, GDK_3270_EraseEOF }, + { NS_VK_PLAY, GDK_3270_Play }, + //{ NS_VK_ZOOM, GDK_XXX }, + { NS_VK_PA1, GDK_3270_PA1 }, +}; + +static guint +ConvertGeckoKeyNameToGDKKeyval(nsAString& aKeyName) +{ + NS_ConvertUTF16toUTF8 keyName(aKeyName); + ToUpperCase(keyName); // We want case-insensitive comparison with data + // stored as uppercase. + + uint32_t keyCode = 0; + + uint32_t keyNameLength = keyName.Length(); + const char* keyNameStr = keyName.get(); + for (uint16_t i = 0; i < ArrayLength(gKeyCodes); ++i) { + if (keyNameLength == gKeyCodes[i].strlength && + !nsCRT::strcmp(gKeyCodes[i].str, keyNameStr)) { + keyCode = gKeyCodes[i].keycode; + break; + } + } + + // First, try to handle alphanumeric input, not listed in nsKeycodes: + // most likely, more letters will be getting typed in than things in + // the key list, so we will look through these first. + + if (keyCode >= NS_VK_A && keyCode <= NS_VK_Z) { + // gdk and DOM both use the ASCII codes for these keys. + return keyCode; + } + + // numbers + if (keyCode >= NS_VK_0 && keyCode <= NS_VK_9) { + // gdk and DOM both use the ASCII codes for these keys. + return keyCode - NS_VK_0 + GDK_0; + } + + switch (keyCode) { + // keys in numpad + case NS_VK_MULTIPLY: return GDK_KP_Multiply; + case NS_VK_ADD: return GDK_KP_Add; + case NS_VK_SEPARATOR: return GDK_KP_Separator; + case NS_VK_SUBTRACT: return GDK_KP_Subtract; + case NS_VK_DECIMAL: return GDK_KP_Decimal; + case NS_VK_DIVIDE: return GDK_KP_Divide; + case NS_VK_NUMPAD0: return GDK_KP_0; + case NS_VK_NUMPAD1: return GDK_KP_1; + case NS_VK_NUMPAD2: return GDK_KP_2; + case NS_VK_NUMPAD3: return GDK_KP_3; + case NS_VK_NUMPAD4: return GDK_KP_4; + case NS_VK_NUMPAD5: return GDK_KP_5; + case NS_VK_NUMPAD6: return GDK_KP_6; + case NS_VK_NUMPAD7: return GDK_KP_7; + case NS_VK_NUMPAD8: return GDK_KP_8; + case NS_VK_NUMPAD9: return GDK_KP_9; + // other prinable keys + case NS_VK_SPACE: return GDK_space; + case NS_VK_COLON: return GDK_colon; + case NS_VK_SEMICOLON: return GDK_semicolon; + case NS_VK_LESS_THAN: return GDK_less; + case NS_VK_EQUALS: return GDK_equal; + case NS_VK_GREATER_THAN: return GDK_greater; + case NS_VK_QUESTION_MARK: return GDK_question; + case NS_VK_AT: return GDK_at; + case NS_VK_CIRCUMFLEX: return GDK_asciicircum; + case NS_VK_EXCLAMATION: return GDK_exclam; + case NS_VK_DOUBLE_QUOTE: return GDK_quotedbl; + case NS_VK_HASH: return GDK_numbersign; + case NS_VK_DOLLAR: return GDK_dollar; + case NS_VK_PERCENT: return GDK_percent; + case NS_VK_AMPERSAND: return GDK_ampersand; + case NS_VK_UNDERSCORE: return GDK_underscore; + case NS_VK_OPEN_PAREN: return GDK_parenleft; + case NS_VK_CLOSE_PAREN: return GDK_parenright; + case NS_VK_ASTERISK: return GDK_asterisk; + case NS_VK_PLUS: return GDK_plus; + case NS_VK_PIPE: return GDK_bar; + case NS_VK_HYPHEN_MINUS: return GDK_minus; + case NS_VK_OPEN_CURLY_BRACKET: return GDK_braceleft; + case NS_VK_CLOSE_CURLY_BRACKET: return GDK_braceright; + case NS_VK_TILDE: return GDK_asciitilde; + case NS_VK_COMMA: return GDK_comma; + case NS_VK_PERIOD: return GDK_period; + case NS_VK_SLASH: return GDK_slash; + case NS_VK_BACK_QUOTE: return GDK_grave; + case NS_VK_OPEN_BRACKET: return GDK_bracketleft; + case NS_VK_BACK_SLASH: return GDK_backslash; + case NS_VK_CLOSE_BRACKET: return GDK_bracketright; + case NS_VK_QUOTE: return GDK_apostrophe; + } + + // misc other things + for (uint32_t i = 0; i < ArrayLength(gKeyPairs); ++i) { + if (gKeyPairs[i].DOMKeyCode == keyCode) { + return gKeyPairs[i].GDKKeyval; + } + } + + return 0; +} + +class nsMenuItemUncheckSiblingsRunnable MOZ_FINAL : public nsRunnable +{ +public: + NS_IMETHODIMP Run() + { + if (mMenuItem) { + mMenuItem->UncheckSiblings(); + } + return NS_OK; + } + + nsMenuItemUncheckSiblingsRunnable(nsMenuItem *aMenuItem) : + mMenuItem(aMenuItem) { }; + +private: + nsWeakMenuObject mMenuItem; +}; + +bool +nsMenuItem::IsCheckboxOrRadioItem() const +{ + return MenuItemType() == eMenuItemType_Radio || + MenuItemType() == eMenuItemType_CheckBox; +} + +/* static */ void +nsMenuItem::item_activated_cb(DbusmenuMenuitem *menuitem, + guint timestamp, + gpointer user_data) +{ + nsMenuItem *item = static_cast(user_data); + item->Activate(timestamp); +} + +void +nsMenuItem::Activate(uint32_t aTimestamp) +{ + GdkWindow *window = gtk_widget_get_window(MenuBar()->TopLevelWindow()); + gdk_x11_window_set_user_time( + window, std::min(aTimestamp, gdk_x11_get_server_time(window))); + + // We do this to avoid mutating our view of the menu until + // after we have finished + nsNativeMenuAutoUpdateBatch batch; + + if (!ContentNode()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::autocheck, + nsGkAtoms::_false, eCaseMatters) && + (MenuItemType() == eMenuItemType_CheckBox || + (MenuItemType() == eMenuItemType_Radio && !IsChecked()))) { + ContentNode()->SetAttr(kNameSpaceID_None, nsGkAtoms::checked, + IsChecked() ? + NS_LITERAL_STRING("false") : NS_LITERAL_STRING("true"), + true); + } + + nsIDocument *doc = ContentNode()->OwnerDoc(); + nsCOMPtr target = do_QueryInterface(ContentNode()); + nsCOMPtr domDoc = do_QueryInterface(doc); + if (domDoc && target) { + nsCOMPtr event; + domDoc->CreateEvent(NS_LITERAL_STRING("xulcommandevent"), + getter_AddRefs(event)); + nsCOMPtr command = do_QueryInterface(event); + if (command) { + command->InitCommandEvent(NS_LITERAL_STRING("command"), + true, true, doc->GetWindow(), 0, + false, false, false, false, nullptr); + + event->SetTrusted(true); + bool dummy; + target->DispatchEvent(event, &dummy); + } + } + + // This kinda sucks, but Unity doesn't send a closed event + // after activating a menuitem + nsMenuObject *ancestor = Parent(); + while (ancestor && ancestor->Type() == eType_Menu) { + static_cast(ancestor)->OnClose(); + ancestor = ancestor->Parent(); + } +} + +void +nsMenuItem::CopyAttrFromNodeIfExists(nsIContent *aContent, nsIAtom *aAttribute) +{ + nsAutoString value; + if (aContent->GetAttr(kNameSpaceID_None, aAttribute, value)) { + ContentNode()->SetAttr(kNameSpaceID_None, aAttribute, value, true); + } +} + +void +nsMenuItem::UpdateState() +{ + if (!IsCheckboxOrRadioItem()) { + return; + } + + SetCheckState(ContentNode()->AttrValueIs(kNameSpaceID_None, + nsGkAtoms::checked, + nsGkAtoms::_true, + eCaseMatters)); + dbusmenu_menuitem_property_set_int(GetNativeData(), + DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, + IsChecked() ? + DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : + DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); +} + +void +nsMenuItem::UpdateTypeAndState() +{ + static nsIContent::AttrValuesArray attrs[] = + { &nsGkAtoms::checkbox, &nsGkAtoms::radio, nullptr }; + int32_t type = ContentNode()->FindAttrValueIn(kNameSpaceID_None, + nsGkAtoms::type, + attrs, eCaseMatters); + + if (type >= 0 && type < 2) { + if (type == 0) { + dbusmenu_menuitem_property_set(GetNativeData(), + DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, + DBUSMENU_MENUITEM_TOGGLE_CHECK); + SetMenuItemType(eMenuItemType_CheckBox); + } else if (type == 1) { + dbusmenu_menuitem_property_set(GetNativeData(), + DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, + DBUSMENU_MENUITEM_TOGGLE_RADIO); + SetMenuItemType(eMenuItemType_Radio); + } + + UpdateState(); + } else { + dbusmenu_menuitem_property_remove(GetNativeData(), + DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE); + dbusmenu_menuitem_property_remove(GetNativeData(), + DBUSMENU_MENUITEM_PROP_TOGGLE_STATE); + SetMenuItemType(eMenuItemType_Normal); + } +} + +void +nsMenuItem::UpdateAccel() +{ + nsIDocument *doc = ContentNode()->GetCurrentDoc(); + if (doc) { + nsCOMPtr oldKeyContent; + oldKeyContent.swap(mKeyContent); + + nsAutoString key; + ContentNode()->GetAttr(kNameSpaceID_None, nsGkAtoms::key, key); + if (!key.IsEmpty()) { + mKeyContent = doc->GetElementById(key); + } + + if (mKeyContent != oldKeyContent) { + if (oldKeyContent) { + DocListener()->UnregisterForContentChanges(oldKeyContent); + } + if (mKeyContent) { + DocListener()->RegisterForContentChanges(mKeyContent, this); + } + } + } + + if (!mKeyContent) { + dbusmenu_menuitem_property_remove(GetNativeData(), + DBUSMENU_MENUITEM_PROP_SHORTCUT); + return; + } + + nsAutoString modifiers; + mKeyContent->GetAttr(kNameSpaceID_None, nsGkAtoms::modifiers, modifiers); + + uint32_t modifier = 0; + + if (!modifiers.IsEmpty()) { + char* str = ToNewUTF8String(modifiers); + char *token = strtok(str, ", \t"); + while(token) { + if (nsCRT::strcmp(token, "shift") == 0) { + modifier |= GDK_SHIFT_MASK; + } else if (nsCRT::strcmp(token, "alt") == 0) { + modifier |= GDK_MOD1_MASK; + } else if (nsCRT::strcmp(token, "meta") == 0) { + modifier |= GDK_META_MASK; + } else if (nsCRT::strcmp(token, "control") == 0) { + modifier |= GDK_CONTROL_MASK; + } else if (nsCRT::strcmp(token, "accel") == 0) { + int32_t accel = Preferences::GetInt("ui.key.accelKey"); + if (accel == nsIDOMKeyEvent::DOM_VK_META) { + modifier |= GDK_META_MASK; + } else if (accel == nsIDOMKeyEvent::DOM_VK_ALT) { + modifier |= GDK_MOD1_MASK; + } else { + modifier |= GDK_CONTROL_MASK; + } + } + + token = strtok(nullptr, ", \t"); + } + + nsMemory::Free(str); + } + + nsAutoString keyStr; + mKeyContent->GetAttr(kNameSpaceID_None, nsGkAtoms::key, keyStr); + + guint key = 0; + if (!keyStr.IsEmpty()) { + key = gdk_unicode_to_keyval(*keyStr.BeginReading()); + } + + if (key == 0) { + mKeyContent->GetAttr(kNameSpaceID_None, nsGkAtoms::keycode, keyStr); + if (!keyStr.IsEmpty()) { + key = ConvertGeckoKeyNameToGDKKeyval(keyStr); + } + } + + if (key == 0) { + key = GDK_VoidSymbol; + } + + if (key != GDK_VoidSymbol) { + dbusmenu_menuitem_property_set_shortcut(GetNativeData(), key, + static_cast(modifier)); + } else { + dbusmenu_menuitem_property_remove(GetNativeData(), + DBUSMENU_MENUITEM_PROP_SHORTCUT); + } +} + +void +nsMenuItem::InitializeNativeData() +{ + g_signal_connect(G_OBJECT(GetNativeData()), + DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(item_activated_cb), this); + + UpdateTypeAndState(); + UpdateAccel(); + UpdateLabel(); + UpdateSensitivity(); +} + +void +nsMenuItem::UpdateContentAttributes() +{ + nsIDocument *doc = ContentNode()->GetCurrentDoc(); + if (!doc) { + return; + } + + nsAutoString command; + ContentNode()->GetAttr(kNameSpaceID_None, nsGkAtoms::command, command); + if (command.IsEmpty()) { + return; + } + + nsCOMPtr commandContent = doc->GetElementById(command); + if (!commandContent) { + return; + } + + if (commandContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::disabled, + nsGkAtoms::_true, eCaseMatters)) { + ContentNode()->SetAttr(kNameSpaceID_None, nsGkAtoms::disabled, + NS_LITERAL_STRING("true"), true); + } else { + ContentNode()->UnsetAttr(kNameSpaceID_None, nsGkAtoms::disabled, true); + } + + CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::checked); + CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::accesskey); + CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::label); + CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::hidden); +} + +void +nsMenuItem::Update(nsStyleContext *aStyleContext) +{ + UpdateVisibility(aStyleContext); + UpdateIcon(aStyleContext); +} + +void +nsMenuItem::UncheckSiblings() +{ + if (!ContentNode()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, + nsGkAtoms::radio, eCaseMatters)) { + // If we're not a radio button, we don't care + return; + } + + nsAutoString name; + ContentNode()->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name); + + nsIContent *parent = ContentNode()->GetParent(); + if (!parent) { + return; + } + + uint32_t count = parent->GetChildCount(); + for (uint32_t i = 0; i < count; ++i) { + nsIContent *sibling = parent->GetChildAt(i); + + nsAutoString otherName; + sibling->GetAttr(kNameSpaceID_None, nsGkAtoms::name, otherName); + + if (sibling != ContentNode() && otherName == name && + sibling->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, + nsGkAtoms::radio, eCaseMatters)) { + sibling->UnsetAttr(kNameSpaceID_None, nsGkAtoms::checked, true); + } + } +} + +bool +nsMenuItem::IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const +{ + return nsCRT::strcmp(dbusmenu_menuitem_property_get(aNativeData, + DBUSMENU_MENUITEM_PROP_TYPE), + "separator") != 0; +} + +nsMenuBar* +nsMenuItem::MenuBar() +{ + nsMenuObject *tmp = this; + while (tmp->Parent()) { + tmp = tmp->Parent(); + } + + MOZ_ASSERT(tmp->Type() == eType_MenuBar, "The top-level should be a menubar"); + + return static_cast(tmp); +} + +nsMenuObject::PropertyFlags +nsMenuItem::SupportedProperties() const +{ + return static_cast( + nsMenuObject::ePropLabel | + nsMenuObject::ePropEnabled | + nsMenuObject::ePropVisible | + nsMenuObject::ePropIconData | + nsMenuObject::ePropShortcut | + nsMenuObject::ePropToggleType | + nsMenuObject::ePropToggleState + ); +} + +nsMenuItem::nsMenuItem() : + nsMenuObject() +{ + MOZ_COUNT_CTOR(nsMenuItem); +} + +nsMenuItem::~nsMenuItem() +{ + if (DocListener() && mKeyContent) { + DocListener()->UnregisterForContentChanges(mKeyContent); + } + + if (GetNativeData()) { + g_signal_handlers_disconnect_by_func(GetNativeData(), + FuncToGpointer(item_activated_cb), + this); + } + + MOZ_COUNT_DTOR(nsMenuItem); +} + +nsMenuObject::EType +nsMenuItem::Type() const +{ + return nsMenuObject::eType_MenuItem; +} + +/* static */ nsMenuObject* +nsMenuItem::Create(nsMenuContainer *aParent, nsIContent *aContent) +{ + nsAutoPtr menuitem(new nsMenuItem()); + if (NS_FAILED(menuitem->Init(aParent, aContent))) { + return nullptr; + } + + return menuitem.forget(); +} + +void +nsMenuItem::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) +{ + NS_ASSERTION(aContent == ContentNode() || aContent == mKeyContent, + "Received an event that wasn't meant for us!"); + + if (Parent()->NeedsRebuild()) { + return; + } + + if (aContent == ContentNode() && aAttribute == nsGkAtoms::checked && + aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::checked, + nsGkAtoms::_true, eCaseMatters)) { + if (nsContentUtils::IsSafeToRunScript()) { + UncheckSiblings(); + } else { + nsContentUtils::AddScriptRunner( + new nsMenuItemUncheckSiblingsRunnable(this)); + } + } + + if (aContent == ContentNode()) { + if (aAttribute == nsGkAtoms::key) { + UpdateAccel(); + } else if (aAttribute == nsGkAtoms::label || + aAttribute == nsGkAtoms::accesskey || + aAttribute == nsGkAtoms::crop) { + UpdateLabel(); + } else if (aAttribute == nsGkAtoms::disabled) { + UpdateSensitivity(); + } else if (aAttribute == nsGkAtoms::type) { + UpdateTypeAndState(); + } else if (aAttribute == nsGkAtoms::checked) { + UpdateState(); + } + } else if (aContent == mKeyContent && + (aAttribute == nsGkAtoms::key || + aAttribute == nsGkAtoms::keycode || + aAttribute == nsGkAtoms::modifiers)) { + UpdateAccel(); + } + + if (!Parent()->IsBeingDisplayed() || aContent != ContentNode()) { + return; + } + + if (aAttribute == nsGkAtoms::hidden || + aAttribute == nsGkAtoms::collapsed) { + nsRefPtr sc = GetStyleContext(); + UpdateVisibility(sc); + } else if (aAttribute == nsGkAtoms::image) { + nsRefPtr sc = GetStyleContext(); + UpdateIcon(sc); + } +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuItem.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuItem.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsMenuItem_h__ +#define __nsMenuItem_h__ + +#include "mozilla/Attributes.h" +#include "nsCOMPtr.h" + +#include "nsDbusmenu.h" +#include "nsMenuObject.h" + +#include + +#define NSMENUITEM_NUMBER_OF_TYPE_BITS 2U +#define NSMENUITEM_NUMBER_OF_FLAGS 1U + +class nsIAtom; +class nsIContent; +class nsStyleContext; +class nsMenuBar; +class nsMenuContainer; + +/* + * This class represents 3 main classes of menuitems: labels, checkboxes and + * radio buttons (with/without an icon) + */ +class nsMenuItem MOZ_FINAL : public nsMenuObject +{ +public: + ~nsMenuItem(); + + nsMenuObject::EType Type() const; + + static nsMenuObject* Create(nsMenuContainer *aParent, + nsIContent *aContent); + + void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute); + +private: + friend class nsMenuItemUncheckSiblingsRunnable; + + enum { + eMenuItemFlag_ToggleState = (1 << 0) + }; + + enum EMenuItemType { + eMenuItemType_Normal, + eMenuItemType_Radio, + eMenuItemType_CheckBox + }; + + nsMenuItem(); + + EMenuItemType MenuItemType() const + { + return static_cast( + (GetFlags() & + (((1U << NSMENUITEM_NUMBER_OF_TYPE_BITS) - 1U) + << NSMENUITEM_NUMBER_OF_FLAGS)) >> NSMENUITEM_NUMBER_OF_FLAGS); + } + void SetMenuItemType(EMenuItemType aType) + { + ClearFlags(((1U << NSMENUITEM_NUMBER_OF_TYPE_BITS) - 1U) << NSMENUITEM_NUMBER_OF_FLAGS); + SetFlags(aType << NSMENUITEM_NUMBER_OF_FLAGS); + } + bool IsCheckboxOrRadioItem() const; + + bool IsChecked() const + { + return HasFlags(eMenuItemFlag_ToggleState); + } + void SetCheckState(bool aState) + { + if (aState) { + SetFlags(eMenuItemFlag_ToggleState); + } else { + ClearFlags(eMenuItemFlag_ToggleState); + } + } + + static void item_activated_cb(DbusmenuMenuitem *menuitem, + guint timestamp, + gpointer user_data); + void Activate(uint32_t aTimestamp); + + void CopyAttrFromNodeIfExists(nsIContent *aContent, nsIAtom *aAtom); + void UpdateState(); + void UpdateTypeAndState(); + void UpdateAccel(); + + void InitializeNativeData(); + void UpdateContentAttributes(); + void Update(nsStyleContext *aStyleContext); + void UncheckSiblings(); + bool IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const; + nsMenuBar* MenuBar(); + nsMenuObject::PropertyFlags SupportedProperties() const; + + nsCOMPtr mKeyContent; +}; + +#endif /* __nsMenuItem_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuObject.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuObject.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,704 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "ImageOps.h" +#include "imgIContainer.h" +#include "imgINotificationObserver.h" +#include "imgLoader.h" +#include "imgRequestProxy.h" +#include "mozilla/ArrayUtils.h" +#include "mozilla/dom/Element.h" +#include "mozilla/LookAndFeel.h" +#include "mozilla/Preferences.h" +#include "nsAttrValue.h" +#include "nsComputedDOMStyle.h" +#include "nsContentUtils.h" +#include "nsGkAtoms.h" +#include "nsIContent.h" +#include "nsIDocument.h" +#include "nsILoadGroup.h" +#include "nsImageToPixbuf.h" +#include "nsIPresShell.h" +#include "nsIURI.h" +#include "nsNetUtil.h" +#include "nsPresContext.h" +#include "nsRect.h" +#include "nsServiceManagerUtils.h" +#include "nsString.h" +#include "nsStyleConsts.h" +#include "nsStyleContext.h" +#include "nsStyleStruct.h" +#include "nsThreadUtils.h" +#include "nsUnicharUtils.h" + +#include "nsMenuContainer.h" +#include "nsNativeMenuAtoms.h" +#include "nsNativeMenuDocListener.h" +#include "nsNativeMenuUtils.h" + +#include +#include +#include + +#include "nsMenuObject.h" + +using namespace mozilla; +using mozilla::image::ImageOps; + +#define MAX_WIDTH 350000 + +const char *gPropertyStrings[] = { +#define DBUSMENU_PROPERTY(e, s, b) s, + DBUSMENU_PROPERTIES +#undef DBUSMENU_PROPERTY + nullptr +}; + +nsWeakMenuObjectBase* nsWeakMenuObjectBase::sHead; +PangoLayout* gPangoLayout = nullptr; + +class nsMenuObjectContainerOpeningRunnable : public nsRunnable +{ +public: + NS_IMETHODIMP Run() + { + if (mMenuObject) { + mMenuObject->ContainerIsOpening(); + } + return NS_OK; + } + + nsMenuObjectContainerOpeningRunnable(nsMenuObject *aMenuObject) : + mMenuObject(aMenuObject) { }; + +private: + nsWeakMenuObject mMenuObject; +}; + +class nsMenuObjectIconLoader MOZ_FINAL : public imgINotificationObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_IMGINOTIFICATIONOBSERVER + + nsMenuObjectIconLoader(nsMenuObject *aOwner) : mOwner(aOwner), + mIconLoaded(false) { }; + + void LoadIcon(nsStyleContext *aStyleContext); + void Destroy(); + +private: + ~nsMenuObjectIconLoader() { }; + + nsMenuObject *mOwner; + nsRefPtr mImageRequest; + nsCOMPtr mURI; + nsIntRect mImageRect; + bool mIconLoaded; +}; + +NS_IMPL_ISUPPORTS1(nsMenuObjectIconLoader, imgINotificationObserver) + +NS_IMETHODIMP +nsMenuObjectIconLoader::Notify(imgIRequest *aProxy, + int32_t aType, const nsIntRect *aRect) +{ + if (!mOwner) { + return NS_OK; + } + + if (aProxy != mImageRequest) { + return NS_ERROR_FAILURE; + } + + if (aType == imgINotificationObserver::DECODE_COMPLETE) { + mImageRequest->Cancel(NS_BINDING_ABORTED); + mImageRequest = nullptr; + return NS_OK; + } + + if (aType != imgINotificationObserver::FRAME_COMPLETE) { + return NS_OK; + } + + if (mIconLoaded) { + return NS_OK; + } + + mIconLoaded = true; + + nsCOMPtr img; + mImageRequest->GetImage(getter_AddRefs(img)); + if (!img) { + return NS_ERROR_FAILURE; + } + + if (!mImageRect.IsEmpty()) { + img = ImageOps::Clip(img, mImageRect); + } + + int32_t width, height; + img->GetWidth(&width); + img->GetHeight(&height); + + if (width <= 0 || height <= 0) { + mOwner->ClearIcon(); + return NS_OK; + } + + if (width > 100 || height > 100) { + // The icon data needs to go across DBus. Make sure the icon + // data isn't too large, else our connection gets terminated and + // GDbus helpfully aborts the application. Thank you :) + NS_WARNING("Icon data too large"); + mOwner->ClearIcon(); + return NS_OK; + } + + GdkPixbuf *pixbuf = nsImageToPixbuf::ImageToPixbuf(img); + if (pixbuf) { + dbusmenu_menuitem_property_set_image(mOwner->GetNativeData(), + DBUSMENU_MENUITEM_PROP_ICON_DATA, + pixbuf); + g_object_unref(pixbuf); + } + + return NS_OK; +} + +void +nsMenuObjectIconLoader::LoadIcon(nsStyleContext *aStyleContext) +{ + nsIDocument *doc = mOwner->ContentNode()->OwnerDoc(); + + nsCOMPtr uri; + nsIntRect imageRect; + imgRequestProxy *imageRequest = nullptr; + + nsAutoString uriString; + if (mOwner->ContentNode()->GetAttr(kNameSpaceID_None, nsGkAtoms::image, + uriString)) { + NS_NewURI(getter_AddRefs(uri), uriString); + } else { + nsIPresShell *shell = doc->GetShell(); + if (!shell) { + return; + } + + nsPresContext *pc = shell->GetPresContext(); + if (!pc || !aStyleContext) { + return; + } + + const nsStyleList *list = aStyleContext->StyleList(); + imageRequest = list->GetListStyleImage(); + if (imageRequest) { + imageRequest->GetURI(getter_AddRefs(uri)); + imageRect = list->mImageRegion.ToNearestPixels( + pc->AppUnitsPerDevPixel()); + } + } + + if (!uri) { + mOwner->ClearIcon(); + mURI = nullptr; + + if (mImageRequest) { + mImageRequest->Cancel(NS_BINDING_ABORTED); + mImageRequest = nullptr; + } + + return; + } + + bool same; + if (mURI && NS_SUCCEEDED(mURI->Equals(uri, &same)) && same && + (!imageRequest || imageRect == mImageRect)) { + return; + } + + if (mImageRequest) { + mImageRequest->Cancel(NS_BINDING_ABORTED); + mImageRequest = nullptr; + } + + mIconLoaded = false; + + mURI = uri; + + if (imageRequest) { + mImageRect = imageRect; + imageRequest->Clone(this, getter_AddRefs(mImageRequest)); + } else { + mImageRect.SetEmpty(); + nsCOMPtr loadGroup = doc->GetDocumentLoadGroup(); + nsRefPtr loader = + nsContentUtils::GetImgLoaderForDocument(doc); + if (!loader || !loadGroup) { + NS_WARNING("Failed to get loader or load group for image load"); + return; + } + + loader->LoadImage(uri, nullptr, nullptr, nullptr, loadGroup, this, + nullptr, nsIRequest::LOAD_NORMAL, nullptr, + nullptr, getter_AddRefs(mImageRequest)); + } + + if (!mIconLoaded) { + if (!mImageRequest) { + NS_WARNING("Failed to load icon"); + return; + } + + mImageRequest->RequestDecode(); + } +} + +void +nsMenuObjectIconLoader::Destroy() +{ + if (mImageRequest) { + mImageRequest->CancelAndForgetObserver(NS_BINDING_ABORTED); + mImageRequest = nullptr; + } + + mOwner = nullptr; +} + +static int +CalculateTextWidth(const nsAString& aText) +{ + if (!gPangoLayout) { + PangoFontMap *fontmap = pango_cairo_font_map_get_default(); + PangoContext *ctx = pango_font_map_create_context(fontmap); + gPangoLayout = pango_layout_new(ctx); + g_object_unref(ctx); + } + + pango_layout_set_text(gPangoLayout, NS_ConvertUTF16toUTF8(aText).get(), -1); + + int width, dummy; + pango_layout_get_size(gPangoLayout, &width, &dummy); + + return width; +} + +static const nsDependentString +GetEllipsis() +{ + static PRUnichar sBuf[4] = { 0, 0, 0, 0 }; + if (!sBuf[0]) { + nsAdoptingString ellipsis = Preferences::GetLocalizedString("intl.ellipsis"); + if (!ellipsis.IsEmpty()) { + uint32_t l = ellipsis.Length(); + const nsAdoptingString::char_type *c = ellipsis.BeginReading(); + uint32_t i = 0; + while (i < 3 && i < l) { + sBuf[i++] = *(c++); + } + } else { + sBuf[0] = '.'; + sBuf[1] = '.'; + sBuf[2] = '.'; + } + } + + return nsDependentString(sBuf); +} + +static int +GetEllipsisWidth() +{ + static int sEllipsisWidth = -1; + + if (sEllipsisWidth == -1) { + sEllipsisWidth = CalculateTextWidth(GetEllipsis()); + } + + return sEllipsisWidth; +} + +void +nsMenuObject::InitializeNativeData() +{ +} + +nsMenuObject::PropertyFlags +nsMenuObject::SupportedProperties() const +{ + return static_cast(0); +} + +bool +nsMenuObject::IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const +{ + return true; +} + +void +nsMenuObject::UpdateContentAttributes() +{ +} + +void +nsMenuObject::Update(nsStyleContext *aStyleContext) +{ +} + +bool +nsMenuObject::ShouldShowIcon() const +{ + static bool known = false; + static bool showImagesInMenus = false; + + // Ideally we want to know the visibility of the anonymous XUL image in + // our menuitem, but this isn't created because we don't have a frame. + // The following works by default (because xul.css hides images in menuitems + // that don't have the "menuitem-with-favicon" class, when eIntID_ImagesInMenus + // is false). It's possible a third party theme could override this, but, + // oh well... + if (!known) { + showImagesInMenus = + LookAndFeel::GetInt(LookAndFeel::eIntID_ImagesInMenus); + known = true; + } + + if (showImagesInMenus) { + return true; + } + + const nsAttrValue *classes = mContent->GetClasses(); + if (!classes) { + return false; + } + + for (uint32_t i = 0; i < classes->GetAtomCount(); ++i) { + if (classes->AtomAt(i) == nsNativeMenuAtoms::menuitem_with_favicon) { + return true; + } + } + + return false; +} + +void +nsMenuObject::ClearIcon() +{ + dbusmenu_menuitem_property_remove(mNativeData, + DBUSMENU_MENUITEM_PROP_ICON_DATA); +} + +void +nsMenuObject::UpdateLabel() +{ + // Gecko stores the label and access key in separate attributes + // so we need to convert label="Foo_Bar"/accesskey="F" in to + // label="_Foo__Bar" for dbusmenu + + nsAutoString label; + mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, label); + + nsAutoString accesskey; + mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey, accesskey); + + const nsAutoString::char_type *akey = accesskey.BeginReading(); + PRUnichar keyLower = ToLowerCase(*akey); + PRUnichar keyUpper = ToUpperCase(*akey); + + const nsAutoString::char_type *iter = label.BeginReading(); + const nsAutoString::char_type *end = label.EndReading(); + uint32_t length = label.Length(); + uint32_t pos = 0; + bool foundAccessKey = false; + + while (iter != end) { + if (*iter != PRUnichar('_')) { + if ((*iter != keyLower && *iter != keyUpper) || foundAccessKey) { + ++iter; + ++pos; + continue; + } + foundAccessKey = true; + } + + label.SetLength(++length); + + iter = label.BeginReading() + pos; + end = label.EndReading(); + nsAutoString::char_type *cur = label.BeginWriting() + pos; + + memmove(cur + 1, cur, (length - 1 - pos) * sizeof(nsAutoString::char_type)); + *cur = nsAutoString::char_type('_'); + + iter += 2; + pos += 2; + } + + if (CalculateTextWidth(label) <= MAX_WIDTH) { + dbusmenu_menuitem_property_set(mNativeData, + DBUSMENU_MENUITEM_PROP_LABEL, + NS_ConvertUTF16toUTF8(label).get()); + return; + } + + // This *COMPLETELY SUCKS* + // This should be done at the point where the menu is drawn (hello Unity), + // but unfortunately it doesn't do that and will happily fill your entire + // screen width with a menu if you have a bookmark with a really long title. + // This leaves us with no other option but to ellipsize here, with no proper + // knowledge of Unity's render path, font size etc. This is better than nothing + // BAH! @*&!$ + nsAutoString truncated; + int target = MAX_WIDTH - GetEllipsisWidth(); + length = label.Length(); + + static nsIContent::AttrValuesArray strings[] = { + &nsGkAtoms::left, &nsGkAtoms::start, + &nsGkAtoms::center, &nsGkAtoms::right, + &nsGkAtoms::end, nullptr + }; + + int32_t type = mContent->FindAttrValueIn(kNameSpaceID_None, + nsGkAtoms::crop, + strings, eCaseMatters); + + switch (type) { + case 0: + case 1: + // FIXME: Implement left cropping (do we really care?) + case 2: + // FIXME: Implement center cropping (do we really care?) + case 3: + case 4: + default: + for (uint32_t i = 0; i < length; i++) { + truncated.Append(label.CharAt(i)); + if (CalculateTextWidth(truncated) > target) { + break; + } + } + + truncated.Append(GetEllipsis()); + } + + dbusmenu_menuitem_property_set(mNativeData, + DBUSMENU_MENUITEM_PROP_LABEL, + NS_ConvertUTF16toUTF8(truncated).get()); +} + +void +nsMenuObject::UpdateVisibility(nsStyleContext *aStyleContext) +{ + bool vis = true; + + if (aStyleContext && + (aStyleContext->StyleDisplay()->mDisplay == NS_STYLE_DISPLAY_NONE || + aStyleContext->StyleVisibility()->mVisible == + NS_STYLE_VISIBILITY_COLLAPSE)) { + vis = false; + } + + dbusmenu_menuitem_property_set_bool(mNativeData, + DBUSMENU_MENUITEM_PROP_VISIBLE, + vis); +} + +void +nsMenuObject::UpdateSensitivity() +{ + bool disabled = mContent->AttrValueIs(kNameSpaceID_None, + nsGkAtoms::disabled, + nsGkAtoms::_true, eCaseMatters); + + dbusmenu_menuitem_property_set_bool(mNativeData, + DBUSMENU_MENUITEM_PROP_ENABLED, + !disabled); + +} + +void +nsMenuObject::UpdateIcon(nsStyleContext *aStyleContext) +{ + if (ShouldShowIcon()) { + if (!mIconLoader) { + mIconLoader = new nsMenuObjectIconLoader(this); + } + + mIconLoader->LoadIcon(aStyleContext); + } else { + if (mIconLoader) { + mIconLoader->Destroy(); + mIconLoader = nullptr; + } + + ClearIcon(); + } +} + +already_AddRefed +nsMenuObject::GetStyleContext() +{ + nsIPresShell *shell = mContent->OwnerDoc()->GetShell(); + if (!shell) { + return nullptr; + } + + nsRefPtr sc = + nsComputedDOMStyle::GetStyleContextForElementNoFlush( + mContent->AsElement(), nullptr, shell); + + return sc.forget(); +} + +nsresult +nsMenuObject::Init(nsMenuContainer *aParent, nsIContent *aContent) +{ + NS_ENSURE_ARG(aParent); + NS_ENSURE_ARG(aContent); + + mParent = aParent; + mContent = aContent; + mListener = aParent->DocListener(); + NS_ENSURE_ARG(mListener); + + return NS_OK; +} + +nsresult +nsMenuObject::Init(nsNativeMenuDocListener *aListener, nsIContent *aContent) +{ + NS_ENSURE_ARG(aListener); + NS_ENSURE_ARG(aContent); + + mParent = nullptr; + mContent = aContent; + mListener = aListener; + + return NS_OK; +} + +nsMenuObject::nsMenuObject() : + mParent(nullptr), mNativeData(nullptr), mFlags(0) +{ +} + +nsMenuObject::~nsMenuObject() +{ + nsWeakMenuObjectBase::NotifyDestroyed(this); + + if (mIconLoader) { + mIconLoader->Destroy(); + } + + if (mListener) { + mListener->UnregisterForContentChanges(mContent); + } + + if (mNativeData) { + g_object_unref(mNativeData); + mNativeData = nullptr; + } +} + +void +nsMenuObject::CreateNativeData() +{ + NS_ASSERTION(mNativeData == nullptr, "This node already has a DbusmenuMenuitem. The old one will be leaked"); + + mNativeData = dbusmenu_menuitem_new(); + InitializeNativeData(); + if (mParent && mParent->IsBeingDisplayed()) { + ContainerIsOpening(); + } + + mListener->RegisterForContentChanges(mContent, this); +} + +nsresult +nsMenuObject::AdoptNativeData(DbusmenuMenuitem *aNativeData) +{ + NS_ASSERTION(mNativeData == nullptr, "This node already has a DbusmenuMenuitem. The old one will be leaked"); + + if (!IsCompatibleWithNativeData(aNativeData)) { + return NS_ERROR_FAILURE; + } + + mNativeData = aNativeData; + g_object_ref(mNativeData); + + PropertyFlags supported = SupportedProperties(); + PropertyFlags mask = static_cast(1); + + for (uint32_t i = 0; gPropertyStrings[i]; ++i) { + if (!(mask & supported)) { + dbusmenu_menuitem_property_remove(mNativeData, gPropertyStrings[i]); + } + mask = static_cast(mask << 1); + } + + InitializeNativeData(); + if (mParent && mParent->IsBeingDisplayed()) { + ContainerIsOpening(); + } + + mListener->RegisterForContentChanges(mContent, this); + + return NS_OK; +} + +void +nsMenuObject::ContainerIsOpening() +{ + if (!nsContentUtils::IsSafeToRunScript()) { + nsContentUtils::AddScriptRunner( + new nsMenuObjectContainerOpeningRunnable(this)); + return; + } + + UpdateContentAttributes(); + + nsRefPtr sc = GetStyleContext(); + Update(sc); +} + +/* static */ void +nsWeakMenuObjectBase::AddWeakReference(nsWeakMenuObjectBase *aWeak) +{ + aWeak->SetPrevious(sHead); + sHead = aWeak; +} + +/* static */ void +nsWeakMenuObjectBase::RemoveWeakReference(nsWeakMenuObjectBase *aWeak) +{ + if (aWeak == sHead) { + sHead = aWeak->GetPrevious(); + return; + } + + nsWeakMenuObjectBase *weak = sHead; + while (weak && weak->GetPrevious() != aWeak) { + weak = weak->GetPrevious(); + } + + if (weak) { + weak->SetPrevious(aWeak->GetPrevious()); + } +} + +/* static */ void +nsWeakMenuObjectBase::NotifyDestroyed(nsMenuObject *aMenuObject) +{ + nsWeakMenuObjectBase *weak = sHead; + while (weak) { + if (weak->getBase() == aMenuObject) { + weak->Clear(); + } + + weak = weak->GetPrevious(); + } +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuObject.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuObject.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,242 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsMenuObject_h__ +#define __nsMenuObject_h__ + +#include "mozilla/Attributes.h" +#include "nsCOMPtr.h" + +#include "nsDbusmenu.h" +#include "nsNativeMenuDocListener.h" + +class nsIAtom; +class nsIContent; +class nsStyleContext; +class nsMenuContainer; +class nsMenuObjectIconLoader; + +#define DBUSMENU_PROPERTIES \ + DBUSMENU_PROPERTY(Label, DBUSMENU_MENUITEM_PROP_LABEL, 0) \ + DBUSMENU_PROPERTY(Enabled, DBUSMENU_MENUITEM_PROP_ENABLED, 1) \ + DBUSMENU_PROPERTY(Visible, DBUSMENU_MENUITEM_PROP_VISIBLE, 2) \ + DBUSMENU_PROPERTY(IconData, DBUSMENU_MENUITEM_PROP_ICON_DATA, 3) \ + DBUSMENU_PROPERTY(Type, DBUSMENU_MENUITEM_PROP_TYPE, 4) \ + DBUSMENU_PROPERTY(Shortcut, DBUSMENU_MENUITEM_PROP_SHORTCUT, 5) \ + DBUSMENU_PROPERTY(ToggleType, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, 6) \ + DBUSMENU_PROPERTY(ToggleState, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, 7) \ + DBUSMENU_PROPERTY(ChildDisplay, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY, 8) + +/* + * This is the base class for all menu nodes. Each instance represents + * a single node in the menu hierarchy. It wraps the corresponding DOM node and + * native menu node, keeps them in sync and transfers events between the two. + * It is not reference counted - each node is owned by its parent (the top + * level menubar is owned by the window) and keeps a weak pointer to its + * parent (which is guaranteed to always be valid because a node will never + * outlive its parent). It is not safe to keep a reference to nsMenuObject + * externally. + */ +class nsMenuObject : public nsNativeMenuChangeObserver +{ +public: + enum EType { + eType_MenuBar, + eType_Menu, + eType_MenuItem, + eType_MenuSeparator + }; + + enum PropertyFlags { +#define DBUSMENU_PROPERTY(e, s, b) eProp##e = (1 << b), + DBUSMENU_PROPERTIES +#undef DBUSMENU_PROPERTY + }; + + virtual ~nsMenuObject(); + + // Get the native menu item node + DbusmenuMenuitem* GetNativeData() const { return mNativeData; } + + // Get the parent menu object + nsMenuContainer* Parent() const { return mParent; } + + // Get the content node + nsIContent* ContentNode() const { return mContent; } + + // Get the type of this node. Must be provided by subclasses + virtual EType Type() const = 0; + + // Get the document listener + nsNativeMenuDocListener* DocListener() const { return mListener; } + + // Create the native menu item node (called by containers) + void CreateNativeData(); + + // Adopt the specified native menu item node (called by containers) + nsresult AdoptNativeData(DbusmenuMenuitem *aNativeData); + + // Called by the container to tell us that it's opening + void ContainerIsOpening(); + +protected: + nsMenuObject(); + nsresult Init(nsMenuContainer *aParent, nsIContent *aContent); + nsresult Init(nsNativeMenuDocListener *aListener, nsIContent *aContent); + + void UpdateLabel(); + void UpdateVisibility(nsStyleContext *aStyleContext); + void UpdateSensitivity(); + void UpdateIcon(nsStyleContext *aStyleContext); + + already_AddRefed GetStyleContext(); + + uint8_t GetFlags() const { return mFlags; } + bool HasFlags(uint8_t aFlags) const + { + return (mFlags & aFlags) == aFlags; + } + void SetFlags(uint8_t aFlags) + { + mFlags |= aFlags; + } + void ClearFlags(uint8_t aFlags) + { + mFlags &= ~aFlags; + } + +private: + friend class nsMenuObjectIconLoader; + + // Set up initial properties on the native data, connect to signals etc. + // This should be implemented by subclasses + virtual void InitializeNativeData(); + + // Return the properties that this menu object type supports + // This should be implemented by subclasses + virtual PropertyFlags SupportedProperties() const; + + // Determine whether this menu object could use the specified + // native item. Returns true by default but can be overridden by subclasses + virtual bool + IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const; + + // Update attributes on this objects content node when the container opens. + // This is called before style resolution, and should be implemented by + // subclasses who want to modify attributes that might affect style. + // This will not be called when there are script blockers + virtual void UpdateContentAttributes(); + + // Update properties that should be refreshed when the container opens. + // This should be implemented by subclasses that have properties which + // need refreshing + virtual void Update(nsStyleContext *aStyleContext); + + bool ShouldShowIcon() const; + void ClearIcon(); + + nsCOMPtr mContent; + // mListener is a strong ref for simplicity - someone in the tree needs to + // own it, and this only really needs to be the top-level object (as no + // children outlives their parent). However, we need to keep it alive until + // after running the nsMenuObject destructor for the top-level menu object, + // hence the strong ref + nsRefPtr mListener; + nsMenuContainer *mParent; // [weak] + DbusmenuMenuitem *mNativeData; // [strong] + nsRefPtr mIconLoader; + uint8_t mFlags; +}; + +class nsWeakMenuObjectBase +{ +public: + ~nsWeakMenuObjectBase() + { + RemoveWeakReference(this); + } + + nsMenuObject* getBase() const { return mMenuObject; } + + static void NotifyDestroyed(nsMenuObject *aMenuObject); + +protected: + nsWeakMenuObjectBase() : mMenuObject(nullptr) { }; + + void SetMenuObject(nsMenuObject *aMenuObject) + { + mMenuObject = aMenuObject; + + mMenuObject ? AddWeakReference(this) : RemoveWeakReference(this); + } + +private: + nsWeakMenuObjectBase* GetPrevious() const { return mPrev; } + void SetPrevious(nsWeakMenuObjectBase *aPrev) + { + mPrev = aPrev; + } + void Clear() { mMenuObject = nullptr; } + + static void AddWeakReference(nsWeakMenuObjectBase *aWeak); + static void RemoveWeakReference(nsWeakMenuObjectBase *aWeak); + + nsWeakMenuObjectBase *mPrev; + static nsWeakMenuObjectBase *sHead; + + nsMenuObject *mMenuObject; +}; + +// Keep a weak pointer to a menu object. Note, if you need to work +// with a pointer to this class, use nsAutoWeakMenuObject instead +template +class nsWeakMenuObject : public nsWeakMenuObjectBase +{ +public: + nsWeakMenuObject() : + nsWeakMenuObjectBase() { }; + + nsWeakMenuObject(T *aMenuObject) : + nsWeakMenuObjectBase() + { + SetMenuObject(aMenuObject); + } + + T* get() const { return static_cast(getBase()); } + + T* operator->() const { return get(); } + + operator T*() const { return get(); } +}; + +template +class nsAutoWeakMenuObject +{ +public: + nsAutoWeakMenuObject() { }; + + nsAutoWeakMenuObject(T *aMenuObject) : + mPtr(new nsWeakMenuObject(aMenuObject)) { }; + + nsAutoWeakMenuObject(nsWeakMenuObject *aWeak) : + mPtr(aWeak) { }; + + T* get() const { return static_cast(*mPtr); } + + T* operator->() const { return get(); } + + operator T*() const { return get(); } + + nsWeakMenuObject* getWeakPtr() const { return mPtr; } + + nsWeakMenuObject* forget() { return mPtr.forget(); } + +private: + nsAutoPtr > mPtr; +}; + +#endif /* __nsMenuObject_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuSeparator.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuSeparator.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "nsAutoPtr.h" +#include "nsCRT.h" +#include "nsGkAtoms.h" +#include "nsStyleContext.h" + +#include "nsDbusmenu.h" + +#include "nsMenuContainer.h" +#include "nsMenuSeparator.h" + +void +nsMenuSeparator::InitializeNativeData() +{ + dbusmenu_menuitem_property_set(GetNativeData(), + DBUSMENU_MENUITEM_PROP_TYPE, + "separator"); +} + +void +nsMenuSeparator::Update(nsStyleContext *aContext) +{ + UpdateVisibility(aContext); +} + +bool +nsMenuSeparator::IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const +{ + return nsCRT::strcmp(dbusmenu_menuitem_property_get(aNativeData, + DBUSMENU_MENUITEM_PROP_TYPE), + "separator") == 0; +} + +nsMenuObject::PropertyFlags +nsMenuSeparator::SupportedProperties() const +{ + return static_cast( + nsMenuObject::ePropVisible | + nsMenuObject::ePropType + ); +} + +nsMenuSeparator::nsMenuSeparator() +{ + MOZ_COUNT_CTOR(nsMenuSeparator); +} + +nsMenuSeparator::~nsMenuSeparator() +{ + MOZ_COUNT_DTOR(nsMenuSeparator); +} + +nsMenuObject::EType +nsMenuSeparator::Type() const +{ + return nsMenuObject::eType_MenuSeparator; +} + +/* static */ nsMenuObject* +nsMenuSeparator::Create(nsMenuContainer *aParent, nsIContent *aContent) +{ + nsAutoPtr sep(new nsMenuSeparator()); + if (NS_FAILED(sep->Init(aParent, aContent))) { + return nullptr; + } + + return sep.forget(); +} + +void +nsMenuSeparator::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) +{ + NS_ASSERTION(aContent == ContentNode(), "Received an event that wasn't meant for us!"); + + if (!Parent()->IsBeingDisplayed()) { + return; + } + + if (aAttribute == nsGkAtoms::hidden || + aAttribute == nsGkAtoms::collapsed) { + nsRefPtr sc = GetStyleContext(); + UpdateVisibility(sc); + } +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuSeparator.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsMenuSeparator.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsMenuSeparator_h__ +#define __nsMenuSeparator_h__ + +#include "mozilla/Attributes.h" + +#include "nsMenuObject.h" + +class nsIContent; +class nsIAtom; +class nsMenuContainer; + +// Menu separator class +class nsMenuSeparator MOZ_FINAL : public nsMenuObject +{ +public: + ~nsMenuSeparator(); + + nsMenuObject::EType Type() const; + + static nsMenuObject* Create(nsMenuContainer *aParent, + nsIContent *aContent); + + void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute); + +private: + nsMenuSeparator(); + + void InitializeNativeData(); + void Update(nsStyleContext *aStyleContext); + bool IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const; + nsMenuObject::PropertyFlags SupportedProperties() const; +}; + +#endif /* __nsMenuSeparator_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuAtomList.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuAtomList.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +WIDGET_ATOM2(menuitem_with_favicon, "menuitem-with-favicon") +WIDGET_ATOM2(_moz_menupopupstate, "_moz-menupopupstate") +WIDGET_ATOM(openedwithkey) +WIDGET_ATOM(shellshowingmenubar) Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuAtoms.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuAtoms.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "nsIAtom.h" +#include "nsStaticAtom.h" + +#include "nsNativeMenuAtoms.h" + +using namespace mozilla; + +#define WIDGET_ATOM(_name) nsIAtom* nsNativeMenuAtoms::_name; +#define WIDGET_ATOM2(_name, _value) nsIAtom* nsNativeMenuAtoms::_name; +#include "nsNativeMenuAtomList.h" +#undef WIDGET_ATOM +#undef WIDGET_ATOM2 + +#define WIDGET_ATOM(name_) NS_STATIC_ATOM_BUFFER(name_##_buffer, #name_) +#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_) +#include "nsNativeMenuAtomList.h" +#undef WIDGET_ATOM +#undef WIDGET_ATOM2 + +static const nsStaticAtom gAtoms[] = { +#define WIDGET_ATOM(name_) NS_STATIC_ATOM(name_##_buffer, &nsNativeMenuAtoms::name_), +#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsNativeMenuAtoms::name_), +#include "nsNativeMenuAtomList.h" +#undef WIDGET_ATOM +#undef WIDGET_ATOM2 +}; + +/* static */ void +nsNativeMenuAtoms::Init() +{ + NS_RegisterStaticAtoms(gAtoms); +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuAtoms.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuAtoms.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,25 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsNativeMenuAtoms_h__ +#define __nsNativeMenuAtoms_h__ + +class nsIAtom; + +class nsNativeMenuAtoms +{ +public: + static void Init(); + +#define WIDGET_ATOM(_name) static nsIAtom* _name; +#define WIDGET_ATOM2(_name, _value) static nsIAtom* _name; +#include "nsNativeMenuAtomList.h" +#undef WIDGET_ATOM +#undef WIDGET_ATOM2 +}; + +#endif /* __nsNativeMenuAtoms_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuDocListener.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuDocListener.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,369 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "mozilla/Assertions.h" +#include "mozilla/DebugOnly.h" +#include "mozilla/dom/Element.h" +#include "nsContentUtils.h" +#include "nsIAtom.h" +#include "nsIContent.h" +#include "nsIDocument.h" + +#include "nsMenuContainer.h" + +#include "nsNativeMenuDocListener.h" + +using namespace mozilla; + +uint32_t nsNativeMenuDocListener::sUpdateDepth = 0; + +nsNativeMenuDocListenerTArray *gPendingListeners; + +/* + * Small helper which caches a single listener, so that consecutive + * events which go to the same node avoid multiple hash table lookups + */ +class MOZ_STACK_CLASS DispatchHelper +{ +public: + DispatchHelper(nsNativeMenuDocListener *aListener, + nsIContent *aContent + MOZ_GUARD_OBJECT_NOTIFIER_PARAM) : + mObserver(nullptr) + { + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + if (aContent == aListener->mLastSource) { + mObserver = aListener->mLastTarget; + } else { + mObserver = aListener->mContentToObserverTable.Get(aContent); + if (mObserver) { + aListener->mLastSource = aContent; + aListener->mLastTarget = mObserver; + } + } + } + + ~DispatchHelper() { }; + + nsNativeMenuChangeObserver* Observer() const { return mObserver; } + + bool HasObserver() const { return !!mObserver; } + +private: + nsNativeMenuChangeObserver *mObserver; + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +}; + +NS_IMPL_ISUPPORTS1(nsNativeMenuDocListener, nsIMutationObserver) + +void +nsNativeMenuDocListener::DoAttributeChanged(nsIContent *aContent, + nsIAtom *aAttribute) +{ + DispatchHelper h(this, aContent); + if (h.HasObserver()) { + h.Observer()->OnAttributeChanged(aContent, aAttribute); + } +} + +void +nsNativeMenuDocListener::DoContentInserted(nsIContent *aContainer, + nsIContent *aChild, + nsIContent *aPrevSibling) +{ + DispatchHelper h(this, aContainer); + if (h.HasObserver()) { + h.Observer()->OnContentInserted(aContainer, aChild, aPrevSibling); + } +} + +void +nsNativeMenuDocListener::DoContentRemoved(nsIContent *aContainer, + nsIContent *aChild) +{ + DispatchHelper h(this, aContainer); + if (h.HasObserver()) { + h.Observer()->OnContentRemoved(aContainer, aChild); + } +} + +void +nsNativeMenuDocListener::DoBeginUpdateBatch(nsIContent *aTarget) +{ + DispatchHelper h(this, aTarget); + if (h.HasObserver()) { + h.Observer()->BeginUpdateBatch(aTarget); + } +} + +void +nsNativeMenuDocListener::DoEndUpdateBatch(nsIContent *aTarget) +{ + DispatchHelper h(this, aTarget); + if (h.HasObserver()) { + h.Observer()->EndUpdateBatch(); + } +} + +void +nsNativeMenuDocListener::FlushPendingMutations() +{ + nsIContent *batchTarget = nullptr; + bool inUpdateBatch = false; + + while (mPendingMutations.Length() > 0) { + MutationRecord *m = mPendingMutations[0]; + + if (m->mTarget != batchTarget) { + if (inUpdateBatch) { + DoEndUpdateBatch(batchTarget); + inUpdateBatch = false; + } + + batchTarget = m->mTarget; + + if (mPendingMutations.Length() > 1 && + mPendingMutations[1]->mTarget == batchTarget) { + DoBeginUpdateBatch(batchTarget); + inUpdateBatch = true; + } + } + + switch (m->mType) { + case MutationRecord::eAttributeChanged: + DoAttributeChanged(m->mTarget, m->mAttribute); + break; + case MutationRecord::eContentInserted: + DoContentInserted(m->mTarget, m->mChild, m->mPrevSibling); + break; + case MutationRecord::eContentRemoved: + DoContentRemoved(m->mTarget, m->mChild); + break; + default: + NS_NOTREACHED("Invalid type"); + } + + mPendingMutations.RemoveElementAt(0); + } + + if (inUpdateBatch) { + DoEndUpdateBatch(batchTarget); + } +} + +/* static */ void +nsNativeMenuDocListener::ScheduleFlush(nsNativeMenuDocListener *aListener) +{ + NS_ASSERTION(sUpdateDepth > 0, "Shouldn't be doing this now"); + + if (!gPendingListeners) { + gPendingListeners = new nsNativeMenuDocListenerTArray; + } + + if (gPendingListeners->IndexOf(aListener) == + nsNativeMenuDocListenerTArray::NoIndex) { + gPendingListeners->AppendElement(aListener); + } +} + +/* static */ void +nsNativeMenuDocListener::CancelFlush(nsNativeMenuDocListener *aListener) +{ + if (!gPendingListeners) { + return; + } + + gPendingListeners->RemoveElement(aListener); +} + +/* static */ void +nsNativeMenuDocListener::EndUpdates() +{ + if (sUpdateDepth == 1 && gPendingListeners) { + while (gPendingListeners->Length() > 0) { + (*gPendingListeners)[0]->FlushPendingMutations(); + gPendingListeners->RemoveElementAt(0); + } + } + + NS_ASSERTION(sUpdateDepth > 0, "Negative update depth!"); + sUpdateDepth--; +} + +nsNativeMenuDocListener::nsNativeMenuDocListener() : + mDocument(nullptr), + mLastSource(nullptr), + mLastTarget(nullptr) +{ + MOZ_COUNT_CTOR(nsNativeMenuDocListener); +} + +nsNativeMenuDocListener::~nsNativeMenuDocListener() +{ + MOZ_ASSERT(mContentToObserverTable.Count() == 0, + "Some nodes forgot to unregister listeners. This is bad! (and we're lucky we made it this far)"); + MOZ_COUNT_DTOR(nsNativeMenuDocListener); +} + +nsresult +nsNativeMenuDocListener::Init(nsIContent *aRootNode) +{ + NS_ENSURE_ARG(aRootNode); + + mRootNode = aRootNode; + + return NS_OK; +} + +void +nsNativeMenuDocListener::AttributeChanged(nsIDocument *aDocument, + mozilla::dom::Element *aElement, + int32_t aNameSpaceID, + nsIAtom *aAttribute, + int32_t aModType) +{ + if (sUpdateDepth == 0) { + DoAttributeChanged(aElement, aAttribute); + return; + } + + MutationRecord *m = *mPendingMutations.AppendElement(new MutationRecord); + m->mType = MutationRecord::eAttributeChanged; + m->mTarget = aElement; + m->mAttribute = aAttribute; + + ScheduleFlush(this); +} + +void +nsNativeMenuDocListener::ContentAppended(nsIDocument *aDocument, + nsIContent *aContainer, + nsIContent *aFirstNewContent, + int32_t aNewIndexInContainer) +{ + for (nsIContent *c = aFirstNewContent; c; c = c->GetNextSibling()) { + ContentInserted(aDocument, aContainer, c, 0); + } +} + +void +nsNativeMenuDocListener::ContentInserted(nsIDocument *aDocument, + nsIContent *aContainer, + nsIContent *aChild, + int32_t aIndexInContainer) +{ + nsIContent *prevSibling = nsMenuContainer::GetPreviousSupportedSibling(aChild); + + if (sUpdateDepth == 0) { + DoContentInserted(aContainer, aChild, prevSibling); + return; + } + + MutationRecord *m = *mPendingMutations.AppendElement(new MutationRecord); + m->mType = MutationRecord::eContentInserted; + m->mTarget = aContainer; + m->mChild = aChild; + m->mPrevSibling = prevSibling; + + ScheduleFlush(this); +} + +void +nsNativeMenuDocListener::ContentRemoved(nsIDocument *aDocument, + nsIContent *aContainer, + nsIContent *aChild, + int32_t aIndexInContainer, + nsIContent *aPreviousSibling) +{ + if (sUpdateDepth == 0) { + DoContentRemoved(aContainer, aChild); + return; + } + + MutationRecord *m = *mPendingMutations.AppendElement(new MutationRecord); + m->mType = MutationRecord::eContentRemoved; + m->mTarget = aContainer; + m->mChild = aChild; + + ScheduleFlush(this); +} + +void +nsNativeMenuDocListener::NodeWillBeDestroyed(const nsINode *aNode) +{ + mDocument = nullptr; +} + +/* static */ already_AddRefed +nsNativeMenuDocListener::Create(nsIContent *aRootNode) +{ + nsRefPtr listener = new nsNativeMenuDocListener(); + if (NS_FAILED(listener->Init(aRootNode))) { + return nullptr; + } + + return listener.forget(); +} + +void +nsNativeMenuDocListener::RegisterForContentChanges(nsIContent *aContent, + nsNativeMenuChangeObserver *aObserver) +{ + NS_ASSERTION(aContent, "Need content parameter"); + NS_ASSERTION(aObserver, "Need observer parameter"); + if (!aContent || !aObserver) { + return; + } + + DebugOnly old; + NS_ASSERTION(!mContentToObserverTable.Get(aContent, &old) || old == aObserver, + "Multiple observers for the same content node are not supported"); + + mContentToObserverTable.Put(aContent, aObserver); +} + +void +nsNativeMenuDocListener::UnregisterForContentChanges(nsIContent *aContent) +{ + NS_ASSERTION(aContent, "Need content parameter"); + if (!aContent) { + return; + } + + mContentToObserverTable.Remove(aContent); + if (aContent == mLastSource) { + mLastSource = nullptr; + mLastTarget = nullptr; + } +} + +void +nsNativeMenuDocListener::Start() +{ + if (mDocument) { + return; + } + + mDocument = mRootNode->OwnerDoc(); + if (!mDocument) { + return; + } + + mDocument->AddMutationObserver(this); +} + +void +nsNativeMenuDocListener::Stop() +{ + if (mDocument) { + mDocument->RemoveMutationObserver(this); + mDocument = nullptr; + } + + CancelFlush(this); + mPendingMutations.Clear(); +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuDocListener.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuDocListener.h 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,152 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsNativeMenuDocListener_h__ +#define __nsNativeMenuDocListener_h__ + +#include "mozilla/Attributes.h" +#include "mozilla/GuardObjects.h" +#include "nsAutoPtr.h" +#include "nsDataHashtable.h" +#include "nsStubMutationObserver.h" +#include "nsTArray.h" + +class nsIAtom; +class nsIContent; +class nsIDocument; +class nsNativeMenuChangeObserver; + +/* + * This class keeps a mapping of content nodes to observers and forwards DOM + * mutations to these. There is exactly one of these for every menubar. + */ +class nsNativeMenuDocListener MOZ_FINAL : nsStubMutationObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED + NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED + NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED + NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED + NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED + + static already_AddRefed Create(nsIContent *aRootNode); + + // Register an observer to receive mutation events for the specified + // content node. The caller must keep the observer alive until + // UnregisterForContentChanges is called. + void RegisterForContentChanges(nsIContent *aContent, + nsNativeMenuChangeObserver *aObserver); + + // Unregister the registered observer for the specified content node + void UnregisterForContentChanges(nsIContent *aContent); + + // Start listening to the document and forwarding DOM mutations to + // registered observers. + void Start(); + + // Stop listening to the document. No DOM mutations will be forwarded + // to registered observers. + void Stop(); + +private: + friend class nsNativeMenuAutoUpdateBatch; + friend class DispatchHelper; + + struct MutationRecord { + enum RecordType { + eAttributeChanged, + eContentInserted, + eContentRemoved + } mType; + + nsCOMPtr mTarget; + nsCOMPtr mChild; + nsCOMPtr mPrevSibling; + nsCOMPtr mAttribute; + }; + + nsNativeMenuDocListener(); + ~nsNativeMenuDocListener(); + nsresult Init(nsIContent *aRootNode); + + void DoAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute); + void DoContentInserted(nsIContent *aContainer, + nsIContent *aChild, + nsIContent *aPrevSibling); + void DoContentRemoved(nsIContent *aContainer, nsIContent *aChild); + void DoBeginUpdateBatch(nsIContent *aTarget); + void DoEndUpdateBatch(nsIContent *aTarget); + void FlushPendingMutations(); + static void ScheduleFlush(nsNativeMenuDocListener *aListener); + static void CancelFlush(nsNativeMenuDocListener *aListener); + static void BeginUpdates() { ++sUpdateDepth; } + static void EndUpdates(); + + nsCOMPtr mRootNode; + nsIDocument *mDocument; + nsIContent *mLastSource; + nsNativeMenuChangeObserver *mLastTarget; + nsTArray > mPendingMutations; + nsDataHashtable, nsNativeMenuChangeObserver*> mContentToObserverTable; + + static uint32_t sUpdateDepth; +}; + +typedef nsTArray > nsNativeMenuDocListenerTArray; + +class nsNativeMenuChangeObserver +{ +public: + virtual void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) + { + NS_ERROR("Unhandled AttributeChanged() notification"); + } + + virtual void OnContentInserted(nsIContent *aContainer, + nsIContent *aChild, + nsIContent *aPrevSibling) + { + NS_ERROR("Unhandled ContentInserted() notification"); + } + + virtual void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) + { + NS_ERROR("Unhandled ContentRemoved() notification"); + } + + virtual void BeginUpdateBatch(nsIContent *aContent) { }; + + virtual void EndUpdateBatch() { }; +}; + +/* + * This class is intended to be used inside GObject signal handlers. + * It allows us to queue updates until we have finished delivering + * events to Gecko, and then we can batch updates to our view of the + * menu. This allows us to do menu updates without altering the structure + * seen by the OS. + */ +class MOZ_STACK_CLASS nsNativeMenuAutoUpdateBatch +{ +public: + nsNativeMenuAutoUpdateBatch(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) + { + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + nsNativeMenuDocListener::BeginUpdates(); + } + + ~nsNativeMenuAutoUpdateBatch() + { + nsNativeMenuDocListener::EndUpdates(); + } + +private: + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +}; + +#endif /* __nsNativeMenuDocListener_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuService.cpp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuService.cpp 2014-01-03 00:27:21.557660361 +0000 @@ -0,0 +1,507 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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 "mozilla/Preferences.h" +#include "mozilla/Services.h" +#include "nsAutoPtr.h" +#include "nsCOMPtr.h" +#include "nsCRT.h" +#include "nsGtkUtils.h" +#include "nsIContent.h" +#include "nsIObserverService.h" +#include "nsIWidget.h" +#include "nsServiceManagerUtils.h" +#include "nsWindow.h" +#include "nsXPCOM.h" +#include "prlink.h" + +#include "nsDbusmenu.h" +#include "nsMenuBar.h" +#include "nsNativeMenuAtoms.h" +#include "nsNativeMenuDocListener.h" + +#include +#include +#include + +#include "nsNativeMenuService.h" + +using namespace mozilla; + +nsNativeMenuService* nsNativeMenuService::sService = nullptr; +bool nsNativeMenuService::sShutdown = false; + +extern PangoLayout* gPangoLayout; +extern nsNativeMenuDocListenerTArray* gPendingListeners; + +static const nsTArray::index_type NoIndex = nsTArray::NoIndex; + +#if not GLIB_CHECK_VERSION(2,26,0) +enum GBusType { + G_BUS_TYPE_STARTER = -1, + G_BUS_TYPE_NONE = 0, + G_BUS_TYPE_SYSTEM = 1, + G_BUS_TYPE_SESSION = 2 +}; + +enum GDBusProxyFlags { + G_DBUS_PROXY_FLAGS_NONE = 0, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = 1 << 0, + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = 1 << 1, + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = 1 << 2, + G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES = 1 << 3 +}; + +enum GDBusCallFlags { + G_DBUS_CALL_FLAGS_NONE = 0, + G_DBUS_CALL_FLAGS_NO_AUTO_START = 1 << 0 +}; + +typedef _GDBusInterfaceInfo GDBusInterfaceInfo; +typedef _GDBusProxy GDBusProxy; +typedef _GVariant GVariant; +#endif + +#undef g_dbus_proxy_new_for_bus +#undef g_dbus_proxy_new_for_bus_finish +#undef g_dbus_proxy_call +#undef g_dbus_proxy_call_finish +#undef g_dbus_proxy_get_name_owner + +typedef void (*_g_dbus_proxy_new_for_bus_fn)(GBusType, GDBusProxyFlags, + GDBusInterfaceInfo*, + const gchar*, const gchar*, + const gchar*, GCancellable*, + GAsyncReadyCallback, gpointer); + +typedef GDBusProxy* (*_g_dbus_proxy_new_for_bus_finish_fn)(GAsyncResult*, + GError**); +typedef void (*_g_dbus_proxy_call_fn)(GDBusProxy*, const gchar*, GVariant*, + GDBusCallFlags, gint, GCancellable*, + GAsyncReadyCallback, gpointer); +typedef GVariant* (*_g_dbus_proxy_call_finish_fn)(GDBusProxy*, GAsyncResult*, + GError**); +typedef gchar* (*_g_dbus_proxy_get_name_owner_fn)(GDBusProxy*); + +static _g_dbus_proxy_new_for_bus_fn _g_dbus_proxy_new_for_bus; +static _g_dbus_proxy_new_for_bus_finish_fn _g_dbus_proxy_new_for_bus_finish; +static _g_dbus_proxy_call_fn _g_dbus_proxy_call; +static _g_dbus_proxy_call_finish_fn _g_dbus_proxy_call_finish; +static _g_dbus_proxy_get_name_owner_fn _g_dbus_proxy_get_name_owner; + +#define g_dbus_proxy_new_for_bus _g_dbus_proxy_new_for_bus +#define g_dbus_proxy_new_for_bus_finish _g_dbus_proxy_new_for_bus_finish +#define g_dbus_proxy_call _g_dbus_proxy_call +#define g_dbus_proxy_call_finish _g_dbus_proxy_call_finish +#define g_dbus_proxy_get_name_owner _g_dbus_proxy_get_name_owner + +static PRLibrary *gGIOLib = nullptr; + +static nsresult +GDBusInit() +{ + gGIOLib = PR_LoadLibrary("libgio-2.0.so.0"); + if (!gGIOLib) { + return NS_ERROR_FAILURE; + } + + g_dbus_proxy_new_for_bus = (_g_dbus_proxy_new_for_bus_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_new_for_bus"); + g_dbus_proxy_new_for_bus_finish = (_g_dbus_proxy_new_for_bus_finish_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_new_for_bus_finish"); + g_dbus_proxy_call = (_g_dbus_proxy_call_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_call"); + g_dbus_proxy_call_finish = (_g_dbus_proxy_call_finish_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_call_finish"); + g_dbus_proxy_get_name_owner = (_g_dbus_proxy_get_name_owner_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_get_name_owner"); + + if (!g_dbus_proxy_new_for_bus || + !g_dbus_proxy_new_for_bus_finish || + !g_dbus_proxy_call || + !g_dbus_proxy_call_finish || + !g_dbus_proxy_get_name_owner) { + return NS_ERROR_FAILURE; + } + + return NS_OK; +} + +NS_IMPL_ISUPPORTS2(nsNativeMenuService, nsINativeMenuService, nsIObserver) + +/* static */ void +nsNativeMenuService::EnsureInitialized() +{ + if (!sService) { + nsCOMPtr service = + do_GetService("@mozilla.org/widget/nativemenuservice;1"); + } + NS_ASSERTION(sService != nullptr || sShutdown == true, + "Failed to create native menu service"); +} + +void +nsNativeMenuService::SetOnline(bool aOnline) +{ + if (!Preferences::GetBool("ui.use_unity_menubar", true)) { + aOnline = false; + } + + mOnline = aOnline; + if (aOnline) { + for (uint32_t i = 0; i < mMenuBars.Length(); ++i) { + RegisterNativeMenuBar(mMenuBars[i]); + } + } else { + for (uint32_t i = 0; i < mMenuBars.Length(); ++i) { + mMenuBars[i]->Deactivate(); + } + } +} + +void +nsNativeMenuService::RegisterNativeMenuBar(nsMenuBar *aMenuBar) +{ + if (!mOnline) { + return; + } + + // This will effectively create the native menubar for + // exporting over the session bus, and hide the XUL menubar + aMenuBar->Activate(); + + if (!mDbusProxy || + !gtk_widget_get_mapped(aMenuBar->TopLevelWindow()) || + aMenuBar->RegisterRequestInProgress()) { + // Don't go further if we don't have a proxy for the shell menu + // service, the window isn't mapped or there is a request in progress. + return; + } + + uint32_t xid = aMenuBar->WindowId(); + nsAdoptingCString path = aMenuBar->ObjectPath(); + if (xid == 0 || path.IsEmpty()) { + NS_WARNING("Menubar has invalid XID or object path"); + return; + } + + // We keep a weak ref because we can't assume that GDBus cancellation + // is reliable (see https://launchpad.net/bugs/953562) + nsAutoWeakMenuObject weakMenuBar(aMenuBar); + + g_dbus_proxy_call(mDbusProxy, "RegisterWindow", + g_variant_new("(uo)", xid, path.get()), + G_DBUS_CALL_FLAGS_NONE, -1, + aMenuBar->BeginRegisterRequest(), + register_native_menubar_cb, weakMenuBar.forget()); +} + +/* static */ void +nsNativeMenuService::name_owner_changed_cb(GObject *gobject, + GParamSpec *pspec, + gpointer user_data) +{ + nsNativeMenuService::GetSingleton()->OnNameOwnerChanged(); +} + +/* static */ void +nsNativeMenuService::proxy_created_cb(GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = nullptr; + GDBusProxy *proxy = g_dbus_proxy_new_for_bus_finish(res, &error); + if (error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free(error); + return; + } + + if (error) { + g_error_free(error); + } + + // We need this check because we can't assume that GDBus cancellation + // is reliable (see https://launchpad.net/bugs/953562) + if (sShutdown) { + if (proxy) { + g_object_unref(proxy); + } + return; + } + + nsNativeMenuService::GetSingleton()->OnProxyCreated(proxy); +} + +/* static */ void +nsNativeMenuService::register_native_menubar_cb(GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + nsAutoWeakMenuObject weakMenuBar( + static_cast *>(user_data)); + + GError *error = nullptr; + GVariant *results = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), + res, &error); + if (results) { + // There's nothing useful in the response + g_variant_unref(results); + } + + bool success = error ? false : true; + if (error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free(error); + return; + } + + if (error) { + g_error_free(error); + } + + if (sShutdown || !weakMenuBar) { + return; + } + + nsNativeMenuService::GetSingleton()->OnNativeMenuBarRegistered(weakMenuBar, + success); +} + +/* static */ gboolean +nsNativeMenuService::map_event_cb(GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ + nsMenuBar *menubar = static_cast(user_data); + nsNativeMenuService::GetSingleton()->RegisterNativeMenuBar(menubar); + + return FALSE; +} + +void +nsNativeMenuService::OnNameOwnerChanged() +{ + char *owner = g_dbus_proxy_get_name_owner(mDbusProxy); + SetOnline(owner ? true : false); + g_free(owner); +} + +void +nsNativeMenuService::OnProxyCreated(GDBusProxy *aProxy) +{ + mDbusProxy = aProxy; + mCreateProxyRequest.Finish(); + + if (!mDbusProxy) { + SetOnline(false); + return; + } + + g_signal_connect(mDbusProxy, "notify::g-name-owner", + G_CALLBACK(name_owner_changed_cb), nullptr); + + OnNameOwnerChanged(); +} + +void +nsNativeMenuService::OnNativeMenuBarRegistered(nsMenuBar *aMenuBar, + bool aSuccess) +{ + aMenuBar->EndRegisterRequest(); + if (!aSuccess) { + aMenuBar->Deactivate(); + } +} + +/* static */ int +nsNativeMenuService::PrefChangedCallback(const char *aPref, + void *aClosure) +{ + nsNativeMenuService::GetSingleton()->PrefChanged(); + return 0; +} + +void +nsNativeMenuService::PrefChanged() +{ + if (!mDbusProxy) { + SetOnline(false); + return; + } + + OnNameOwnerChanged(); +} + +nsNativeMenuService::nsNativeMenuService() : + mDbusProxy(nullptr), mOnline(false) +{ +} + +nsNativeMenuService::~nsNativeMenuService() +{ + SetOnline(false); + + // Make sure we disconnect map-event handlers + while (mMenuBars.Length() > 0) { + NotifyNativeMenuBarDestroyed(mMenuBars[0]); + } + + Preferences::UnregisterCallback(PrefChangedCallback, + "ui.use_unity_menubar"); + + if (mDbusProxy) { + g_signal_handlers_disconnect_by_func(mDbusProxy, + FuncToGpointer(name_owner_changed_cb), + NULL); + g_object_unref(mDbusProxy); + } + + if (gPendingListeners) { + delete gPendingListeners; + gPendingListeners = nullptr; + } + if (gPangoLayout) { + g_object_unref(gPangoLayout); + gPangoLayout = nullptr; + } +} + +nsresult +nsNativeMenuService::Init() +{ + nsresult rv = nsDbusmenuFunctions::Init(); + if (NS_FAILED(rv)) { + return rv; + } + + rv = GDBusInit(); + if (NS_FAILED(rv)) { + return rv; + } + + Preferences::RegisterCallback(PrefChangedCallback, + "ui.use_unity_menubar"); + + mCreateProxyRequest.Start(); + + g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, + static_cast( + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START), + nullptr, + "com.canonical.AppMenu.Registrar", + "/com/canonical/AppMenu/Registrar", + "com.canonical.AppMenu.Registrar", + mCreateProxyRequest, proxy_created_cb, + nullptr); + + /* We don't technically know that the shell will draw the menubar until + * we know whether anybody owns the name of the menubar service on the + * session bus. However, discovering this happens asynchronously so + * we optimize for the common case here by assuming that the shell will + * draw window menubars if we are running inside Unity. This should + * mean that we avoid temporarily displaying the window menubar ourselves + */ + const char *desktop = getenv("XDG_CURRENT_DESKTOP"); + if (nsCRT::strcmp(desktop, "Unity") == 0) { + SetOnline(true); + } + + nsCOMPtr os = services::GetObserverService(); + if (os) { + os->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false); + } + + return NS_OK; +} + +/* static */ already_AddRefed +nsNativeMenuService::GetInstance() +{ + nsRefPtr service(sService); + + if (service) { + return service.forget(); + } + + NS_ASSERTION(sShutdown == false, + "Attempted to access menubar service too late"); + + if (sShutdown) { + return nullptr; + } + + sService = new nsNativeMenuService(); + NS_ADDREF(sService); + + if (NS_FAILED(sService->Init())) { + NS_RELEASE(sService); + sService = nullptr; + return nullptr; + } + + service = sService; + return service.forget(); +} + +/* static */ nsNativeMenuService* +nsNativeMenuService::GetSingleton() +{ + EnsureInitialized(); + return sService; +} + +NS_IMETHODIMP +nsNativeMenuService::Observe(nsISupports *aSubject, + const char *aTopic, + const PRUnichar *aData) +{ + if (!nsCRT::strcmp(NS_XPCOM_SHUTDOWN_OBSERVER_ID, aTopic)) { + sShutdown = true; + nsCOMPtr os = services::GetObserverService(); + if (os) { + os->RemoveObserver(sService, NS_XPCOM_SHUTDOWN_OBSERVER_ID); + } + NS_IF_RELEASE(sService); + } + + return NS_OK; +} + +void +nsNativeMenuService::NotifyNativeMenuBarDestroyed(nsMenuBar *aMenuBar) +{ + g_signal_handlers_disconnect_by_func(aMenuBar->TopLevelWindow(), + FuncToGpointer(map_event_cb), + aMenuBar); + + mMenuBars.RemoveElement(aMenuBar); +} + +NS_IMETHODIMP +nsNativeMenuService::CreateNativeMenuBar(nsIWidget *aParent, + nsIContent *aMenuBarNode) +{ + NS_ENSURE_ARG(aParent); + NS_ENSURE_ARG(aMenuBarNode); + + nsAutoPtr menubar(nsMenuBar::Create(aParent, aMenuBarNode)); + if (!menubar) { + NS_WARNING("Failed to create menubar"); + return NS_ERROR_FAILURE; + } + + // Unity forgets our window if it is unmapped by the application, which + // happens with some extensions that add "minimize to tray" type + // functionality. We hook on to the MapNotify event to re-register our menu + // with Unity + g_signal_connect(G_OBJECT(menubar->TopLevelWindow()), + "map-event", G_CALLBACK(map_event_cb), + menubar); + + mMenuBars.AppendElement(menubar); + RegisterNativeMenuBar(menubar); + + static_cast(aParent)->SetMenuBar(menubar.forget()); + + return NS_OK; +} Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuService.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuService.h 2014-01-03 00:27:21.561660361 +0000 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsNativeMenuService_h__ +#define __nsNativeMenuService_h__ + +#include "mozilla/Attributes.h" +#include "nsCOMPtr.h" +#include "nsINativeMenuService.h" +#include "nsIObserver.h" +#include "nsTArray.h" + +#include "nsNativeMenuUtils.h" + +#include +#include +#include + +class nsMenuBar; + +/* + * The main native menu service singleton. nsWebShellWindow calls in to this when + * a new top level window is created. + * + * Menubars are owned by their nsWindow. This service holds a weak reference to + * each menubar for the purpose of re-registering them with the shell if it + * needs to. The menubar is responsible for notifying the service when the last + * reference to it is dropped. + */ +class nsNativeMenuService MOZ_FINAL : public nsINativeMenuService, + public nsIObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVER + + NS_IMETHOD CreateNativeMenuBar(nsIWidget* aParent, nsIContent* aMenuBarNode); + + nsresult Init(); + + // Returns the singleton addref'd for the service manager + static already_AddRefed GetInstance(); + + // Returns the singleton without increasing the reference count + static nsNativeMenuService* GetSingleton(); + + // Called by a menubar when the last reference to it is dropped + void NotifyNativeMenuBarDestroyed(nsMenuBar *aMenuBar); + +private: + nsNativeMenuService(); + ~nsNativeMenuService(); + + static void EnsureInitialized(); + void SetOnline(bool aOnline); + void RegisterNativeMenuBar(nsMenuBar *aMenuBar); + static void name_owner_changed_cb(GObject *gobject, + GParamSpec *pspec, + gpointer user_data); + static void proxy_created_cb(GObject *source_object, + GAsyncResult *res, + gpointer user_data); + static void register_native_menubar_cb(GObject *source_object, + GAsyncResult *res, + gpointer user_data); + static gboolean map_event_cb(GtkWidget *widget, GdkEvent *event, + gpointer user_data); + void OnNameOwnerChanged(); + void OnProxyCreated(GDBusProxy *aProxy); + void OnNativeMenuBarRegistered(nsMenuBar *aMenuBar, + bool aSuccess); + static int PrefChangedCallback(const char *aPref, void *aClosure); + void PrefChanged(); + + nsNativeMenuGIORequest mCreateProxyRequest; + GDBusProxy *mDbusProxy; + bool mOnline; + nsTArray mMenuBars; + + static bool sShutdown; + static nsNativeMenuService *sService; +}; + +#endif /* __nsNativeMenuService_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuUtils.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsNativeMenuUtils.h 2014-01-03 00:27:21.561660361 +0000 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ +/* 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/. */ + +#ifndef __nsNativeMenuUtils_h__ +#define __nsNativeMenuUtils_h__ + +#include +#include + +class nsNativeMenuGIORequest +{ +public: + nsNativeMenuGIORequest() : mCancellable(nullptr) { }; + + ~nsNativeMenuGIORequest() { + Cancel(); + } + + void Start() { + Cancel(); + mCancellable = g_cancellable_new(); + } + + void Finish() { + if (mCancellable) { + g_object_unref(mCancellable); + mCancellable = nullptr; + } + } + + void Cancel() { + if (mCancellable) { + g_cancellable_cancel(mCancellable); + g_object_unref(mCancellable); + mCancellable = nullptr; + } + } + + bool InProgress() const { + if (!mCancellable) { + return false; + } + + return !g_cancellable_is_cancelled(mCancellable); + } + + operator GCancellable*() const { + return mCancellable; + } + +private: + GCancellable *mCancellable; +}; + +#endif /* __nsNativeMenuUtils_h__ */ Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsWidgetFactory.cpp =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/widget/gtk/nsWidgetFactory.cpp 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsWidgetFactory.cpp 2014-01-03 00:27:21.561660361 +0000 @@ -43,6 +43,9 @@ #include "GfxInfoX11.h" #endif +#include "nsNativeMenuService.h" +#include "nsNativeMenuAtoms.h" + #include "nsNativeThemeGTK.h" #include "nsIComponentRegistrar.h" @@ -116,6 +119,9 @@ } #endif +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsNativeMenuService, + nsNativeMenuService::GetInstance) + #ifdef NS_PRINTING NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsGTK, Init) @@ -243,6 +249,7 @@ NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID); NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); #endif +NS_DEFINE_NAMED_CID(NS_NATIVEMENUSERVICE_CID); static const mozilla::Module::CIDEntry kWidgetCIDs[] = { @@ -277,6 +284,7 @@ { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor }, { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor }, #endif + { &kNS_NATIVEMENUSERVICE_CID, true, NULL, nsNativeMenuServiceConstructor }, { nullptr } }; @@ -312,6 +320,7 @@ { "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID }, { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID }, #endif + { "@mozilla.org/widget/nativemenuservice;1", &kNS_NATIVEMENUSERVICE_CID }, { nullptr } }; @@ -326,13 +335,22 @@ nsAppShellShutdown(); } +static nsresult +nsWidgetGtk2ModuleCtor() +{ + nsAppShellInit(); + nsNativeMenuAtoms::Init(); + + return NS_OK; +} + static const mozilla::Module kWidgetModule = { mozilla::Module::kVersion, kWidgetCIDs, kWidgetContracts, nullptr, nullptr, - nsAppShellInit, + nsWidgetGtk2ModuleCtor, nsWidgetGtk2ModuleDtor }; Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsWindow.cpp =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/widget/gtk/nsWindow.cpp 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsWindow.cpp 2014-01-03 00:27:21.561660361 +0000 @@ -4732,6 +4732,11 @@ return NS_OK; } +void +nsWindow::SetMenuBar(nsMenuBar *aMenuBar) { + mMenuBar = aMenuBar; +} + bool nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY, bool aIsWheel, bool aAlwaysRollup) Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/nsWindow.h =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/widget/gtk/nsWindow.h 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/nsWindow.h 2014-01-03 00:27:21.561660361 +0000 @@ -34,6 +34,8 @@ #include "nsGtkIMModule.h" +#include "nsMenuBar.h" + #undef LOG #ifdef MOZ_LOGGING @@ -154,6 +156,8 @@ NS_IMETHOD MakeFullScreen(bool aFullScreen); NS_IMETHOD HideWindowChrome(bool aShouldHide); + void SetMenuBar(nsMenuBar *aMenuBar); + /** * GetLastUserInputTime returns a timestamp for the most recent user input * event. This is intended for pointer grab requests (including drags). @@ -460,6 +464,8 @@ * however, IME doesn't work at that time. */ nsRefPtr mIMModule; + + nsAutoPtr mMenuBar; }; class nsChildWindow : public nsWindow { Index: firefox-28.0~a2~hg20140102r168999/widget/moz.build =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/widget/moz.build 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/moz.build 2014-01-03 00:27:21.561660361 +0000 @@ -37,8 +37,7 @@ 'nsITaskbarProgress.idl', ] EXPORTS += [ - 'nsINativeMenuService.h', - 'nsIPrintDialogService.h', + 'nsIPrintDialogService.h' ] elif toolkit == 'os2': XPIDL_SOURCES += [ @@ -46,6 +45,9 @@ ] EXPORTS += ['nsIDragSessionOS2.h'] +if toolkit in ('cocoa', 'gtk2', 'gtk3'): + EXPORTS += ['nsINativeMenuService.h'] + TEST_TOOL_DIRS += ['tests'] # Don't build the DSO under the 'build' directory as windows does. Index: firefox-28.0~a2~hg20140102r168999/xpfe/appshell/src/nsWebShellWindow.cpp =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/xpfe/appshell/src/nsWebShellWindow.cpp 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/xpfe/appshell/src/nsWebShellWindow.cpp 2014-01-03 00:27:21.561660361 +0000 @@ -57,6 +57,7 @@ #include "nsIScreen.h" #include "nsIContent.h" // for menus +#include "nsIAtom.h" #include "nsIScriptSecurityManager.h" // For calculating size @@ -71,7 +72,7 @@ #include "mozilla/Attributes.h" #include "mozilla/MouseEvents.h" -#ifdef XP_MACOSX +#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) #include "nsINativeMenuService.h" #define USE_NATIVE_MENUS #endif @@ -439,8 +440,13 @@ if (!menubarNode) return; - nsCOMPtr nms = do_GetService("@mozilla.org/widget/nativemenuservice;1"); nsCOMPtr menubarContent(do_QueryInterface(menubarNode)); +#ifdef MOZ_WIDGET_GTK + nsCOMPtr atom = do_GetAtom(NS_LITERAL_CSTRING("_moz-menubarkeeplocal")); + if (menubarContent->AttrValueIs(kNameSpaceID_None, atom, nsGkAtoms::_true, eCaseMatters)) + return; +#endif + nsCOMPtr nms = do_GetService("@mozilla.org/widget/nativemenuservice;1"); if (nms && menubarContent) nms->CreateNativeMenuBar(aParentWindow, menubarContent); } Index: firefox-28.0~a2~hg20140102r168999/widget/gtk/moz.build =================================================================== --- firefox-28.0~a2~hg20140102r168999.orig/widget/gtk/moz.build 2014-01-03 00:27:21.561660361 +0000 +++ firefox-28.0~a2~hg20140102r168999/widget/gtk/moz.build 2014-01-03 00:27:21.561660361 +0000 @@ -19,11 +19,20 @@ 'mozcontainer.c', 'nsBidiKeyboard.cpp', 'nsColorPicker.cpp', + 'nsDbusmenu.cpp', 'nsFilePicker.cpp', 'nsGtkKeyUtils.cpp', 'nsImageToPixbuf.cpp', 'nsLookAndFeel.cpp', + 'nsMenu.cpp', + 'nsMenuBar.cpp', + 'nsMenuContainer.cpp', + 'nsMenuItem.cpp', + 'nsMenuObject.cpp', + 'nsMenuSeparator.cpp', 'nsNativeKeyBindings.cpp', + 'nsNativeMenuAtoms.cpp', + 'nsNativeMenuDocListener.cpp', 'nsNativeThemeGTK.cpp', 'nsScreenGtk.cpp', 'nsScreenManagerGtk.cpp', @@ -36,6 +45,7 @@ SOURCES += [ 'nsAppShell.cpp', 'nsGtkIMModule.cpp', + 'nsNativeMenuService.cpp', 'nsWidgetFactory.cpp', 'nsWindow.cpp', ] @@ -92,6 +102,7 @@ '../shared', '../xpwidgets', '/layout/generic', + '/layout/style', '/layout/xul', '/other-licenses/atk-1.0', ] debian/patches/aarch64-support.patch0000664000000000000000000004603712321600535014611 0ustar # HG changeset patch # User Marcin Juszkiewicz # Date 1393440196 18000 # Node ID d56b5c1a557348d4ac14a4d1ea7a5b5d240e3647 # Parent 6a46f53ad944b44385398822d7bcf7621a785d91 Bug 963024 - AArch64 support for XPCOM. r=froydnj diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build --- a/xpcom/reflect/xptcall/src/md/unix/moz.build +++ b/xpcom/reflect/xptcall/src/md/unix/moz.build @@ -144,16 +144,23 @@ if CONFIG['OS_ARCH'] == 'NetBSD': if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k', 'next68k', 'sun3', 'sun3x', 'x68k'): SOURCES += [ 'xptcinvoke_netbsd_m68k.cpp', 'xptcstubs_netbsd_m68k.cpp' ] if CONFIG['OS_ARCH'] == 'Linux': + if CONFIG['OS_TEST'] == 'aarch64': + SOURCES += [ + 'xptcinvoke_aarch64.cpp', + 'xptcinvoke_asm_aarch64.s', + 'xptcstubs_aarch64.cpp', + 'xptcstubs_asm_aarch64.s', + ] if CONFIG['OS_TEST'] == 'm68k': SOURCES += [ 'xptcinvoke_linux_m68k.cpp', 'xptcstubs_linux_m68k.cpp', ] if CONFIG['OS_TEST'].find('mips') != -1: if CONFIG['OS_TEST'].find('mips64') != -1: SOURCES += [ diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp new file mode 100644 --- /dev/null +++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp @@ -0,0 +1,136 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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/. */ + +/* Platform specific code to invoke XPCOM methods on native objects */ + +#include "xptcprivate.h" + +#if !defined(__aarch64__) +#error "This code is for Linux AArch64 only." +#endif + + +/* "Procedure Call Standard for the ARM 64-bit Architecture" document, sections + * "5.4 Parameter Passing" and "6.1.2 Procedure Calling" contain all the + * needed information. + * + * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf + */ + +#ifndef __AARCH64EL__ +#error "Only little endian compatibility was tested" +#endif + +/* + * Allocation of integer function arguments initially to registers r1-r7 + * and then to stack. Handling of 'that' argument which goes to register r0 + * is handled separately and does not belong here. + * + * 'ireg_args' - pointer to the current position in the buffer, + * corresponding to the register arguments + * 'stack_args' - pointer to the current position in the buffer, + * corresponding to the arguments on stack + * 'end' - pointer to the end of the registers argument + * buffer. + */ +static inline void alloc_word(uint64_t* &ireg_args, + uint64_t* &stack_args, + uint64_t* end, + uint64_t data) +{ + if (ireg_args < end) { + *ireg_args = data; + ireg_args++; + } else { + *stack_args = data; + stack_args++; + } +} + +static inline void alloc_double(double* &freg_args, + uint64_t* &stack_args, + double* end, + double data) +{ + if (freg_args < end) { + *freg_args = data; + freg_args++; + } else { + memcpy(stack_args, &data, sizeof(data)); + stack_args++; + } +} + +static inline void alloc_float(double* &freg_args, + uint64_t* &stack_args, + double* end, + float data) +{ + if (freg_args < end) { + memcpy(freg_args, &data, sizeof(data)); + freg_args++; + } else { + memcpy(stack_args, &data, sizeof(data)); + stack_args++; + } +} + + +extern "C" void +invoke_copy_to_stack(uint64_t* stk, uint64_t *end, + uint32_t paramCount, nsXPTCVariant* s) +{ + uint64_t *ireg_args = stk; + uint64_t *ireg_end = ireg_args + 8; + double *freg_args = (double *)ireg_end; + double *freg_end = freg_args + 8; + uint64_t *stack_args = (uint64_t *)freg_end; + + // leave room for 'that' argument in x0 + ++ireg_args; + + for (uint32_t i = 0; i < paramCount; i++, s++) { + if (s->IsPtrData()) { + alloc_word(ireg_args, stack_args, ireg_end, (uint64_t)s->ptr); + continue; + } + // According to the ABI, integral types that are smaller than 8 bytes + // are to be passed in 8-byte registers or 8-byte stack slots. + switch (s->type) { + case nsXPTType::T_FLOAT: + alloc_float(freg_args, stack_args, freg_end, s->val.f); + break; + case nsXPTType::T_DOUBLE: + alloc_double(freg_args, stack_args, freg_end, s->val.d); + break; + case nsXPTType::T_I8: alloc_word(ireg_args, stk, end, s->val.i8); break; + case nsXPTType::T_I16: alloc_word(ireg_args, stk, end, s->val.i16); break; + case nsXPTType::T_I32: alloc_word(ireg_args, stk, end, s->val.i32); break; + case nsXPTType::T_I64: alloc_word(ireg_args, stk, end, s->val.i64); break; + case nsXPTType::T_U8: alloc_word(ireg_args, stk, end, s->val.u8); break; + case nsXPTType::T_U16: alloc_word(ireg_args, stk, end, s->val.u16); break; + case nsXPTType::T_U32: alloc_word(ireg_args, stk, end, s->val.u32); break; + case nsXPTType::T_U64: alloc_word(ireg_args, stk, end, s->val.u64); break; + case nsXPTType::T_BOOL: alloc_word(ireg_args, stk, end, s->val.b); break; + case nsXPTType::T_CHAR: alloc_word(ireg_args, stk, end, s->val.c); break; + case nsXPTType::T_WCHAR: alloc_word(ireg_args, stk, end, s->val.wc); break; + default: + // all the others are plain pointer types + alloc_word(ireg_args, stack_args, ireg_end, + reinterpret_cast(s->val.p)); + break; + } + } +} + +extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, + uint32_t paramCount, nsXPTCVariant* params); + +EXPORT_XPCOM_API(nsresult) +NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, + uint32_t paramCount, nsXPTCVariant* params) +{ + return _NS_InvokeByIndex(that, methodIndex, paramCount, params); +} diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s new file mode 100644 --- /dev/null +++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s @@ -0,0 +1,67 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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/. */ + + .section ".text" + .globl _NS_InvokeByIndex + .type _NS_InvokeByIndex,@function + +/* + * _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, + * uint32_t paramCount, nsXPTCVariant* params) + */ + +_NS_InvokeByIndex: + # set up frame + stp x29, x30, [sp,#-32]! + mov x29, sp + stp x19, x20, [sp,#16] + + # save methodIndex across function calls + mov w20, w1 + + # end of stack area passed to invoke_copy_to_stack + mov x1, sp + + # assume 8 bytes of stack for each argument with 16-byte alignment + add w19, w2, #1 + and w19, w19, #0xfffffffe + sub sp, sp, w19, uxth #3 + + # temporary place to store args passed in r0-r7,v0-v7 + sub sp, sp, #128 + + # save 'that' on stack + str x0, [sp] + + # start of stack area passed to invoke_copy_to_stack + mov x0, sp + bl invoke_copy_to_stack + + # load arguments passed in r0-r7 + ldp x6, x7, [sp, #48] + ldp x4, x5, [sp, #32] + ldp x2, x3, [sp, #16] + ldp x0, x1, [sp],#64 + + # load arguments passed in v0-v7 + ldp d6, d7, [sp, #48] + ldp d4, d5, [sp, #32] + ldp d2, d3, [sp, #16] + ldp d0, d1, [sp],#64 + + # call the method + ldr x16, [x0] + add x16, x16, w20, uxth #3 + ldr x16, [x16] + blr x16 + + add sp, sp, w19, uxth #3 + ldp x19, x20, [sp,#16] + ldp x29, x30, [sp],#32 + ret + + .size _NS_InvokeByIndex, . - _NS_InvokeByIndex + + diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp new file mode 100644 --- /dev/null +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp @@ -0,0 +1,219 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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 "xptcprivate.h" +#include "xptiprivate.h" + +#ifndef __AARCH64EL__ +#error "Only little endian compatibility was tested" +#endif + +/* + * This is for AArch64 ABI + * + * When we're called, the "gp" registers are stored in gprData and + * the "fp" registers are stored in fprData. Each array has 8 regs + * but first reg in gprData is a placeholder for 'self'. + */ +extern "C" nsresult +PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args, + uint64_t *gprData, double *fprData) +{ +#define PARAM_BUFFER_COUNT 16 +#define PARAM_GPR_COUNT 8 +#define PARAM_FPR_COUNT 8 + + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; + nsXPTCMiniVariant* dispatchParams = NULL; + const nsXPTMethodInfo* info; + nsresult result = NS_ERROR_FAILURE; + + NS_ASSERTION(self,"no self"); + + self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info); + NS_ASSERTION(info,"no method info"); + + uint32_t paramCount = info->GetParamCount(); + + // setup variant array pointer + if (paramCount > PARAM_BUFFER_COUNT) { + dispatchParams = new nsXPTCMiniVariant[paramCount]; + } else { + dispatchParams = paramBuffer; + } + NS_ASSERTION(dispatchParams,"no place for params"); + + uint64_t* ap = args; + uint32_t next_gpr = 1; // skip first arg which is 'self' + uint32_t next_fpr = 0; + for (uint32_t i = 0; i < paramCount; i++) { + const nsXPTParamInfo& param = info->GetParam(i); + const nsXPTType& type = param.GetType(); + nsXPTCMiniVariant* dp = &dispatchParams[i]; + + if (param.IsOut() || !type.IsArithmetic()) { + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.p = (void*)gprData[next_gpr++]; + } else { + dp->val.p = (void*)*ap++; + } + continue; + } + + switch (type) { + case nsXPTType::T_I8: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.i8 = (int8_t)gprData[next_gpr++]; + } else { + dp->val.i8 = (int8_t)*ap++; + } + break; + + case nsXPTType::T_I16: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.i16 = (int16_t)gprData[next_gpr++]; + } else { + dp->val.i16 = (int16_t)*ap++; + } + break; + + case nsXPTType::T_I32: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.i32 = (int32_t)gprData[next_gpr++]; + } else { + dp->val.i32 = (int32_t)*ap++; + } + break; + + case nsXPTType::T_I64: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.i64 = (int64_t)gprData[next_gpr++]; + } else { + dp->val.i64 = (int64_t)*ap++; + } + break; + + case nsXPTType::T_U8: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.u8 = (uint8_t)gprData[next_gpr++]; + } else { + dp->val.u8 = (uint8_t)*ap++; + } + break; + + case nsXPTType::T_U16: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.u16 = (uint16_t)gprData[next_gpr++]; + } else { + dp->val.u16 = (uint16_t)*ap++; + } + break; + + case nsXPTType::T_U32: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.u32 = (uint32_t)gprData[next_gpr++]; + } else { + dp->val.u32 = (uint32_t)*ap++; + } + break; + + case nsXPTType::T_U64: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.u64 = (uint64_t)gprData[next_gpr++]; + } else { + dp->val.u64 = (uint64_t)*ap++; + } + break; + + case nsXPTType::T_FLOAT: + if (next_fpr < PARAM_FPR_COUNT) { + memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f)); + } else { + memcpy(&dp->val.f, ap++, sizeof(dp->val.f)); + } + break; + + case nsXPTType::T_DOUBLE: + if (next_fpr < PARAM_FPR_COUNT) { + memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d)); + } else { + memcpy(&dp->val.d, ap++, sizeof(dp->val.d)); + } + break; + + case nsXPTType::T_BOOL: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.b = (bool)gprData[next_gpr++]; + } else { + dp->val.b = (bool)*ap++; + } + break; + + case nsXPTType::T_CHAR: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.c = (char)gprData[next_gpr++]; + } else { + dp->val.c = (char)*ap++; + } + break; + + case nsXPTType::T_WCHAR: + if (next_gpr < PARAM_GPR_COUNT) { + dp->val.wc = (wchar_t)gprData[next_gpr++]; + } else { + dp->val.wc = (wchar_t)*ap++; + } + break; + + default: + NS_ASSERTION(0, "bad type"); + break; + } + } + + result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams); + + if (dispatchParams != paramBuffer) { + delete [] dispatchParams; + } + + return result; +} + +// Load w17 with the constant 'n' and branch to SharedStub(). +# define STUB_ENTRY(n) \ + __asm__ ( \ + ".section \".text\" \n\t" \ + ".align 2\n\t" \ + ".if "#n" < 10 \n\t" \ + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ + ".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ + "_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ + ".elseif "#n" < 100 \n\t" \ + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ + ".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ + "_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ + ".elseif "#n" < 1000 \n\t" \ + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ + ".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ + "_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ + ".else \n\t" \ + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ + ".endif \n\t" \ + "mov w17,#"#n" \n\t" \ + "b SharedStub \n" \ +); + +#define SENTINEL_ENTRY(n) \ + nsresult nsXPTCStubBase::Sentinel##n() \ +{ \ + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + return NS_ERROR_NOT_IMPLEMENTED; \ +} + +#include "xptcstubsdef.inc" diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s new file mode 100644 --- /dev/null +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s @@ -0,0 +1,39 @@ +# 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/. + + .set NGPREGS,8 + .set NFPREGS,8 + + .section ".text" + .globl SharedStub + .hidden SharedStub + .type SharedStub,@function +SharedStub: + stp x29, x30, [sp,#-16]! + mov x29, sp + + sub sp, sp, #8*(NGPREGS+NFPREGS) + stp x0, x1, [sp, #64+(0*8)] + stp x2, x3, [sp, #64+(2*8)] + stp x4, x5, [sp, #64+(4*8)] + stp x6, x7, [sp, #64+(6*8)] + stp d0, d1, [sp, #(0*8)] + stp d2, d3, [sp, #(2*8)] + stp d4, d5, [sp, #(4*8)] + stp d6, d7, [sp, #(6*8)] + + # methodIndex passed from stub + mov w1, w17 + + add x2, sp, #16+(8*(NGPREGS+NFPREGS)) + add x3, sp, #8*NFPREGS + add x4, sp, #0 + + bl PrepareAndDispatch + + add sp, sp, #8*(NGPREGS+NFPREGS) + ldp x29, x30, [sp],#16 + ret + + .size SharedStub, . - SharedStub debian/patches/test-integration/0000775000000000000000000000000012321600535014114 5ustar debian/patches/test-integration/xpcshell-dont-return-nonzero-on-test-failure.patch0000664000000000000000000000332612321600535025746 0ustar Description: Don't return a non-zero exit status from runxpcshelltests.py if there are test failures. This sends the build red in Jenkins, and makes it impossible to apply our own filter to the test results. This is more consistent with the other test suites Author: Chris Coulson Forwarded: no Index: firefox-trunk-26.0~a1~hg20130902r145224/testing/xpcshell/runxpcshelltests.py =================================================================== --- firefox-trunk-26.0~a1~hg20130902r145224.orig/testing/xpcshell/runxpcshelltests.py 2013-09-03 11:03:29.214476586 +0100 +++ firefox-trunk-26.0~a1~hg20130902r145224/testing/xpcshell/runxpcshelltests.py 2013-09-03 11:03:29.382476587 +0100 @@ -1208,12 +1208,13 @@ self.pluginsPath = pluginsPath self.sequential = sequential + self.testCount = 0 + if not testdirs and not manifest: # nothing to test! self.log.error("Error: No test dirs or test manifest specified!") return False - self.testCount = 0 self.passCount = 0 self.failCount = 0 self.todoCount = 0 @@ -1525,6 +1526,8 @@ help="path to file where failure manifest will be written.") def main(): + global gotSIGINT + parser = XPCShellOptions() options, args = parser.parse_args() @@ -1541,7 +1544,7 @@ print >>sys.stderr, "Error: You must specify a test filename in interactive mode!" sys.exit(1) - if not xpcsh.runTests(args[0], testdirs=args[1:], **options.__dict__): + if not xpcsh.runTests(args[0], testdirs=args[1:], **options.__dict__) and (xpcsh.testCount == 0 or gotSIGINT): sys.exit(1) if __name__ == '__main__': debian/patches/test-integration/xpcshell-disable-addon-select-dialog-test-for-adt.patch0000664000000000000000000000364512321600535026474 0ustar Description: Make toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js work when the selection UI is disabled Author: Chris Coulson Forwarded: no Index: firefox-trunk-20.0~a1~hg20121130r114518/toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js =================================================================== --- firefox-trunk-20.0~a1~hg20121130r114518.orig/toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js 2012-11-30 02:14:18.000000000 +0000 +++ firefox-trunk-20.0~a1~hg20121130r114518/toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js 2012-11-30 13:14:46.057476721 +0000 @@ -59,17 +59,27 @@ name: "Test Addon 1", }, profileDir); - startupManager(); - - // For a new profile it should disable showing the selection UI in the future - do_check_true(Services.prefs.getBoolPref(PREF_SHOWN_SELECTION_UI)); - Services.prefs.clearUserPref(PREF_SHOWN_SELECTION_UI); + // When running on an installed system, the selection UI is disabled in + // vendor-firefox.js. But ensure the selection UI is tested when running + // from the build tree + let selectionUIDisabled = false; + try { + selectionUIDisabled = Services.prefs.getBoolPref(PREF_SHOWN_SELECTION_UI); + } catch(e) {} - gExpectedURL = URI_EXTENSION_SELECT_DIALOG; - restartManager("2"); + startupManager(); - do_check_true(Services.prefs.getBoolPref(PREF_SHOWN_SELECTION_UI)); - do_check_eq(gExpectedURL, null); + if (!selectionUIDisabled) { + // For a new profile it should disable showing the selection UI in the future + do_check_true(Services.prefs.getBoolPref(PREF_SHOWN_SELECTION_UI)); + Services.prefs.clearUserPref(PREF_SHOWN_SELECTION_UI); + + gExpectedURL = URI_EXTENSION_SELECT_DIALOG; + restartManager("2"); + + do_check_true(Services.prefs.getBoolPref(PREF_SHOWN_SELECTION_UI)); + do_check_eq(gExpectedURL, null); + } gExpectedURL = URI_EXTENSION_UPDATE_DIALOG; debian/patches/test-integration/xpcshell-output-valid-junit-xml.patch0000664000000000000000000000304212321600535023336 0ustar Description: Make the xpcshell JUnit output match the schema Author: Chris Coulson Forwarded: no Index: firefox-trunk-22.0~a1~hg20130222r122576/testing/xpcshell/selftest.py =================================================================== --- firefox-trunk-22.0~a1~hg20130222r122576.orig/testing/xpcshell/selftest.py 2013-02-22 16:16:25.320690105 +0000 +++ firefox-trunk-22.0~a1~hg20130222r122576/testing/xpcshell/selftest.py 2013-02-22 16:16:25.316690105 +0000 @@ -432,7 +432,7 @@ self.assertTrue(suite is not None) self.assertEqual(suite.get("tests"), "3") self.assertEqual(suite.get("failures"), "1") - self.assertEqual(suite.get("skip"), "1") + self.assertEqual(suite.get("skipped"), "1") testcases = suite.findall("testcase") self.assertEqual(len(testcases), 3) Index: firefox-trunk-22.0~a1~hg20130222r122576/testing/xpcshell/runxpcshelltests.py =================================================================== --- firefox-trunk-22.0~a1~hg20130222r122576.orig/testing/xpcshell/runxpcshelltests.py 2013-02-22 15:46:03.000000000 +0000 +++ firefox-trunk-22.0~a1~hg20130222r122576/testing/xpcshell/runxpcshelltests.py 2013-02-22 16:16:54.676689583 +0000 @@ -550,7 +550,7 @@ testsuite.setAttribute("tests", str(total)) testsuite.setAttribute("failures", str(failed)) - testsuite.setAttribute("skip", str(skipped)) + testsuite.setAttribute("skipped", str(skipped)) doc.writexml(fh, addindent=" ", newl="\n", encoding="utf-8") debian/patches/test-integration/mochitest-allow-test-manifest-for-browser-chrome.patch0000664000000000000000000000342112321600535026551 0ustar # HG changeset patch # Parent 0e8cbb3674e7a0aaa09daa97e5c91f002219ce06 # User Chris Coulson Index: firefox-trunk-28.0~a1~hg20131112r154534/testing/mochitest/browser-harness.xul =================================================================== --- firefox-trunk-28.0~a1~hg20131112r154534.orig/testing/mochitest/browser-harness.xul 2013-11-12 20:36:13.122338871 +0000 +++ firefox-trunk-28.0~a1~hg20131112r154534/testing/mochitest/browser-harness.xul 2013-11-12 20:36:13.118338871 +0000 @@ -204,7 +204,12 @@ gConfig.thisChunk, gConfig.chunkByDir); } - createTester(fileNames.map(function (f) { return new browserTest(f); })); + function loadTestList2(manifest) { + fileNames = filterTests(manifest, fileNames, false, gConfig); + createTester(fileNames.map(function (f) { return new browserTest(f); })); + } + + getTestManifest("http://mochi.test:8888/" + gConfig.testManifest, null, loadTestList2); } function setStatus(aStatusString) { Index: firefox-trunk-28.0~a1~hg20131112r154534/testing/mochitest/manifestLibrary.js =================================================================== --- firefox-trunk-28.0~a1~hg20131112r154534.orig/testing/mochitest/manifestLibrary.js 2013-11-12 20:36:13.122338871 +0000 +++ firefox-trunk-28.0~a1~hg20131112r154534/testing/mochitest/manifestLibrary.js 2013-11-12 20:36:13.118338871 +0000 @@ -64,13 +64,15 @@ returns: filtered version of testList */ -function filterTests(filter, testList, runOnly) { +function filterTests(filter, testList, runOnly, c) { var filteredTests = []; var removedTests = []; var runtests = {}; var excludetests = {}; + var config = c || config; + if (filter == null) { return testList; } debian/patches/test-integration/xpcshell-write-time-for-failed-test.patch0000664000000000000000000000243112321600535024026 0ustar Description: Write test duration to the JUnit results when the test fails Author: Chris Coulson Forwarded: no Index: firefox-trunk-26.0~a1~hg20130902r145224/testing/xpcshell/runxpcshelltests.py =================================================================== --- firefox-trunk-26.0~a1~hg20130902r145224.orig/testing/xpcshell/runxpcshelltests.py 2013-09-03 11:09:32.130478473 +0100 +++ firefox-trunk-26.0~a1~hg20130902r145224/testing/xpcshell/runxpcshelltests.py 2013-09-03 11:11:33.882479106 +0100 @@ -591,6 +591,9 @@ result = not (self.has_failure_output or (self.getReturnCode(proc) != 0)) + now = time.time() + self.xunit_result["time"] = now - startTime + if result != expected: if self.retry: self.clean_temp_dirs(name, stdout) @@ -620,9 +623,7 @@ f.write('%s = %s\n' % (k, v)) else: - now = time.time() timeTaken = (now - startTime) * 1000 - self.xunit_result["time"] = now - startTime with LOG_MUTEX: self.log.info("TEST-%s | %s | test passed (time: %.3fms)" % ("PASS" if expected else "KNOWN-FAIL", name, timeTaken)) debian/patches/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch0000664000000000000000000000363012321600535027377 0ustar Description: Disable xpcshell tests that always fail in Jenkins because they require write access to the application directory Author: Chris Coulson Forwarded: no Index: firefox-trunk-27.0~a1~hg20131021r151486/browser/components/places/tests/unit/xpcshell.ini =================================================================== --- firefox-trunk-27.0~a1~hg20131021r151486.orig/browser/components/places/tests/unit/xpcshell.ini 2013-10-21 20:45:57.984901459 +0100 +++ firefox-trunk-27.0~a1~hg20131021r151486/browser/components/places/tests/unit/xpcshell.ini 2013-10-21 20:45:57.976901459 +0100 @@ -13,6 +13,9 @@ [test_browserGlue_corrupt_nobackup.js] [test_browserGlue_corrupt_nobackup_default.js] [test_browserGlue_distribution.js] +# This test requires write access to the application directory +skip-if = true + [test_browserGlue_migrate.js] [test_browserGlue_prefs.js] [test_browserGlue_restore.js] Index: firefox-trunk-27.0~a1~hg20131021r151486/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini =================================================================== --- firefox-trunk-27.0~a1~hg20131021r151486.orig/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini 2013-10-21 19:59:44.000000000 +0100 +++ firefox-trunk-27.0~a1~hg20131021r151486/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini 2013-10-21 20:48:10.720902510 +0100 @@ -244,10 +244,10 @@ run-sequentially = Uses hardcoded ports in xpi files. [test_update_compatmode.js] [test_upgrade.js] -# Bug 676992: test consistently hangs on Android -skip-if = os == "android" +# This needs to write to the application directory +skip-if = true run-sequentially = Uses global XCurProcD dir. [test_upgrade_strictcompat.js] -# Bug 676992: test consistently hangs on Android -skip-if = os == "android" +# This needs to write to the application directory +skip-if = true run-sequentially = Uses global XCurProcD dir. debian/patches/test-integration/automation-output-junit-xml.patch0000664000000000000000000004064612321600535022612 0ustar Description: Add JUnit XML output support for reftest and mochitest harnesses. This is required for integration with Jenkins Author: Chris Coulson Forwarded: no Index: firefox-trunk-29.0~a1~hg20140114r163402/build/automation.py.in =================================================================== --- firefox-trunk-29.0~a1~hg20140114r163402.orig/build/automation.py.in 2014-01-15 12:56:28.534095520 +0000 +++ firefox-trunk-29.0~a1~hg20140114r163402/build/automation.py.in 2014-01-15 12:58:23.298097676 +0000 @@ -20,6 +20,8 @@ import sqlite3 from datetime import datetime, timedelta from string import Template +import xml.dom.minidom +import urlparse SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0]))) sys.path.insert(0, SCRIPT_DIR) @@ -130,6 +132,182 @@ self.port = port self.options = options + +class TestFailure: + "Represents a test failure" + + def __init__(self, type, message, log): + self.type = type + self.message = message + self.log = log + + +class TestState(object): + "Represents state about a a test" + + def __init__(self, url, root=''): + self._root = urlparse.urlparse(root) + self.url = url + self._start_time = datetime.now() + self._end_time = None + self._skipped = False + self._pass_count = 0 + self.failures = [] + + def finish(self): + self._end_time = datetime.now() + + def get_url(self): + return self._url + + def set_url(self, url): + if isinstance(url, urlparse.ParseResult): + self._url = url + else: + self._url = urlparse.urlparse(url) + + url = property(get_url, set_url) + + @property + def classname(self): + try: + url = self.url + if self.url.scheme == 'view-source': + url = urlparse.urlparse(url.path) + if url.scheme == self._root.scheme and url.netloc == self._root.netloc and \ + os.path.commonprefix([url.path, self._root.path]) == self._root.path: + return re.sub(r'^/', '', os.path.relpath(os.path.dirname(url.path), self._root.path)).replace('/', '.') + else: + return '' + except ValueError: + return '' + + @property + def name(self): + url = self.url + if self.url.scheme == 'view-source': + url = urlparse.urlparse(url.path) + if url.scheme == self._root.scheme and url.netloc == self._root.netloc and \ + os.path.commonprefix([url.path, self._root.path]) == self._root.path: + if url == self.url: + return os.path.basename(url.path) + else: + return self.url.scheme + ':' + os.path.basename(url.path) + else: + return url.path + + @property + def time(self): + if self._end_time == None: + raise Exception("Test hasn't finished yet") + + if self._skipped == True: + return 0.000000 + else: + return (self._end_time - self._start_time).total_seconds() + + @property + def loadOnly(self): + return self._pass_count == 0 and not self._skipped and len(self.failures) == 0 + + def get_skipped(self): + return self._skipped + + def set_skipped(self, skipped): + if skipped == True: + assert self._pass_count == 0 and len(self.failures) == 0 + self._skipped = skipped + + skipped = property(get_skipped, set_skipped) + + def get_pass_count(self): + return self._pass_count + + def set_pass_count(self, count): + if count > 0: + assert self._skipped == False + self._pass_count = count + + pass_count = property(get_pass_count, set_pass_count) + + def add_failure(self, failure): + assert self._skipped == False + self.failures.append(failure) + + def __str__(self): + return self.url.geturl() + + +class XunitLogHandler(logging.Handler): + + RE = re.compile(r'.*TEST-(UNEXPECTED|PASS|KNOWN|START)-?(PASS|FAIL|SLOW)?(\([^\)]*\))?\s+\|\s+(\S+)\s*\|?\s*(.*)') + + def __init__(self, root): + logging.Handler.__init__(self) + self._buffer = [] + self._root = root + self._currentTest = None + self._currentFailure = None + self.results = [] + + def _startNewTest(self, url): + if self._currentTest != None and self._currentTest.loadOnly: + self._currentTest.url = url + else: + if self._currentTest != None: + self._currentTest.finish() + self._currentTest = TestState(url, self._root) + self.results.append(self._currentTest) + self._buffer = [] + self._currentFailure = None + + def done(self): + if self._currentTest != None: + self._currentTest.finish() + self._currentTest = None + + def emit(self, record): + line = record.getMessage() + + m = self.RE.match(line) + + if m != None and m.groups()[0] == "START": + self._startNewTest(m.groups()[3].strip()) + + self._buffer.append(line) + + if m != None and m.groups()[0] == "UNEXPECTED": + url = urlparse.urlparse(m.groups()[3].strip()) + + f = TestFailure('TEST-UNEXPECTED-' + m.groups()[1].strip(), m.groups()[4].strip(), self._buffer) + self._buffer = [] + + if self._currentTest == None or url != self._currentTest.url or self._currentTest.skipped: + self._startNewTest(url) + + self._currentFailure = f + self._currentTest.add_failure(self._currentFailure) + + elif m != None and (m.groups()[0] == "PASS" or m.groups()[0] == "KNOWN"): + url = urlparse.urlparse(m.groups()[3].strip()) + self._currentFailure = None + + if self._currentTest == None or url != self._currentTest.url: + self._startNewTest(url) + + if "(SKIP)" in m.groups()[4] or "(SKIPPED" in m.groups()[4] or m.groups()[1] == "SLOW": + if self._currentTest.pass_count > 0 or len(self._currentTest.failures) > 0: + self._startNewTest(url) + self._currentTest.skipped = True + else: + if self._currentTest.skipped: + self._startNewTest(url) + self._currentTest.pass_count += 1 + + elif self._currentFailure != None: + self._currentFailure.log.append(line) + + class Automation(object): """ Runs the browser from a script, and provides useful utilities @@ -398,6 +576,16 @@ dest = "extraPrefs", metavar = "PREF=VALUE", help = "defines an extra user preference") + parser.add_option("--xunit-file", + action = "store", type = "string", + dest = "xunitFile", + help = "specify a filename to output JUnit results to") + + parser.add_option("--xunit-name", + action = "store", type = "string", + dest = "xunitName", + help = "specify a name for the xUnit results") + def fillCertificateDB(self, profileDir, certPath, utilityPath, xrePath): pwfilePath = os.path.join(profileDir, ".crtdbpw") pwfile = open(pwfilePath, "w") @@ -843,12 +1031,62 @@ def checkForCrashes(self, minidumpDir, symbolsPath): return mozcrash.check_for_crashes(minidumpDir, symbolsPath, test_name=self.lastTestSeen) + def writeXunitResults(self, xunitFile, xunitName, xunitResults): + doc = xml.dom.minidom.Document() + testsuite = doc.createElement("testsuite") + doc.appendChild(testsuite) + testsuite.setAttribute("name", xunitName) + + passed = 0 + failed = 0 + skipped = 0 + + for res in xunitResults: + testcase = doc.createElement("testcase") + testsuite.appendChild(testcase) + + testcase.setAttribute("name", res.name) + testcase.setAttribute("classname", res.classname) + testcase.setAttribute("time", str(res.time)) + + if res.skipped: + assert res.pass_count == 0 and len(res.failures) == 0 + skipped += 1 + + testcase.appendChild(doc.createElement("skipped")) + + else: + passed += res.pass_count + failed += len(res.failures) + + for f in res.failures: + failure = doc.createElement("failure") + testcase.appendChild(failure) + + failure.setAttribute("type", f.type) + failure.setAttribute("message", f.message) + + cdata = ('\n'.join(f.log)).decode("utf-8") + cdata = cdata.replace("]]>", "]] >") + cdata = cdata.replace("\x07", "") + + text = doc.createCDATASection(cdata) + failure.appendChild(text) + + testsuite.setAttribute("tests", str(passed + failed)) + testsuite.setAttribute("failures", str(failed)) + testsuite.setAttribute("skipped", str(skipped)) + + with open(xunitFile, 'w+') as fd: + doc.writexml(fd, addindent=" ", newl="\n", encoding="utf-8") + def runApp(self, testURL, env, app, profileDir, extraArgs, runSSLTunnel = False, utilityPath = None, xrePath = None, certPath = None, debuggerInfo = None, symbolsPath = None, timeout = -1, maxTime = None, onLaunch = None, - webapprtChrome = False, hide_subtests=None): + webapprtChrome = False, hide_subtests=None, + xunitFile = None, xunitName = None, xunitRoot = None): """ Run the app, log the duration it took to execute, return the status code. Kills the app if it runs for longer than |maxTime| seconds, or outputs nothing for |timeout| seconds. @@ -863,6 +1101,11 @@ if timeout == -1: timeout = self.DEFAULT_TIMEOUT + if xunitFile != None: + assert xunitName != None + if xunitRoot == None: + xunitRoot = '' + # copy env so we don't munge the caller's environment env = dict(env); env["NO_EM_RESTART"] = "1" @@ -910,9 +1153,17 @@ # app is launched. onLaunch() + if xunitFile != None: + xunitHandler = XunitLogHandler(xunitRoot) + self.log.addHandler(xunitHandler) + status = self.waitForFinish(proc, utilityPath, timeout, maxTime, startTime, debuggerInfo, symbolsPath) self.log.info("INFO | automation.py | Application ran for: %s", str(datetime.now() - startTime)) + if xunitFile != None: + xunitHandler.done() + self.writeXunitResults(xunitFile, xunitName, xunitHandler.results) + # Do a final check for zombie child processes. zombieProcesses = self.checkForZombies(processLog, utilityPath, debuggerInfo) Index: firefox-trunk-29.0~a1~hg20140114r163402/layout/tools/reftest/reftest.js =================================================================== --- firefox-trunk-29.0~a1~hg20140114r163402.orig/layout/tools/reftest/reftest.js 2014-01-15 12:56:28.534095520 +0000 +++ firefox-trunk-29.0~a1~hg20140114r163402/layout/tools/reftest/reftest.js 2014-01-15 12:56:28.530095520 +0000 @@ -1167,17 +1167,17 @@ var test = gURLs[0]; if (test.expected == EXPECTED_DEATH) { ++gTestResults.Skip; - gDumpLog("REFTEST TEST-KNOWN-FAIL | " + test.url1.spec + " | (SKIP)\n"); + gDumpLog("REFTEST TEST-KNOWN-FAIL | " + test.prettyPath + " | (SKIP)\n"); gURLs.shift(); } else if (test.needsFocus && !Focus()) { // FIXME: Marking this as a known fail is dangerous! What // if it starts failing all the time? ++gTestResults.Skip; - gDumpLog("REFTEST TEST-KNOWN-FAIL | " + test.url1.spec + " | (SKIPPED; COULDN'T GET FOCUS)\n"); + gDumpLog("REFTEST TEST-KNOWN-FAIL | " + test.prettyPath + " | (SKIPPED; COULDN'T GET FOCUS)\n"); gURLs.shift(); } else if (test.slow && !gRunSlowTests) { ++gTestResults.Slow; - gDumpLog("REFTEST TEST-KNOWN-SLOW | " + test.url1.spec + " | (SLOW)\n"); + gDumpLog("REFTEST TEST-KNOWN-SLOW | " + test.prettyPath + " | (SLOW)\n"); gURLs.shift(); } else { break; @@ -1259,11 +1259,11 @@ if (e == "bad pref") { var test = gURLs[0]; if (test.expected == EXPECTED_FAIL) { - gDumpLog("REFTEST TEST-KNOWN-FAIL | " + test.url1.spec + + gDumpLog("REFTEST TEST-KNOWN-FAIL | " + test.prettyPath + " | (SKIPPED; " + badPref + " not known or wrong type)\n"); ++gTestResults.Skip; } else { - gDumpLog("REFTEST TEST-UNEXPECTED-FAIL | " + test.url1.spec + + gDumpLog("REFTEST TEST-UNEXPECTED-FAIL | " + test.prettyPath + " | " + badPref + " not known or wrong type\n"); ++gTestResults.UnexpectedFail; } Index: firefox-trunk-29.0~a1~hg20140114r163402/layout/tools/reftest/runreftest.py =================================================================== --- firefox-trunk-29.0~a1~hg20140114r163402.orig/layout/tools/reftest/runreftest.py 2014-01-15 12:56:28.534095520 +0000 +++ firefox-trunk-29.0~a1~hg20140114r163402/layout/tools/reftest/runreftest.py 2014-01-15 12:56:28.530095520 +0000 @@ -137,6 +137,15 @@ reftestlist = self.getManifestPath(testPath) if cmdlineArgs == None: cmdlineArgs = ['-reftest', reftestlist] + xunitName = "reftest" + testsRootDir = None + if options.xunitFile != None: + if options.testsRootDir == None: + print "Error: Need to specify the root test directory when outputting xunit results" + sys.exit(1) + if options.xunitName != None: + xunitName = options.xunitName + testsRootDir = "file://" + os.path.abspath(options.testsRootDir) profile = self.createReftestProfile(options, reftestlist) profileDir = profile.profile # name makes more sense @@ -152,7 +161,10 @@ symbolsPath=options.symbolsPath, # give the JS harness 30 seconds to deal # with its own timeouts - timeout=options.timeout + 30.0) + timeout=options.timeout + 30.0, + xunitFile=options.xunitFile, + xunitName=xunitName, + xunitRoot=testsRootDir) processLeakLog(self.leakLogFile, options.leakThreshold) self.automation.log.info("\nREFTEST INFO | runreftest.py | Running tests: end.") finally: @@ -271,6 +283,11 @@ "Defaults to `all'.") defaults["focusFilterMode"] = "all" + self.add_option("--tests-root-dir", + action = "store", type = "string", dest = "testsRootDir", + help = "specify the root directory of the tests") + defaults["testsRootDir"] = None + self.set_defaults(**defaults) def verifyCommonOptions(self, options, reftest): Index: firefox-trunk-29.0~a1~hg20140114r163402/testing/mochitest/runtests.py =================================================================== --- firefox-trunk-29.0~a1~hg20140114r163402.orig/testing/mochitest/runtests.py 2014-01-15 12:56:28.534095520 +0000 +++ firefox-trunk-29.0~a1~hg20140114r163402/testing/mochitest/runtests.py 2014-01-15 12:59:06.470098487 +0000 @@ -941,6 +941,28 @@ return status + def getXunitParams(self, options): + if options.a11y: + xunitRoot = "chrome://mochitests/content/a11y" + xunitName = "mochitest.a11y" + elif options.browserChrome: + xunitRoot = "chrome://mochitests/content/browser" + xunitName = "mochitest.browser" + elif options.chrome: + xunitRoot = "chrome://mochitests/content/chrome" + xunitName = "mochitest.chrome" + elif options.ipcplugins: + xunitRoot = os.path.join("/" + self.TEST_PATH, "dom/plugins/test") + xunitName = "mochitest.ipcplugins" + else: + xunitRoot = "/" + self.TEST_PATH + xunitName = "mochitest.plain" + + if options.xunitName != None: + xunitName = options.xunitName + + return (xunitName, xunitRoot) + def runTests(self, options, onLaunch=None): """ Prepare, configure, run tests and cleanup """ @@ -1009,6 +1031,8 @@ if options.vmwareRecording: self.startVMwareRecording(options); + (xunitName, xunitRoot) = self.getXunitParams(options) + log.info("runtests.py | Running tests: start.\n") try: status = self.runApp(testURL, @@ -1024,7 +1048,10 @@ timeout=timeout, onLaunch=onLaunch, webapprtChrome=options.webapprtChrome, - hide_subtests=options.hide_subtests + hide_subtests=options.hide_subtests, + xunitFile=options.xunitFile, + xunitName=xunitName, + xunitRoot=xunitRoot ) except KeyboardInterrupt: log.info("runtests.py | Received keyboard interrupt.\n"); debian/patches/dont-include-hyphenation-patterns.patch0000664000000000000000000000154112321600535020405 0ustar Description: Don't bundle our own hyphenation patterns Author: Chris Coulson Forwarded: not-needed Bug-Ubuntu: https://launchpad.net/bugs/894166 Index: firefox-trunk-21.0~a1~hg20130213r121727/browser/installer/package-manifest.in =================================================================== --- firefox-trunk-21.0~a1~hg20130213r121727.orig/browser/installer/package-manifest.in 2013-02-14 02:06:50.000000000 +0000 +++ firefox-trunk-21.0~a1~hg20130213r121727/browser/installer/package-manifest.in 2013-02-14 21:38:06.789965559 +0000 @@ -39,7 +39,7 @@ @BINPATH@/browser/defaults/profile/localstore.rdf @BINPATH@/browser/defaults/profile/mimeTypes.rdf @BINPATH@/dictionaries/* -@BINPATH@/hyphenation/* +; @BINPATH@/hyphenation/* @BINPATH@/browser/@PREF_DIR@/firefox-l10n.js @BINPATH@/browser/searchplugins/* #ifdef XP_WIN32 debian/patches/webapprt-support-for-langpacks.patch0000664000000000000000000000145012321600535017720 0ustar Index: firefox-trunk-16.0~a1~hg20120702r98108/browser/locales/generic/install.rdf =================================================================== --- firefox-trunk-16.0~a1~hg20120702r98108.orig/browser/locales/generic/install.rdf 2012-07-02 11:00:54.000000000 +0100 +++ firefox-trunk-16.0~a1~hg20120702r98108/browser/locales/generic/install.rdf 2012-07-02 18:39:31.579194413 +0100 @@ -26,5 +26,13 @@ @MOZ_APP_MAXVERSION@ + + + + webapprt@mozilla.org + @MOZ_APP_VERSION@ + @MOZ_APP_MAXVERSION@ + + debian/patches/dont-override-general-useragent-locale.patch0000664000000000000000000000212412321600535021260 0ustar Index: firefox-trunk-23.0~a1~hg20130411r128458/browser/app/profile/firefox.js =================================================================== --- firefox-trunk-23.0~a1~hg20130411r128458.orig/browser/app/profile/firefox.js 2013-04-12 10:33:18.539345566 +0100 +++ firefox-trunk-23.0~a1~hg20130411r128458/browser/app/profile/firefox.js 2013-04-12 10:33:18.535345566 +0100 @@ -211,7 +211,6 @@ pref("keyword.enabled", true); -pref("general.useragent.locale", "@AB_CD@"); pref("general.skins.selectedSkin", "classic/1.0"); pref("general.smoothScroll", true); Index: firefox-trunk-23.0~a1~hg20130411r128458/browser/locales/en-US/firefox-l10n.js =================================================================== --- firefox-trunk-23.0~a1~hg20130411r128458.orig/browser/locales/en-US/firefox-l10n.js 2013-04-12 10:33:18.539345566 +0100 +++ firefox-trunk-23.0~a1~hg20130411r128458/browser/locales/en-US/firefox-l10n.js 2013-04-12 10:33:18.535345566 +0100 @@ -3,5 +3,3 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. #filter substitution - -pref("general.useragent.locale", "@AB_CD@"); debian/patches/allow-lockPref-everywhere.patch0000664000000000000000000001213212321600535016700 0ustar Description: Allow use of lockPref in all preference files Author: Alexander Sack Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=467738 Forwarded: https://bugzilla.mozilla.org/attachment.cgi?id=351145 --- modules/libpref/src/prefapi.cpp | 5 ++++- modules/libpref/src/prefapi.h | 3 ++- modules/libpref/src/prefread.cpp | 11 ++++++++--- modules/libpref/src/prefread.h | 4 +++- 4 files changed, 17 insertions(+), 6 deletions(-) Index: firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefread.cpp =================================================================== --- firefox-trunk-28.0~a1~hg20131028r152546.orig/modules/libpref/src/prefread.cpp 2013-10-29 16:48:30.278670289 +0000 +++ firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefread.cpp 2013-10-29 16:48:30.278670289 +0000 @@ -43,6 +43,7 @@ #define BITS_PER_HEX_DIGIT 4 static const char kUserPref[] = "user_pref"; +static const char kLockPref[] = "lockPref"; static const char kPref[] = "pref"; static const char kTrue[] = "true"; static const char kFalse[] = "false"; @@ -129,7 +130,7 @@ default: break; } - (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault); + (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault, ps->flock); return true; } @@ -188,6 +189,7 @@ ps->vb = nullptr; ps->vtype = PREF_INVALID; ps->fdefault = false; + ps->flock = false; } switch (c) { case '/': /* begin comment block or line? */ @@ -198,7 +200,9 @@ break; case 'u': /* indicating user_pref */ case 'p': /* indicating pref */ - ps->smatch = (c == 'u' ? kUserPref : kPref); + case 'l': /* indicating lockPref */ + ps->smatch = (c == 'u' ? kUserPref : + (c == 'p' ? kPref : kLockPref)); ps->sindex = 1; ps->nextstate = PREF_PARSE_UNTIL_OPEN_PAREN; state = PREF_PARSE_MATCH_STRING; @@ -242,7 +246,8 @@ /* name parsing */ case PREF_PARSE_UNTIL_NAME: if (c == '\"' || c == '\'') { - ps->fdefault = (ps->smatch == kPref); + ps->fdefault = (ps->smatch != kUserPref); + ps->flock = (ps->smatch == kLockPref); ps->quotechar = c; ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */ state = PREF_PARSE_QUOTED_STRING; Index: firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefread.h =================================================================== --- firefox-trunk-28.0~a1~hg20131028r152546.orig/modules/libpref/src/prefread.h 2013-10-29 16:48:30.278670289 +0000 +++ firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefread.h 2013-10-29 16:48:30.278670289 +0000 @@ -31,7 +31,8 @@ const char *pref, PrefValue val, PrefType type, - bool defPref); + bool defPref, + bool lockPref); /* structure fields are private */ typedef struct PrefParseState { @@ -52,6 +53,7 @@ char *vb; /* value buffer (ptr into lb) */ PrefType vtype; /* PREF_STRING,INT,BOOL */ bool fdefault; /* true if (default) pref */ + bool flock; /* PR_TRUE if pref to be locked */ } PrefParseState; /** Index: firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefapi.h =================================================================== --- firefox-trunk-28.0~a1~hg20131028r152546.orig/modules/libpref/src/prefapi.h 2013-10-29 16:48:30.278670289 +0000 +++ firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefapi.h 2013-10-29 16:48:30.278670289 +0000 @@ -178,7 +178,8 @@ const char *pref, PrefValue value, PrefType type, - bool isDefault); + bool isDefault, + bool isLocked); #ifdef __cplusplus } Index: firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefapi.cpp =================================================================== --- firefox-trunk-28.0~a1~hg20131028r152546.orig/modules/libpref/src/prefapi.cpp 2013-10-29 16:48:30.278670289 +0000 +++ firefox-trunk-28.0~a1~hg20131028r152546/modules/libpref/src/prefapi.cpp 2013-10-29 16:48:30.278670289 +0000 @@ -988,7 +988,10 @@ const char *pref, PrefValue value, PrefType type, - bool isDefault) + bool isDefault, + bool isLocked) { pref_HashPref(pref, value, type, isDefault ? kPrefSetDefault : kPrefForceSet); + if (isLocked) + PREF_LockPref(pref, true); } debian/patches/fix-broken-langpack-install-manifests.patch0000664000000000000000000000300512321600535021110 0ustar Index: firefox-23.0~a2~hg20130622r138786/l10n/csb/toolkit/defines.inc =================================================================== --- firefox-23.0~a2~hg20130622r138786.orig/l10n/csb/toolkit/defines.inc 2013-06-23 09:35:59.000000000 +0100 +++ firefox-23.0~a2~hg20130622r138786/l10n/csb/toolkit/defines.inc 2013-06-23 22:57:08.000000000 +0100 @@ -1,2 +1 @@ #define MOZ_LANG_TITLE Kashubian (CSB) - Index: firefox-23.0~a2~hg20130622r138786/l10n/bg/browser/defines.inc =================================================================== --- firefox-23.0~a2~hg20130622r138786.orig/l10n/bg/browser/defines.inc 2013-06-23 09:34:14.000000000 +0100 +++ firefox-23.0~a2~hg20130622r138786/l10n/bg/browser/defines.inc 2013-06-23 22:58:40.129889400 +0100 @@ -1,8 +1,9 @@ -# 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 emptyLines +#filter emptyLines + #define MOZ_LANGPACK_CREATOR http://openfmi.net/projects/mozilla-bg # If non-English locales wish to credit multiple contributors, uncomment this # variable definition and use the format specified. #define MOZ_LANGPACK_CONTRIBUTORS Огнян Кулев Митко Митев Златко Попов Милен Иванов -#unfilter emptyLines \ No newline at end of file +#unfilter emptyLines debian/patches/test-fixes/0000775000000000000000000000000012321600535012707 5ustar debian/patches/test-fixes/xpcshell-chrome-fix-test_bug848297-with-locale-matchOS.patch0000664000000000000000000000140512321600535025673 0ustar Description: Disable intl.locale.matchOS, as it breaks this test Author: Chris Coulson Forwarded: no Index: firefox-trunk-23.0~a1~hg20130508r131030/chrome/test/unit/test_bug848297.js =================================================================== --- firefox-trunk-23.0~a1~hg20130508r131030.orig/chrome/test/unit/test_bug848297.js 2013-05-08 03:07:31.000000000 +0100 +++ firefox-trunk-23.0~a1~hg20130508r131030/chrome/test/unit/test_bug848297.js 2013-05-08 20:46:07.778086675 +0100 @@ -32,6 +32,8 @@ function run_test() { + prefService.setBoolPref("intl.locale.matchOS", false); + // without override prefService.setCharPref("general.useragent.locale", "de"); do_check_eq(chromeReg.getSelectedLocale("basepack"), "en-US"); debian/patches/test-fixes/xpcshell-xunit-output-no-bell.patch0000664000000000000000000000153312321600535021605 0ustar Description: Clean the terminal bell character from the test output, as this breaks Jenkins Author: Chris Coulson Forwarded: no Index: firefox-trunk-22.0~a1~hg20130314r124794/testing/xpcshell/runxpcshelltests.py =================================================================== --- firefox-trunk-22.0~a1~hg20130314r124794.orig/testing/xpcshell/runxpcshelltests.py 2013-03-15 11:07:36.353751094 +0000 +++ firefox-trunk-22.0~a1~hg20130314r124794/testing/xpcshell/runxpcshelltests.py 2013-03-15 11:10:15.865757647 +0000 @@ -538,6 +538,7 @@ cdata = "" cdata = cdata.replace("]]>", "]] >") + cdata = cdata.replace("\x07", "") text = doc.createCDATASection(cdata) failure.appendChild(text) testcase.appendChild(failure) debian/patches/test-fixes/xpcshell-search-fix-tests-when-plugins-are-not-in-appdir.patch0000664000000000000000000001104212321600535026601 0ustar Description: Fix test_json_cache.js to work when search plugins aren't installed in to the application searchplugin directory Author: Chris Coulson Forwarded: no Index: firefox-trunk-24.0~a1~hg20130623r136205/toolkit/components/search/tests/xpcshell/test_json_cache.js =================================================================== --- firefox-trunk-24.0~a1~hg20130623r136205.orig/toolkit/components/search/tests/xpcshell/test_json_cache.js 2013-06-24 03:18:15.000000000 +0100 +++ firefox-trunk-24.0~a1~hg20130623r136205/toolkit/components/search/tests/xpcshell/test_json_cache.js 2013-06-26 10:15:15.605897301 +0100 @@ -31,7 +31,7 @@ return _dirSvc.get(aKey, aIFace || Ci.nsIFile); } -let cacheTemplate, appPluginsPath, profPlugins; +let cacheTemplate, appPluginsPaths, profPlugins; /** * Test reading from search.json @@ -54,12 +54,19 @@ let engineTemplateFile = do_get_file("data/engine.xml"); engineTemplateFile.copyTo(engineFile.parent, "test-search-engine.xml"); - // Add the app's searchplugins directory to the cache so it won't be ignored. - let appSearchPlugins = getDir(NS_APP_SEARCH_DIR); - appPluginsPath = appSearchPlugins.path; - cacheTemplate.directories[appPluginsPath] = {}; - cacheTemplate.directories[appPluginsPath].lastModifiedTime = appSearchPlugins.lastModifiedTime; - cacheTemplate.directories[appPluginsPath].engines = []; + // Add the app's searchplugins directoresy to the cache so they won't be ignored. + appPluginsPaths = []; + let searchPluginsDirList = getDir(NS_APP_SEARCH_DIR_LIST, Ci.nsISimpleEnumerator); + while (searchPluginsDirList.hasMoreElements()) { + let d = searchPluginsDirList.getNext().QueryInterface(Ci.nsIFile); + if (d.path != engineFile.parent.path && d.directoryEntries.hasMoreElements()) { + let path = d.path; + appPluginsPaths.push(path); + cacheTemplate.directories[path] = {}; + cacheTemplate.directories[path].lastModifiedTime = d.lastModifiedTime; + cacheTemplate.directories[path].engines = []; + } + } // Replace the profile placeholder with the correct path. profPlugins = engineFile.parent.path; @@ -163,8 +170,10 @@ // Check that the search.json cache matches the template let cacheWritten = readJSONFile(cache); - // Delete the app search plugins directory from the template since it's not currently written out. - delete cacheTemplate.directories[appPluginsPath]; + // Delete the app search plugins directories from the template since they're not currently written out. + for each (let path in appPluginsPaths) { + delete cacheTemplate.directories[path]; + } do_print("Check search.json"); isSubObjectOf(cacheTemplate, cacheWritten); Index: firefox-trunk-24.0~a1~hg20130623r136205/toolkit/components/search/tests/xpcshell/head_search.js =================================================================== --- firefox-trunk-24.0~a1~hg20130623r136205.orig/toolkit/components/search/tests/xpcshell/head_search.js 2013-06-24 03:18:14.000000000 +0100 +++ firefox-trunk-24.0~a1~hg20130623r136205/toolkit/components/search/tests/xpcshell/head_search.js 2013-06-26 10:17:17.269899256 +0100 @@ -10,6 +10,7 @@ const BROWSER_SEARCH_PREF = "browser.search."; const NS_APP_SEARCH_DIR = "SrchPlugns"; +const NS_APP_SEARCH_DIR_LIST = "SrchPluginsDL"; const MODE_RDONLY = FileUtils.MODE_RDONLY; const MODE_WRONLY = FileUtils.MODE_WRONLY; @@ -19,6 +20,40 @@ // Need to create and register a profile folder. var gProfD = do_get_profile(); +// We register this to make the browser directory provider work +// correctly for NS_APP_SEARCH_DIR_LIST. This is necessary when +// the default plugins are in distribution/searchplugins rather +// than the application directory +Services.dirsvc.registerProvider({ + QueryInterface: function(iid) { + if (iid.equals(Ci.nsISupports) || + iid.equals(Ci.nsIDirectoryServiceProvider2) || + iid.equals(Ci.nsIDirectoryServiceProvider)) { + return this; + } + + throw Cr.NS_ERROR_NO_INTERFACE; + }, + + getFiles: function(prop) { + if (prop == "XREExtDL") { + return { + QueryInterface: function(iid) { + if (iid.equals(Ci.nsISupports) || + iid.equals(Ci.nsISimpleEnumerator)) { + return this; + } + + throw Cr.NS_ERROR_NO_INTERFACE; + }, + + hasMoreElements: function() { return false; }, + getNext: function() { throw Cr.NS_ERROR_FAILURE; } + }; + } + } +}); + function dumpn(text) { dump("search test: " + text + "\n"); debian/patches/test-fixes/mochitest-content-reset-permissions-when-done.patch0000664000000000000000000000173612321600535024761 0ustar Description: Remove permissions set earlier in test_messagemanager_assertpermission.html to prevent failures in subsequent tests Author: Chris Coulson Forwarded: no Index: firefox-trunk-19.0~a1~hg20121114r113217/content/base/test/test_messagemanager_assertpermission.html =================================================================== --- firefox-trunk-19.0~a1~hg20121114r113217.orig/content/base/test/test_messagemanager_assertpermission.html 2012-11-14 21:07:28.000000000 +0000 +++ firefox-trunk-19.0~a1~hg20121114r113217/content/base/test/test_messagemanager_assertpermission.html 2012-11-20 21:30:39.057447271 +0000 @@ -172,6 +172,8 @@ function tearDown() { SpecialPowers.clearUserPref("dom.mozBrowserFramesEnabled"); SpecialPowers.clearUserPref("dom.ipc.browser_frames.oop_by_default"); + SpecialPowers.removePermission("browser", location.href); + SpecialPowers.removePermission("embed-apps", location.href); SimpleTest.finish(); } debian/patches/test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch0000664000000000000000000000475612321600535023544 0ustar Description: Fix uriloader/exthandler xpcshell tests to not write to the application directory Author: Chris Coulson Forwarded: no Index: firefox-trunk-19.0~a1~hg20121114r113217/uriloader/exthandler/tests/unit/head_handlerService.js =================================================================== --- firefox-trunk-19.0~a1~hg20121114r113217.orig/uriloader/exthandler/tests/unit/head_handlerService.js 2012-11-14 21:08:42.000000000 +0000 +++ firefox-trunk-19.0~a1~hg20121114r113217/uriloader/exthandler/tests/unit/head_handlerService.js 2012-11-16 15:33:08.455818000 +0000 @@ -47,6 +47,9 @@ // Initialization & Destruction init: function HandlerServiceTest_init() { + // Get a temporary profile + do_get_profile(); + // Register ourselves as a directory provider for the datasource file // if there isn't one registered already. try { @@ -56,11 +59,6 @@ this._providerRegistered = true; } - // Delete the existing datasource file, if any, so we start from scratch. - // We also do this after finishing the tests, so there shouldn't be an old - // file lying around, but just in case we delete it here as well. - this._deleteDatasourceFile(); - // Turn on logging so we can troubleshoot problems with the tests. var prefBranch = Cc["@mozilla.org/preferences-service;1"]. getService(Ci.nsIPrefBranch); @@ -68,9 +66,6 @@ }, destroy: function HandlerServiceTest_destroy() { - // Delete the existing datasource file, if any, so we don't leave test files - // lying around and we start from scratch the next time. - this._deleteDatasourceFile(); // Unregister the directory service provider if (this._providerRegistered) this._dirSvc.unregisterProvider(this); @@ -86,7 +81,7 @@ persistent.value = true; if (property == "UMimTyp") { - var datasourceFile = this._dirSvc.get("CurProcD", Ci.nsIFile); + var datasourceFile = this._dirSvc.get("ProfD", Ci.nsIFile); datasourceFile.append("mimeTypes.rdf"); return datasourceFile; } @@ -105,15 +100,6 @@ // Utilities /** - * Delete the datasource file. - */ - _deleteDatasourceFile: function HandlerServiceTest__deleteDatasourceFile() { - var file = this._dirSvc.get("UMimTyp", Ci.nsIFile); - if (file.exists()) - file.remove(false); - }, - - /** * Get the contents of the datasource as a serialized string. Useful for * debugging problems with test failures, i.e.: * debian/patches/no_neon_on_arm.patch0000664000000000000000000001005512321600535014624 0ustar Index: firefox-trunk-26.0~a1~hg20130911r146458/build/autoconf/arch.m4 =================================================================== --- firefox-trunk-26.0~a1~hg20130911r146458.orig/build/autoconf/arch.m4 2013-09-11 03:12:17.000000000 +0100 +++ firefox-trunk-26.0~a1~hg20130911r146458/build/autoconf/arch.m4 2013-09-11 12:51:34.977008568 +0100 @@ -197,28 +197,28 @@ ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]]*\).*/\1/p'` AC_MSG_RESULT("$ARM_ARCH") - AC_MSG_CHECKING(for ARM NEON support in compiler) - # We try to link so that this also fails when - # building with LTO. - AC_TRY_LINK([], - [asm(".fpu neon\n vadd.i8 d0, d0, d0");], - result="yes", result="no") - AC_MSG_RESULT("$result") - if test "$result" = "yes"; then - AC_DEFINE(HAVE_ARM_NEON) - HAVE_ARM_NEON=1 - - dnl We don't need to build NEON support if we're targetting a non-NEON device. - dnl This matches media/webrtc/trunk/webrtc/build/common.gypi. - if test -n "$ARM_ARCH"; then - if test "$ARM_ARCH" -lt 7; then - BUILD_ARM_NEON= - else - AC_DEFINE(BUILD_ARM_NEON) - BUILD_ARM_NEON=1 - fi - fi - fi + #AC_MSG_CHECKING(for ARM NEON support in compiler) + ## We try to link so that this also fails when + ## building with LTO. + #AC_TRY_LINK([], + # [asm(".fpu neon\n vadd.i8 d0, d0, d0");], + # result="yes", result="no") + #AC_MSG_RESULT("$result") + #if test "$result" = "yes"; then + # AC_DEFINE(HAVE_ARM_NEON) + # HAVE_ARM_NEON=1 + # + # dnl We don't need to build NEON support if we're targetting a non-NEON device. + # dnl This matches media/webrtc/trunk/webrtc/build/common.gypi. + # if test -n "$ARM_ARCH"; then + # if test "$ARM_ARCH" -lt 7; then + # BUILD_ARM_NEON= + # else + # AC_DEFINE(BUILD_ARM_NEON) + # BUILD_ARM_NEON=1 + # fi + # fi + #fi fi # CPU_ARCH = arm Index: firefox-trunk-26.0~a1~hg20130911r146458/js/src/build/autoconf/arch.m4 =================================================================== --- firefox-trunk-26.0~a1~hg20130911r146458.orig/js/src/build/autoconf/arch.m4 2013-09-11 03:16:14.000000000 +0100 +++ firefox-trunk-26.0~a1~hg20130911r146458/js/src/build/autoconf/arch.m4 2013-09-11 12:51:48.913008716 +0100 @@ -197,28 +197,28 @@ ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]]*\).*/\1/p'` AC_MSG_RESULT("$ARM_ARCH") - AC_MSG_CHECKING(for ARM NEON support in compiler) - # We try to link so that this also fails when - # building with LTO. - AC_TRY_LINK([], - [asm(".fpu neon\n vadd.i8 d0, d0, d0");], - result="yes", result="no") - AC_MSG_RESULT("$result") - if test "$result" = "yes"; then - AC_DEFINE(HAVE_ARM_NEON) - HAVE_ARM_NEON=1 - - dnl We don't need to build NEON support if we're targetting a non-NEON device. - dnl This matches media/webrtc/trunk/webrtc/build/common.gypi. - if test -n "$ARM_ARCH"; then - if test "$ARM_ARCH" -lt 7; then - BUILD_ARM_NEON= - else - AC_DEFINE(BUILD_ARM_NEON) - BUILD_ARM_NEON=1 - fi - fi - fi + #AC_MSG_CHECKING(for ARM NEON support in compiler) + ## We try to link so that this also fails when + ## building with LTO. + #AC_TRY_LINK([], + # [asm(".fpu neon\n vadd.i8 d0, d0, d0");], + # result="yes", result="no") + #AC_MSG_RESULT("$result") + #if test "$result" = "yes"; then + # AC_DEFINE(HAVE_ARM_NEON) + # HAVE_ARM_NEON=1 + # + # dnl We don't need to build NEON support if we're targetting a non-NEON device. + # dnl This matches media/webrtc/trunk/webrtc/build/common.gypi. + # if test -n "$ARM_ARCH"; then + # if test "$ARM_ARCH" -lt 7; then + # BUILD_ARM_NEON= + # else + # AC_DEFINE(BUILD_ARM_NEON) + # BUILD_ARM_NEON=1 + # fi + # fi + #fi fi # CPU_ARCH = arm debian/patches/ubuntu-ua-string-changes.patch0000664000000000000000000000613612321600535016502 0ustar Description: Add "Ubuntu" to the platform part of the UA string Author: Chris Coulson Forwarded: not-needed Index: firefox-trunk-28.0~a1~hg20131205r159037/netwerk/protocol/http/nsHttpHandler.cpp =================================================================== --- firefox-trunk-28.0~a1~hg20131205r159037.orig/netwerk/protocol/http/nsHttpHandler.cpp 2013-12-06 10:38:35.687052298 +0000 +++ firefox-trunk-28.0~a1~hg20131205r159037/netwerk/protocol/http/nsHttpHandler.cpp 2013-12-06 10:38:35.683052298 +0000 @@ -174,6 +174,9 @@ , mLegacyAppName("Mozilla") , mLegacyAppVersion("5.0") , mProduct("Gecko") +#ifdef MOZ_UA_VENDOR + , mVendor(MOZ_UA_VENDOR) +#endif , mUserAgentIsDirty(true) , mUseCache(true) , mPromptTempRedirect(true) @@ -333,6 +336,9 @@ LOG(("> misc = %s\n", mMisc.get())); LOG(("> product = %s\n", mProduct.get())); LOG(("> product-sub = %s\n", mProductSub.get())); +#ifdef MOZ_UA_VENDOR + LOG(("> vendor = %s\n", mVendor.get())); +#endif LOG(("> app-name = %s\n", mAppName.get())); LOG(("> app-version = %s\n", mAppVersion.get())); LOG(("> compat-firefox = %s\n", mCompatFirefox.get())); @@ -609,7 +615,10 @@ mAppVersion.Length() + mCompatFirefox.Length() + mCompatDevice.Length() + - 13); +#ifdef MOZ_UA_VENDOR + mVendor.Length() + +#endif + 15); // Application portion mUserAgent.Assign(mLegacyAppName); @@ -625,6 +634,10 @@ mUserAgent.AppendLiteral("; "); } #endif +#ifdef MOZ_UA_VENDOR + mUserAgent += mVendor; + mUserAgent.AppendLiteral("; "); +#endif if (!mCompatDevice.IsEmpty()) { mUserAgent += mCompatDevice; mUserAgent.AppendLiteral("; "); Index: firefox-trunk-28.0~a1~hg20131205r159037/netwerk/protocol/http/nsHttpHandler.h =================================================================== --- firefox-trunk-28.0~a1~hg20131205r159037.orig/netwerk/protocol/http/nsHttpHandler.h 2013-12-06 10:38:35.687052298 +0000 +++ firefox-trunk-28.0~a1~hg20131205r159037/netwerk/protocol/http/nsHttpHandler.h 2013-12-06 10:38:35.683052298 +0000 @@ -380,6 +380,7 @@ // useragent components nsCString mLegacyAppName; nsCString mLegacyAppVersion; + nsCString mVendor; nsCString mPlatform; nsCString mOscpu; nsCString mMisc; Index: firefox-trunk-28.0~a1~hg20131205r159037/netwerk/protocol/http/Makefile.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-28.0~a1~hg20131205r159037/netwerk/protocol/http/Makefile.in 2013-12-06 10:53:24.699060545 +0000 @@ -0,0 +1,9 @@ +# 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 $(topsrcdir)/config/rules.mk + +ifdef MOZ_UA_VENDOR +DEFINES += -DMOZ_UA_VENDOR=\""$(MOZ_UA_VENDOR)"\" +endif debian/patches/series0000664000000000000000000000223012321600535012026 0ustar ubuntu-bookmarks.patch normalize-distribution-searchplugins.patch allow-lockPref-everywhere.patch ubuntu-ua-string-changes.patch dont-include-hyphenation-patterns.patch dont-override-general-useragent-locale.patch webapprt-support-for-langpacks.patch no_neon_on_arm.patch unity-menubar.patch test-integration/automation-output-junit-xml.patch test-integration/mochitest-allow-test-manifest-for-browser-chrome.patch fix-broken-langpack-install-manifests.patch test-integration/xpcshell-output-valid-junit-xml.patch test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch test-fixes/mochitest-content-reset-permissions-when-done.patch test-integration/xpcshell-disable-addon-select-dialog-test-for-adt.patch test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch test-overrides/disable-failing-python-tests.patch test-fixes/xpcshell-xunit-output-no-bell.patch test-fixes/xpcshell-search-fix-tests-when-plugins-are-not-in-appdir.patch test-integration/xpcshell-dont-return-nonzero-on-test-failure.patch test-fixes/xpcshell-chrome-fix-test_bug848297-with-locale-matchOS.patch test-integration/xpcshell-write-time-for-failed-test.patch aarch64-support.patch debian/patches/ubuntu-bookmarks.patch0000664000000000000000000003045412321600535015153 0ustar Description: Customize the default bookmarks for Ubuntu Author: Alexander Sack Forwarded: not-needed Index: firefox-trunk-24.0~a1~hg20130531r133602/browser/components/places/tests/unit/head_bookmarks.js =================================================================== --- firefox-trunk-24.0~a1~hg20130531r133602.orig/browser/components/places/tests/unit/head_bookmarks.js 2013-06-01 07:19:38.533456655 +0100 +++ firefox-trunk-24.0~a1~hg20130531r133602/browser/components/places/tests/unit/head_bookmarks.js 2013-06-01 07:19:38.525456655 +0100 @@ -68,4 +68,4 @@ // Default bookmarks constants. const DEFAULT_BOOKMARKS_ON_TOOLBAR = 1; -const DEFAULT_BOOKMARKS_ON_MENU = 1; +const DEFAULT_BOOKMARKS_ON_MENU = 2; Index: firefox-trunk-24.0~a1~hg20130531r133602/browser/locales/generic/profile/bookmarks.html.in =================================================================== --- firefox-trunk-24.0~a1~hg20130531r133602.orig/browser/locales/generic/profile/bookmarks.html.in 2013-06-01 07:03:22.000000000 +0100 +++ firefox-trunk-24.0~a1~hg20130531r133602/browser/locales/generic/profile/bookmarks.html.in 2013-06-01 07:25:24.441460335 +0100 @@ -17,6 +17,16 @@

@getting_started@

+

Ubuntu and Free Software links

+
Information and resources about Ubuntu, Debian and Free Software in general +

+

Ubuntu +
Ubuntu Wiki (community-edited website) +
Make a Support Request to the Ubuntu Community +
Debian (Ubuntu is based on Debian) +
Ubuntu One - The personal cloud that brings your digital life together +
+

@firefox_heading@

@firefox_help@ debian/pkgconfig/0000775000000000000000000000000012321600535011134 5ustar debian/pkgconfig/mozilla-plugin.pc.in0000664000000000000000000000025712321600535015034 0ustar prefix=/usr sdkdir=/@MOZ_SDKDIR@ includedir=/@MOZ_INCDIR@ Name: Mozilla Plug-In API Description: Firefox Plug-In API Version: @MOZ_VERSION@ Cflags: -I${includedir} -DXP_UNIX debian/tests/0000775000000000000000000000000012321600551010325 5ustar debian/tests/mochitest-30000775000000000000000000000057512321600535012423 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-plain-3.xml --chunk-by-dir 4 --total-chunks 5 --this-chunk 3 --xunit-name 'mochitest.plain.3' debian/tests/control0000664000000000000000000000037012321600535011732 0ustar Tests: xpcshell-tests xpcshell-package-tests jstestbrowser reftest crashtest mochitest-1 mochitest-2 mochitest-3 mochitest-4 mochitest-5 mochitest-browser mochitest-chrome mochitest-a11y mochitest-ipcplugins post-process Depends: firefox-testsuite debian/tests/mochitest-20000775000000000000000000000057512321600535012422 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-plain-2.xml --chunk-by-dir 4 --total-chunks 5 --this-chunk 2 --xunit-name 'mochitest.plain.2' debian/tests/mochitest-ipcplugins0000775000000000000000000000062712321600535014434 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-ipcplugins.xml --xunit-name "mochitest.ipcplugins" --setpref=dom.ipc.plugins.enabled=false --test-path=dom/plugins/test debian/tests/mochitest-10000775000000000000000000000057512321600535012421 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-plain-1.xml --chunk-by-dir 4 --total-chunks 5 --this-chunk 1 --xunit-name 'mochitest.plain.1' debian/tests/control.in0000664000000000000000000000037712321600535012346 0ustar Tests: xpcshell-tests xpcshell-package-tests jstestbrowser reftest crashtest mochitest-1 mochitest-2 mochitest-3 mochitest-4 mochitest-5 mochitest-browser mochitest-chrome mochitest-a11y mochitest-ipcplugins post-process Depends: @MOZ_PKG_NAME@-testsuite debian/tests/mochitest-40000775000000000000000000000057512321600535012424 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-plain-4.xml --chunk-by-dir 4 --total-chunks 5 --this-chunk 4 --xunit-name 'mochitest.plain.4' debian/tests/xpcshell-tests0000775000000000000000000000056112321600535013241 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_xpcshell_tests --own-session --xunit-file $TESTRESULTS_DIR/xpcshell-tests.xml --xunit-suite-name "xpcshell" --manifest xpcshell/tests/xpcshell.ini debian/tests/mochitest-browser0000775000000000000000000000050312321600535013733 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-browser-chrome.xml --browser-chrome debian/tests/mochitest-a11y0000775000000000000000000000045712321600535013033 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-a11y.xml --a11y debian/tests/crashtest0000775000000000000000000000055112321600535012256 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_reftest --own-session --xunit-file $TESTRESULTS_DIR/crashtest.xml --xunit-name "crashtest" reftest/tests/testing/crashtest/crashtests.list debian/tests/post-process0000775000000000000000000000042512321600535012717 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} $TESTSUITE_DIR/filter_results -d $TESTRESULTS_DIR -x post-process.xml -m $(dirname $0)/../testing/results-filter-manifest.json debian/tests/mochitest-50000775000000000000000000000057512321600535012425 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-plain-5.xml --chunk-by-dir 4 --total-chunks 5 --this-chunk 5 --xunit-name 'mochitest.plain.5' debian/tests/mochitest-chrome0000775000000000000000000000046312321600535013532 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_mochitest --own-session --xunit-file $TESTRESULTS_DIR/mochitest-chrome.xml --chrome debian/tests/xpcshell-package-tests0000775000000000000000000000062312321600535014631 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_xpcshell_tests --own-session --verbose --xunit-file $TESTRESULTS_DIR/xpcshell-package-tests.xml --xunit-suite-name "xpcshell.package" --manifest xpcshell/package-tests/xpcshell.ini debian/tests/reftest0000775000000000000000000000054012321600535011730 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_reftest --own-session --xunit-file $TESTRESULTS_DIR/reftest.xml --xunit-name "reftest" reftest/tests/layout/reftests/reftest.list debian/tests/jstestbrowser0000775000000000000000000000104412321600535013174 0ustar #!/bin/sh set -e TESTSUITE_DIR=/$($(dirname $0)/../rules echo-MOZ_LIBDIR 2>/dev/null)/testing TESTRESULTS_DIR=${ADTRESULTSDIR:-"/tmp/testresults"} export LC_ALL=en_US.UTF-8 # Required for js/src/trace-tests/sunspider/check-date-format-tofte.js export TZ=:/usr/share/zoneinfo/posix/US/Pacific mkdir -p $TESTRESULTS_DIR $TESTSUITE_DIR/run_reftest --own-session --xunit-file $TESTRESULTS_DIR/jstestbrowser.xml --xunit-name "jstestbrowser" --tests-root-dir jsreftest/tests --extra-profile-file=jsreftest/tests/user.js jsreftest/tests/jstests.list debian/firefox.sh.in0000664000000000000000000000631712321600535011577 0ustar #!/bin/sh set -e # Firefox launcher containing a Profile migration helper for # temporary profiles used during alpha and beta phases. # Authors: # Alexander Sack # Fabien Tassin # Steve Langasek # Chris Coulson # License: GPLv2 or later MOZ_LIBDIR=/@MOZ_LIBDIR@ MOZ_APP_LAUNCHER=`which $0` MOZ_APP_NAME=@MOZ_APP_NAME@ MOZ_DEFAULT_PROFILEDIR=@MOZ_DEFAULT_PROFILEDIR@ MOZ_PROFILEDIR=@MOZ_PROFILEDIR@ export MOZ_APP_LAUNCHER while [ ! -x $MOZ_LIBDIR/$MOZ_APP_NAME ] ; do if [ -L "$MOZ_APP_LAUNCHER" ] ; then MOZ_APP_LAUNCHER=`readlink -f $MOZ_APP_LAUNCHER` MOZ_LIBDIR=`dirname $MOZ_APP_LAUNCHER` else echo "Can't find $MOZ_LIBDIR/$MOZ_APP_NAME" exit 1 fi done usage () { $MOZ_LIBDIR/$MOZ_APP_NAME -h | sed -e 's,/.*/,,' echo echo " -g or --debug Start within debugger" echo " -d or --debugger Specify debugger to start with (eg, gdb or valgrind)" echo " -a or --debugger-args Specify arguments for debugger" } moz_debug=0 moz_debugger_args="" moz_debugger="gdb" while [ $# -gt 0 ]; do case "$1" in -h | --help ) usage exit 0 ;; -g | --debug ) moz_debug=1 shift ;; -d | --debugger) moz_debugger=$2; if [ "${moz_debugger}" != "" ]; then shift 2 else echo "-d requires an argument" exit 1 fi ;; -a | --debugger-args ) moz_debugger_args=$2; if [ "${moz_debugger_args}" != "" ] ; then shift 2 else echo "-a requires an argument" exit 1 fi ;; -- ) # Stop option processing shift break ;; * ) break ;; esac done %%if MOZ_PROFILEDIR != MOZ_DEFAULT_PROFILEDIR if [ $MOZ_PROFILEDIR != $MOZ_DEFAULT_PROFILEDIR ] && [ ! -e ${HOME}/${MOZ_PROFILEDIR} ] && [ -d ${HOME}/${MOZ_DEFAULT_PROFILEDIR} ] ; then cp -r ${HOME}/${MOZ_DEFAULT_PROFILEDIR} ${HOME}/${MOZ_PROFILEDIR} fi %%endif if [ $moz_debug -eq 1 ] ; then case $moz_debugger in memcheck) debugger="valgrind" ;; *) debugger=$moz_debugger ;; esac debugger=`which $debugger` if [ ! -x $debugger ] ; then echo "Invalid debugger" exit 1 fi case `basename $moz_debugger` in gdb) exec $debugger $moz_debugger_args --args $MOZ_LIBDIR/$MOZ_APP_NAME "$@" ;; memcheck) %%ifdef MOZ_VALGRIND export G_SLICE=always-malloc export G_DEBUG=gc-friendly exec $debugger -v --tool=memcheck --leak-check=full --smc-check=all-non-file $moz_debugger_args $MOZ_LIBDIR/$MOZ_APP_NAME "$@" %%else echo "$MOZ_APP_NAME has not been compiled with valgrind support" exit 1 %%endif ;; *) exec $debugger $moz_debugger_args $MOZ_LIBDIR/$MOZ_APP_NAME "$@" ;; esac else exec $MOZ_LIBDIR/$MOZ_APP_NAME "$@" fi debian/syspref.js0000664000000000000000000000024312321600535011215 0ustar // This file can be used to configure global preferences for Firefox // Example: Homepage //pref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); debian/compat0000664000000000000000000000000212321600535010363 0ustar 7 debian/firefox-testsuite.lintian-overrides.in0000664000000000000000000000012712321600535016643 0ustar @MOZ_PKG_NAME@-testsuite binary: symlink-is-self-recursive @MOZ_LIBDIR@/testing/bin .. debian/docs0000664000000000000000000000001312321600535010032 0ustar debian/MPL debian/control.langpacks0000664000000000000000000000045512321600535012536 0ustar Package: @MOZ_PKG_NAME@-locale-@LANGCODE@ Architecture: any Depends: ${misc:Depends} Replaces: language-pack-@LANGCODE@-base Conflicts: ${app:Conflicts} Provides: ${app:Provides} Description: @LANG@ language pack for Firefox This package contains @LANG@ translations and search plugins for Firefox debian/firefox.preinst.in0000664000000000000000000000761212321600535012650 0ustar #!/bin/sh set -e APP_DIR="/etc/apparmor.d" APP_PROFILE="usr.bin.@MOZ_PKG_NAME@" APP_CONFFILE="$APP_DIR/$APP_PROFILE" APP_DISABLE="$APP_DIR/disable/$APP_PROFILE" MOZ_PKG_NAME=@MOZ_PKG_NAME@ MOZ_ADDONDIR=/@MOZ_ADDONDIR@ MOZ_LIBDIR=/@MOZ_LIBDIR@ # Prepare to move a conffile without triggering a dpkg question prepare_mv_conffile() { local PKGNAME="$1" local CONFFILE="$2" [ -e "$CONFFILE" ] || return 0 local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \ sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" #' if [ "$md5sum" = "$old_md5sum" ]; then mv -f "$CONFFILE" "$CONFFILE.dpkg-remove" fi } prepare_rm_conffile() { local PACKAGE="$1" local CONFFILE="$2" [ -e "$CONFFILE" ] || return 0 local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PACKAGE | \ sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE.dpkg-backup" else echo "Moving obsolete conffile $CONFFILE out of the way..." mv -f "$CONFFILE" "$CONFFILE.dpkg-remove" fi } disable_profile() { # Create a symlink to the yet-to-be-unpacked profile if [ ! -e "$APP_CONFFILE" ]; then mkdir -p `dirname $APP_DISABLE` 2>/dev/null || true ln -sf $APP_CONFFILE $APP_DISABLE fi } if [ "$1" = "install" ] || [ "$1" = "upgrade" ] ; then # Unconditionally disable AppArmor profile for Ubuntu 9.04 and under, since # it requires abstractions found only in 9.10 and higher. major=`lsb_release -r | awk '{print $2}' | cut -d '.' -f 1` version=`lsb_release -r | awk '{print $2}'` if [ "$major" -lt 10 ] && [ "$version" != "9.10" ]; then disable_profile else if [ "$1" = "install" ]; then # Disable AppArmor profile on install, unless the last profile they # modified is enabled. base=`echo $APP_PROFILE | cut -d '-' -f 1` last_modified=`ls -rt $APP_DIR/$base* 2>/dev/null | grep -v '\.dpkg' | tail -n1` if [ -s "$last_modified" ]; then if [ -e "$APP_DIR/disable/`basename $last_modified`" ]; then disable_profile fi else # Fresh install and no other firefox profiles exist, so disable. disable_profile fi elif [ "$1" = "upgrade" ]; then # Disable AppArmor on upgrade from earlier than when we first shipped # the profile if the user does not already have a profile defined. if dpkg --compare-versions "$2" lt "3.7~a1~hg20091203" ; then disable_profile fi fi fi prepare_rm_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/profile/bookmarks.html" prepare_rm_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/profile/localstore.rdf" prepare_rm_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/profile/mimeTypes.rdf" prepare_rm_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/profile/prefs.js" prepare_rm_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/profile/chrome/userChrome-example.css" prepare_rm_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/profile/chrome/userContent-example.css" prepare_mv_conffile "${MOZ_PKG_NAME}" "/etc/${MOZ_PKG_NAME}/pref/firefox.js" # Keep until 12.04 is EOL # ${LIBDIR}/distribution was a symlink in 11.10 if [ -h ${MOZ_LIBDIR}/distribution ] ; then rm -f ${MOZ_LIBDIR}/distribution fi # Keep until 12.04 is EOL # This used to be a symlink if [ -h ${MOZ_LIBDIR}/distribution/searchplugins ]; then rm -f ${MOZ_LIBDIR}/distribution/searchplugins fi fi #DEBHELPER# debian/firefox.install.in0000664000000000000000000000271112321600535012625 0ustar # Everything under browser/ except for extensions/ (installed in to # MOZ_ADDONDIR) and searchplugins/ (installed in distribution/searchplugins) @MOZ_LIBDIR@/browser/chrome @MOZ_LIBDIR@/browser/components @MOZ_LIBDIR@/browser/icons @MOZ_LIBDIR@/browser/blocklist.xml @MOZ_LIBDIR@/browser/chrome.manifest @MOZ_LIBDIR@/browser/omni.ja # Everything under webapprt/ @MOZ_LIBDIR@/webapprt # GRE files (except for dictionaries/, which we symlink elsewhere) @MOZ_LIBDIR@/components/components.manifest @MOZ_LIBDIR@/components/lib*.so @MOZ_LIBDIR@/defaults @MOZ_LIBDIR@/omni.ja @MOZ_LIBDIR@/*.so @MOZ_LIBDIR@/*.ini @MOZ_LIBDIR@/chrome.manifest @MOZ_LIBDIR@/dependentlibs.list %%ifdef MOZ_ENABLE_BREAKPAD @MOZ_LIBDIR@/Throbber-small.gif %%endif # Binaries @MOZ_LIBDIR@/@MOZ_APP_NAME@ @MOZ_LIBDIR@/plugin-container @MOZ_LIBDIR@/webapprt-stub %%ifdef MOZ_ENABLE_BREAKPAD @MOZ_LIBDIR@/crashreporter %%endif debian/distribution.ini @MOZ_LIBDIR@/distribution @MOZ_LIBDIR@/browser/extensions/\{972ce4c6-7e08-4474-a285-3208198ce6fd\} @MOZ_ADDONDIR@/extensions debian/@MOZ_APP_NAME@.desktop usr/share/applications debian/apport/source_@MOZ_PKG_NAME@.py usr/share/apport/package-hooks/ debian/firefox.sh @MOZ_LIBDIR@ # Prefs debian/vendor-gre.js @MOZ_LIBDIR@/defaults/pref debian/vendor-firefox.js @MOZ_LIBDIR@/browser/defaults/preferences debian/vendor-webapprt.js @MOZ_LIBDIR@/webapprt/defaults/preferences debian/syspref.js etc/@MOZ_PKG_NAME@ debian/usr.bin.@MOZ_PKG_NAME@ etc/apparmor.d debian/control.in0000664000000000000000000001170212321600542011174 0ustar # vim:noexpandtab: Source: @MOZ_PKG_NAME@ Section: web Priority: optional Maintainer: Ubuntu Mozilla Team Vcs-Bzr: https://code.launchpad.net/~mozillateam/firefox/firefox.trusty Build-Depends: cdbs, locales, debhelper (>= 7), autotools-dev, autoconf2.13, quilt, zip, libx11-dev, libxt-dev, libxext-dev, libgtk2.0-dev (>= 2.14), libglib2.0-dev (>= 2.18), libpango1.0-dev (>= 1.14.0), libfontconfig1-dev, libfreetype6-dev (>= 2.0.1), libgconf2-dev (>= 1.2.1), libgnomeui-dev (>= 2.2.0), libstartup-notification0-dev, libasound2-dev, libcurl4-openssl-dev, libdbus-glib-1-dev (>= 0.60), libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, hardening-wrapper, lsb-release, libiw-dev, mesa-common-dev, libnotify-dev (>= 0.4), libxrender-dev, libpulse-dev, yasm (>= 1.1), unzip, dbus-x11, xvfb, python (>= 2.7), libffi-dev (>= 3.0.9) [arm64] Standards-Version: 3.9.1 #XS-Testsuite: autopkgtest Package: @MOZ_PKG_NAME@ Architecture: any Depends: lsb-release, ${misc:Depends}, ${shlibs:Depends} Recommends: xul-ext-ubufox, ${support:Recommends}, libcanberra0, libdbusmenu-glib4, libdbusmenu-gtk4 Provides: www-browser, iceweasel, gnome-www-browser, ${app:Provides} Suggests: fonts-lyx, ${support:Suggests} Breaks: ${transitional:Breaks} Replaces: ${transitional:Replaces} Conflicts: ${app:Conflicts}, ${transitional:Conflicts} XB-Xul-AppId: {ec8030f7-c20a-464f-9b0e-13a3a9e97384} Description: Safe and easy web browser from Mozilla Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. Package: @MOZ_PKG_NAME@-dbg Architecture: any Section: debug Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, @MOZ_PKG_NAME@ (= ${binary:Version}) Provides: ${app:Provides} Conflicts: ${app:Conflicts}, Description: Safe and easy web browser from Mozilla - debug symbols Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the debugging symbols for the Firefox web browser Package: @MOZ_PKG_NAME@-dev Architecture: any Section: devel Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, @MOZ_PKG_NAME@ (= ${binary:Version}) Provides: ${app:Provides} Conflicts: xulrunner-2.0-dev, xulrunner-1.9.2-dev, xulrunner-1.9-dev, ${app:Conflicts} Description: Safe and easy web browser from Mozilla - development files Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the headers and SDK for building plugins with Firefox Package: @MOZ_PKG_NAME@-mozsymbols Architecture: amd64 i386 armel Section: debug Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, Provides: ${app:Provides} Conflicts: ${app:Conflicts} Description: Safe and easy web browser from Mozilla - Breakpad symbols Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the Firefox symbols in a format expected by Mozilla's Breakpad. Eventually this package should go away and the symbol upload be implemented in soyuz (or other builders that build this package) Package: @MOZ_PKG_NAME@-testsuite Architecture: any Section: misc Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, @MOZ_PKG_NAME@ (= ${binary:Version}), @MOZ_LOCALE_PKGS@ python, dbus-x11, xvfb, make, notify-osd, metacity, language-pack-en-base, language-pack-es-base, language-pack-fr-base, language-pack-pt-base, fonts-arabeyes, fonts-kacst, fonts-takao-mincho, fonts-takao-gothic, fonts-wqy-zenhei, fonts-arphic-uming, fonts-arphic-ukai, fonts-nanum, fonts-nanum-coding, fonts-unfonts-core, fonts-liberation, gnome-session, gnome-settings-daemon, ubuntu-settings, light-themes, unzip, hunspell-en-us, libgl1-mesa-dri Provides: ${app:Provides} Conflicts: ${app:Conflicts} Description: Safe and easy web browser from Mozilla - testsuite Firefox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web. . This package contains the Firefox testsuite # Transitional packages below here # Can be dropped after 14.04 Package: @MOZ_PKG_NAME@-globalmenu Architecture: any Section: oldlibs Priority: extra Depends: @MOZ_PKG_NAME@, ${misc:Depends} Description: Safe and easy web browser from Mozilla (transitional package) This is a transitional package to ensure that upgrades work correctly. It can be safely removed # Language packs below here debian/changelog0000664000000000000000000153525612321600535011060 0ustar firefox (28.0+build2-0ubuntu2) trusty; urgency=medium * debian/control{,.in}: Switch from old ttf- packages to font- packages. (LP: #1296663) -- Adam Conrad Sat, 22 Mar 2014 20:10:18 -0600 firefox (28.0+build2-0ubuntu1) trusty; urgency=medium * New upstream stable release (FIREFOX_28_0_BUILD2) -- Chris Coulson Mon, 17 Mar 2014 13:07:43 +0000 firefox (28.0+build1-0ubuntu1) trusty; urgency=medium * New upstream stable release (FIREFOX_28_0_BUILD1) [ Jamie Strandboge ] * usr.bin.firefox.apparmor*: updates for new firefox releases (LP: #1288260) - allow read of /sys/devices/pci[0-9]*/**/uevent - allow read of /etc/udev/udev.conf - explicityly deny /run/udev/data/**, like we do with evince [ Chris Coulson ] * Make geolocation work * Backport changeset from mozilla-central for aarch64 support - add debian/patches/aarch64-support.patch - update debian/patches/series * Use --enable-system-libffi on arm64, as the bundled libffi doesn't support this yet * Switch to the release channel -- Chris Coulson Wed, 05 Mar 2014 08:11:10 -0600 firefox (28.0~b2+build1-0ubuntu2) trusty; urgency=medium * Build with --enable-release option to use "more conservative, release engineering-oriented options" as recommended by upstream for distros: - Fixes FTBFS on powerpc and may improve stability on other arches. -- Adam Conrad Wed, 26 Feb 2014 00:40:24 -0700 firefox (28.0~b2+build1-0ubuntu1) trusty; urgency=low * New upstream release from the beta channel (FIREFOX_28_0b2_BUILD1) * Disable Ganda and Northern Sotho locales * Refresh patches - update d/p/test-integration/mochitest-allow-test-manifest-for-browser-chrome.patch - update d/p/test-integration/automation-output-junit-xml.patch - update debian/patches/unity-menubar.patch - update debian/patches/ubuntu-ua-string-changes.patch * Add pulseaudio dependency - update debian/control * Disable autopkgtest for now, they've been failing for ages and not of much use running on the devel release anyway. We really need these running in the security PPA instead -- Chris Coulson Thu, 30 Jan 2014 11:22:57 +0000 firefox (27.0~b6+build1-0ubuntu1) trusty; urgency=low * New upstream release from the beta channel (FIREFOX_27_0b6_BUILD1) -- Chris Coulson Wed, 15 Jan 2014 12:50:03 +0000 firefox (27.0~b2+build1-0ubuntu1) trusty; urgency=low * New upstream release from the beta channel (FIREFOX_27_0b2_BUILD1) * Add Aragonese and Xhosa language packs - update debian/control - update debian/locales.shipped - update debian/locales.all - add debian/searchplugins/an/list.txt - add debian/searchplugins/xh/list.txt -- Chris Coulson Fri, 03 Jan 2014 10:19:56 +0000 firefox (27.0~b1+build1-0ubuntu1) trusty; urgency=low * New upstream release from the beta channel (FIREFOX_27_0b1_BUILD1) * Refresh patches - update debian/patches/allow-lockPref-everywhere.patch - update debian/patches/ubuntu-ua-string-changes.patch - update d/p/test-integration/automation-output-junit-xml.patch - update d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch - update debian/patches/unity-menubar.patch -- Chris Coulson Fri, 06 Dec 2013 14:09:25 +0000 firefox (26.0~b10+build1-0ubuntu1) trusty; urgency=low * New upstream release from the beta channel (FIREFOX_26_0b10_BUILD1) -- Chris Coulson Fri, 06 Dec 2013 11:33:55 +0000 firefox (26.0~b6+build1-0ubuntu1) trusty; urgency=low * New upstream release from the beta channel (FIREFOX_26_0b6_BUILD1) * Switch to beta * Refresh patches - update d/p/test-integration/automation-output-junit-xml.patch - update d/p/test-integration/mochitest-allow-test-manifest-for-browser-chrome.patch - update d/p/test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch - update d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch - update d/p/test-integration/xpcshell-dont-return-nonzero-on-test-failure.patch - update d/p/test-integration/xpcshell-write-time-for-failed-test.patch - update debian/patches/unity-menubar.patch - update debian/patches/ubuntu-ua-string-changes.patch - update debian/patches/no_neon_on_arm.patch * Drop patches - remove d/p/test-fixes/mochitest-browser-plugincrash-with-no-crashreporter.patch - remove d/p/test-fixes/mochitest-dont-ship-browser-postupdate-test.patch - remove d/p/test-fixes/mochitest-tests-jar-fix.patch - update debian/patches/series * Update for mochitest/runtests.py changes - update debian/testing/testrunhelper.py * MOZILLA_OFFICIAL no longer controls whether the crashreporter is enabled, so just build with --disable-crashreporter to turn it off - update debian/apport/blacklist.in - update debian/build/config.mk - update debian/build/rules.mk -- Chris Coulson Fri, 15 Nov 2013 09:41:36 +0000 firefox (25.0+build3-0ubuntu0.13.10.1) saucy-security; urgency=low * New upstream stable release (FIREFOX_25_0_BUILD3) - see LP: #1245414 for USN information [ Chris Coulson ] * Refresh patches - update d/p/test-fixes/xpcshell-docshell-no-writes-to-appdir.patch - update d/p/test-integration/xpcshell-write-time-for-failed-test.patch - update debian/patches/ubuntu-ua-string-changes.patch - update d/p/test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch - update d/p/test-integration/automation-output-junit-xml.patch - update d/p/test-integration/mochitest-allow-test-manifest-for-browser-chrome.patch - update d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch - update debian/patches/unity-menubar.patch * Drop patches - remove d/p/test-fixes/xpcshell-docshell-no-writes-to-appdir.patch - remove d/p/test-fixes/xpcshell-contentprefs-no-writes-to-appdir.patch - remove d/p/test-fixes/mochitest-browser-plugincrash-with-no-crashreporter.patch - update debian/patches/series * Refactor the test results post-process script a bit so that it can use regular expressions in the configuration - update debian/testing/filter_results - update debian/testing/results-filter-manifest.json - update debian/tests/post-process * Run mochitest-plain in 5 chunks, similar to upstream. This should fix some test failures we see that seem to be caused by some tests not cleaning up properly (seems to fix LP: #1158781 and LP: #1194448) - update debian/testing/run_mochitest.in - update debian/tests/control - move debian/tests/mochitest => debian/tests/mochitest-1 - add debian/tests/mochitest-2 - add debian/tests/mochitest-3 - add debian/tests/mochitest-4 - add debian/tests/mochitest-5 * Drop d/p/test-integration/test-sameoriginpolicy-debug.patch now that we run mochitest-plain in chunks * Add OCSPStaplingServer binary to testsuite - update debian/firefox-testsuite.install.in - update debian/build/rules.mk * Don't let make check failures fail the build for now, as there are some jit test failures - update debian/build/testsuite.mk * Try to stop the buildd's from terminating the build during long links (use a hack based on the one for the Chromium package) - add debian/build/keepalive-wrapper.py - update debian/build/rules.mk [ Jamie Strandboge ] * add debian/usr.bin.firefox.apparmor.13.10 for dbus policy * debian/rules: conditionally use usr.bin.firefox.apparmor.13.10 on saucy and higher, otherwise usr.bin.firefox.apparmor.12.04 * debian/usr.bin.firefox.apparmor.12.04: use ibus abstraction -- Chris Coulson Mon, 28 Oct 2013 10:16:16 +0000 firefox (24.0+build1-0ubuntu1) saucy; urgency=low * New upstream stable release (FIREFOX_24_0_BUILD1) - see LP: #1223826 for USN information * Make sure bindings are always attached for menu popups, even if they already have a wrapper when the menu opens - update debian/patches/unity-menubar.patch * Make sure bindings are attached for menu's too, so that menu.open always works (finally fixes livemarks when running in Unity) - update debian/patches/unity-menubar.patch * Refresh patches - update d/p/test-fixes/mochitest-browser-plugincrash-with-no-crashreporter.patch - update d/p/test-fixes/xpcshell-docshell-no-writes-to-appdir.patch - update d/p/test-integration/automation-output-junit-xml.patch - update debian/patches/ubuntu-bookmarks.patch - update debian/patches/unity-menubar.patch * Make the debian/control autogeneration a bit cleaner - update debian/build/config.mk - update debian/build/dump-langpack-control-entries.pl - update debian/build/rules.mk - update debian/control.in * Don't set stuff that is set by dpkg-buildpackage - update debian/build/config.mk - update debian/build/rules.mk * Remove the executable bit from more file types - update debian/build/rules.mk * The upstream mochitest harness now supports a manifest file for all tests except for browser-chrome, but we need a separate manifest for each now - update d/p/test-integration/mochitest-allow-test-manifest-for-chrome.patch - rename d/p/test-integration/mochitest-allow-test-manifest-for-chrome.patch => d/p/test-integration/mochitest-allow-test-manifest-for-browser-chrome.patch - update debian/patches/series - add debian/testing/extra/mochitest/mochitest-a11y.json - add debian/testing/extra/mochitest/mochitest-browser-chrome.json - update debian/testing/extra/mochitest/mochitest-chrome.json - update debian/testing/run_mochitest.in * Support running unit tests from an unpacked testsuite tarball anywhere on the filesystem - update debian/testing/testrunhelper.py * Include toolkit/components/mediasniffer/test/unit/data/ff-inst.exe in the tarball, as it's required for a mimetype sniffing test that we run - update debian/config/tarball.conf * Temporary debug patch - add d/p/test-integration/test-sameoriginpolicy-debug.patch - update debian/patches/series * Fix failing test_addEngine_callback.js search xpcshell test - rename d/p/test-fixes/xpcshell-search-fix-json-cache-test.patch => d/p/test-fixes/xpcshell-search-fix-tests-when-plugins-are-not-in-appdir.patch - update d/p/test-fixes/xpcshell-search-fix-tests-when-plugins-are-not-in-appdir.patch - update debian/patches/series * Fix broken Bulgarian language pack * Blacklist Mongolian for now - update debian/config/locales.blacklist * Add GStreamber build-depends - update debian/control.in * Fix LP: #1223502 - firefox-testsuite should depend on fonts-liberation rather than ttf-liberation * Add libgl1-mesa-dri to firefox-testsuite depends so that gnome-session starts correctly in saucy -- Chris Coulson Wed, 11 Sep 2013 12:32:22 +0100 firefox (23.0+build2-0ubuntu1) saucy; urgency=low * New upstream stable release (FIREFOX_23_0_BUILD2) * Switch to the release channel - update debian/config/branch.mk - update debian/config/locales.* - refresh debian/control -- Chris Coulson Wed, 07 Aug 2013 18:55:00 +0100 firefox (23.0~b10+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_23_0b10_BUILD1) -- Chris Coulson Thu, 01 Aug 2013 10:05:42 +0100 firefox (23.0~b9+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_23_0b9_BUILD1) -- Chris Coulson Mon, 29 Jul 2013 22:03:10 +0100 firefox (23.0~b4+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_23_0b4_BUILD1) -- Chris Coulson Tue, 09 Jul 2013 10:22:34 +0100 firefox (23.0~b2+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_23_0b2_BUILD1) -- Chris Coulson Tue, 02 Jul 2013 13:36:58 +0100 firefox (23.0~b1+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_23_0b1_BUILD1) * Build conflict on python-progressbar, as having this installed causes the jit test harness to fail - update debian/control.in * Disable unsupported W3C webgl tests - update debian/testing/extra/mochitest/mochitest.json * Refresh paths for a11y tests after landing of bmo: #854868 - update debian/testing/extra/mochitest/mochitest-chrome.json * Make firefox-globalmenu a real transitional package - update debian/control.in - update debian/build/mozbuild.mk * Just test the selected locale on all channels in test_langpack_chrome.js, rather than testing we get a correctly translated string. This is just way too fragile - update debian/testing/extra/xpcshell/package-tests/test_langpack_chrome.js - update d/p/test-integration/automation-output-junit-xml.patch - update debian/patches/unity-menubar.patch - update debian/patches/dont-override-general-useragent-locale.patch - update debian/patches/no_neon_on_arm.patch * Drop crashtest-no-network-access.patch as the test seems to have been removed from the tree * Always build the crash reporter and Breakpad symbols on supported architectures, even if it is disabled at run time. Will hopefully avoid surprises by the time we reach beta (where the crash reporter is enabled) - update debian/rules - update debian/build/mozvars.mk - update debian/build/mozbuild.mk * Rename mozbuild.mk => rules.mk and mozvars.mk => config.mk * Shut up lintian - update debian/copyright * Make the transitional globalmenu package priority extra, section oldlibs - update debian/control.in * Make the testsuite priority extra, section misc - update debian/control.in * The testsuite shouldn't depend on essential package libc-bin - update debian/control.in * Override symlink-is-self-recursive warning in the testsuite, as this is intentional - add debian/firefox-testsuite.lintian-overrides.in * Remove the executable bit from the testsuite zip file - update debian/build/rules.mk * Remove the executable bit from searchplugins - update debian/build/rules.mk * Silence an embedded-library warning and some image-file-in-usr-lib warnings - update debian/firefox.lintian-overrides.in * Drop firefox-gnome-support. It was only depending on libraries that are already guaranteed to exist when firefox is installed (mostly, glib). Firefox has no need to depend on libnotify for the time being either, but if it does again, that dependency should just be on the main package - update debian/control.in - update debian/build/rules.mk - remove debian/firefox-gnome-support.install.in * Only blacklist Firefox in Apport on official builds - update debian/apport/blacklist.in - update debian/build/rules.mk * Merge in latest desktop file translations - update debian/firefox.desktop.in * Refresh patches - update debian/patches/dont-override-general-useragent-locale.patch - update debian/patches/no_neon_on_arm.patch - update d/p/test-integration/automation-output-junit-xml.patch - update d/p/test-overrides/disable-failing-python-tests.patch - update debian/patches/unity-menubar.patch - update debian/patches/fix-broken-langpack-install-manifests.patch * Disable intl.locale.matchOS in test_bug848297.js - add d/p/test-fixes/xpcshell-chrome-fix-test_bug848297-with-locale-matchOS.patch - update debian/patches/series * Write xpcshell test duration to the JUnit results when the test fails - add d/p/test-integration/xpcshell-write-time-for-failed-test.patch - update debian/patches/series * Update test-fixes/mochitest-browser-plugincrash-with-no-crashreporter.patch to just not include the test on !MOZ_CRASHREPORTER builds * Fix build-time xpcshell tests after landing of bmo: 597064, by using the python virtualenv provided by the upstream build system - update debian/build/testsuite.mk - update debian/build/rules.mk * Fix broken Bulgarian language pack - update debian/patches/fix-broken-langpack-install-manifests.patch -- chris coulson wed, 26 jun 2013 17:44:33 +0100 firefox (22.0~b6+build1-0ubuntu1) saucy; urgency=low * new upstream release from the beta channel (firefox_22_0b6_build1) -- chris Coulson Thu, 20 Jun 2013 10:57:54 +0100 firefox (22.0~b4+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_22_0b4_BUILD1) * Drop debian/patches/spsprofiler-no-jit.patch now, as it is fixed in the new version -- Chris Coulson Thu, 06 Jun 2013 11:45:11 +0100 firefox (22.0~b3+build1-0ubuntu2) saucy; urgency=low * Backport upstream patch to #include jsscriptinlines.h in SPSProfiler.cpp so that it builds in no-jit configurations; fixes build on powerpc. - add debian/patches/spsprofiler-no-jit.patch - update debian/patches/series -- Colin Watson Fri, 31 May 2013 12:03:04 +0100 firefox (22.0~b3+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_22_0b3_BUILD1) * Fix test_langpack_chrome.js for Mongolian - update debian/testing/extra/xpcshell/package-tests/test_langpack_chrome.js * Refresh debian/patches/fix-broken-langpack-install-manifests.patch -- Chris Coulson Wed, 29 May 2013 15:11:19 +0100 firefox (22.0~b2+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_22_0b2_BUILD1) * Fix broken nso language pack (and test_langpack_load.js test) - update debian/patches/fix-broken-langpack-install-manifests.patch * Unbreak test_langpack_chrome.js for Hindi - update debian/testing/extra/xpcshell/package-tests/test_langpack_chrome.js * Run the xpcshell binary from the actual install directory rather than the temporary test directory, as some tests assume this now (eg, the distribution/ directory is assumed to be in the same directory as xpcshell). This means we also have to install httpd.js et al in to the actual components/ directory, as the upstream test harness assumes this too. This fixes test_ubuntu_searchplugins.js test failures since the distribution/ directory was moved back up a level on disk - update debian/build/rules.mk - update debian/firefox-testsuite.install.in - update debian/firefox.install.in - update debian/testing/run_xpcshell_tests - update debian/testing/testrunhelper.py * Make "make check" failures non-fatal on armhf. I don't think anybody actually genuinely cares whether Firefox works there or not, so don't let it block migration from proposed - update debian/build/testsuite.mk * Fix an issue where menus stop refreshing because we often don't get closed events from Unity when a menu closes, sigh.... - update debian/patches/unity-menubar.patch -- Chris Coulson Fri, 17 May 2013 18:22:54 +0100 firefox (22.0~b1+build1-0ubuntu2) saucy; urgency=low * Backport part of commit from Aurora channel to ensure that parallelarray/bug858582.js is disabled on builds without ParallelArray - add d/p/test-fixes/jittest-disable-bug858582-with-no-parallelarray.patch - update debian/patches/series -- Chris Coulson Thu, 16 May 2013 01:18:01 +0100 firefox (22.0~b1+build1-0ubuntu1) saucy; urgency=low * New upstream release from the beta channel (FIREFOX_22_0b1_BUILD1) * Switch saucy to beta - update debian/config/branch.mk - update debian/config/locales.shipped - refresh debian/control * Drop the menubar addon - remove debian/globalmenu - update debian/build/mozbuild.mk - update debian/config/mozconfig.in - update debian/control.in - remove debian/firefox-globalmenu.dirs.in - remove debian/firefox-globalmenu.links.in - remove debian/patches/unity-globalmenu-build-support.patch - add debian/unity-menubar.patch - update debian/patches/series.in * Don't access the network from 395609.xul to see if it fixes a hang - add d/p/test-fixes/crashtest-no-network-access.patch - update debian/patches/series.in * Get rid of the autogenerated debian/patches/series, as we don't use it now - rename debian/patches/series.in => debian/patches/series - update debian/build/mozbuild.mk - update debian/source/options * Fix LP: #1158931 by making the testsuite depend on hunspell-en-us - update debian/control.in * Drop unneeded test-integration/mochitest-optional-websock-log.patch * Stop patching upstream manifests to mark tests as failing, as this is too much of a maintenance burden. Instead, post-process the test results using our own manifest - update debian/patches/series - remove d/p/test-overrides/reftest-disable-failing-tests.patch - remove d/p/test-overrides/xpcshell-disable-failing-tests.patch - update debian/rules - update debian/testing/extra/mochitest/mochitest-chrome.json - update debian/testing/extra/mochitest/mochitest.json - add debian/testing/filter_results - update debian/tests/control.in - add debian/tests/post-process - add debian/testing/results-filter-manifest.json - update debian/firefox-testsuite.install.in * Don't return non-zero exit status from xpcshell test failures, as this turns the build red in Jenkins - add d/p/test-integration/xpcshell-dont-return-nonzero-on-test-failure.patch - update debian/patches/series.in * Fix testrunhelper.py to work now that libxpcom.so has gone * Disable some unsupported tests that test search healthreporting, as these don't work on Ubuntu where the searchplugins are not in the application directory - update debian/testing/extra/mochitest/mochitest-chrome.json * Remove obsolete patches - remove debian/patches/fix-makefile-substitution-bug.patch - remove debian/patches/gcc-4.7-name-lookup-fixes.patch - update debian/patches/series * Refresh patches - update debian/patches/no_neon_on_arm.patch - update debian/patches/ubuntu-ua-string-changes.patch - update debian/patches/fix-broken-langpack-install-manifests.patch - update d/p/test-fixes/xpcshell-xunit-output-no-bell.patch - update d/p/test-integration/automation-output-junit-xml.patch - update d/p/test-integration/xpcshell-output-valid-junit-xml.patch - update d/p/test-overrides/disable-failing-python-tests.patch * Fix test_langpack_chrome.js for Hindi, Mongolian and Tamil - update debian/testing/extra/xpcshell/package-tests/test_langpack_chrome.js * browser/distribution has moved back up a level - update debian/build/rules.mk - update debian/firefox-locale.preinst.in - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.preinst.in * Fix LP: #1180227 - Update the Apparmor profile to allow rw access to ~/.cache/mozilla/firefox, and allow locking of sqlite db's there too - update debian/usr.bin.firefox.apparmor.12.04 * Testpilot has been removed from Firefox - update debian/firefox.install.in -- Chris Coulson Tue, 14 May 2013 01:11:06 +0100 firefox (21.0+build2-0ubuntu1) saucy; urgency=low * New upstream stable release (FIREFOX_21_0_BUILD2) - see LP: #1178277 * Update globalmenu-extension to 4.1 * Drop support for building on older than precise - update debian/apport/source_firefox.py.in - update debian/build/mozbuild.mk - update debian/config/mozconfig.in - update debian/control.in - update debian/firefox-globalmenu.dirs.in - remove debian/firefox-restart-required.update-notifier.in - update debian/firefox.desktop.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.postrm.in - update debian/firefox.preinst.in - update debian/firefox.prerm.in - remove debian/patches/add-syspref-dir.patch - update debian/patches/series.in - remove debian/patches/use-new-yasm-in-lucid.patch - remove debian/patches/mozilla-kde.patch - remove debian/patches/firefox-kde.patch - update debian/rules - remove debian/usr.bin.firefox.apparmor.10.04 - remove debian/usr.bin.firefox.apparmor.10.10 - remove debian/usr.bin.firefox.apparmor.11.04 - remove debian/usr.bin.firefox.apparmor.9.10 * Drop the perl script for preprocessing the quilt series file - remove debian/build/enable-dist-patches.pl - update debian/build/mozbuild.mk * Make sure that SHELL is set in the build environment - update debian/build/mozbuild.mk * Don't set the MOZCONFIG environment variable, but just copy our config in to the root of the source tree - update debian/build/mozconfig.mk * Drop libthai suggest - this hasn't been needed for a long time - update debian/control * Replace latex-xft-fonts suggest with ttf-lyx (yes, I know this is a transitional package since 12.10, but it avoids suggesting a different package for each release) - update debian/control * Use virtualenv for compare-locales - update debian/build/create-tarball.py - update debian/build/mozbuild.mk * Refactor create-tarball.py * Drop test fixes merged upstream: - remove d/p/test-fixes/xpcshell-shell-disable-gconf-tests-when-using-gsettings.patch - remove d/p/test-fixes/mochitest-shell-disable-gconf-tests-when-using-gsettings.patch - update debian/patches/series.in * Drop debian/patches/python-virtualenv-multiarch-fix.patch - fixed upstream * Update for install layout changes - update debian/firefox-locale.preinst.in - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.preinst.in - update debian/patches/dont-include-hyphenation-patterns.patch - update debian/rules - update debian/build/mozbuild.mk - update debian/testing/xpcshell-build.ini - add debian/build/fix-mozinfo-appname.py - update debian/testing/xpcshell-package-tests/xpcshell.ini - update debian/testing/xpcshell-package-tests/test_locale_matchOS_real.js - update debian/testing/xpcshell-package-tests/test_langpack_load.js - update debian/testing/xpcshell-package-tests/test_langpack_chrome.js * Disable telemetry xpcshell tests. Telemetry is not enabled on Ubuntu builds and the test_TelemetryPing.js fails anyway because the HG revision is not embedded in the ping - update d/p/test-integration/xpcshell-disable-failing-tests.patch * Skip browser_pluginCrashCommentAndURL.js on builds with crash reporting disabled - add d/p/test-fixes/mochitest-browser-plugincrash-with-no-crashreporter.patch - update debian/patches/series.in * Disable browser_google.js as this fails with our searchplugins, and we have our own tests - update debian/testing/mochitest-chrome.json * Temporarily disable tests in python/mozbuild/mozpack/tests, as they fail - add d/p/test-overrides/disable-failing-python-tests.patch - update debian/patches/series.in * Skip font-matching/synthetic-style-1.html reftest which fails on beta (note, it works on the nightly packaging) - update d/p/test-overrides/reftest-disable-failing-tests.patch * Make the testsuite depend on ttf-liberation to fix a mochitest failure in browser_fontinspector.js - update debian/control.in * Disable test_notifications_popup.html for now until we have time to investigate why it hangs - update debian/testing/mochitest.json * Run tests that need a display in an actual session with gnome-settings-daemon running (plus a WM): - update debian/testing/testrunhelper.py - update debian/firefox-testsuite.install.in - add debian/testing/run-test.desktop - update debian/testing/run_mochitest.in - update debian/testing/run_reftest.in - update debian/testing/run_xpcshell_tests.in - update debian/control.in - update debian/tests/mochitest - update debian/tests/mochitest-browser - update debian/tests/mochitest-chrome - update debian/tests/mochitest-a11y - update debian/tests/mochitest-ipcplugins - update debian/tests/crashtest - update debian/tests/jstestbrowser - update debian/tests/reftest - update debian/tests/xpcshell-package-tests - update debian/tests/xpcshell-tests - update d/p/test-overrides/reftest-disable-failing-tests.patch * Make the testsuite depend on ubuntu-settings and light-themes - update debian/control.in * Drop the JUnit XML changes from the mochitest and reftest addons and add this support to automation.py instead. This avoids duplication, means we only need 1 patch and makes it possible to add all types of log messages to the results (eg, screenshots of hung tests) - remove d/p/test-integration/reftest-output-junit-xml.patch - remove d/p/test-integration/mochitest-output-junit-xml.patch - add d/p/test-integration/automation-output-junit-xml.patch - update debian/patches/series.in * Don't install the testsuite unpacked on the filesystem in the traditional manner, but just install the packed zip and have the test scripts bootstrap a temporary environment with the expanded testsuite. The advantage of this is that we don't need to carry patches for tests that modify the test directory. What we are interested in testing are the components that the user normally runs, and the testsuite doesn't form part of this - so it doesn't matter where it's installed and runs from - update debian/build/mozbuild.mk - remove debian/firefox-testsuite.dirs.in - update debian/firefox-testsuite.install.in - update debian/firefox-testsuite.links.in - update debian/patches/series.in - remove d/p/test-fixes/xpcshell-ctypes-no-writes-to-appdir.patch - remove d/p/test-fixes/xpcshell-libpref-no-writes-to-testdir.patch - remove d/p/test-fixes/xpcshell-xpcom-no-writes-to-testdir-or-appdir.patch - update debian/rules - rename debian/testing/mochitest-chrome.json => debian/testing/extra/mochitest/mochitest-chrome.json - rename debian/testing/mochitest.json => debian/testing/extra/mochitest/mochitest.json - rename debian/testing/xpcshell-package-tests/* => debian/testing/extra/xpcshell/package-tests/* - remove debian/testing/run-tests.desktop - update debian/testing/run_mochitest.in - update debian/testing/run_reftest.in - rename debian/testing/run_xpcshell_tests.in => debian/testing/run_xpcshell_tests - update debian/testing/run_xpcshell_tests - update debian/testing/testrunhelper.py - update debian/tests/crashtest - update debian/tests/jstestbrowser - update debian/tests/mochitest - update debian/tests/mochitest-a11y - update debian/tests/mochitest-browser - update debian/tests/mochitest-chrome - update debian/tests/mochitest-ipcplugins - update debian/tests/reftest - update debian/tests/xpcshell-package-tests - update debian/tests/xpcshell-tests * Don't write the terminal bell character to JUnit results - add d/p/test-fixes/xpcshell-xunit-output-no-bell.patch * Fix test_json_cache.js test failure, caused by us not installing search plugins in the application directory - add d/p/test-fixes/xpcshell-search-fix-json-cache-test.patch - remove d/p/test-fixes/xpcshell-search-fix-browser-dirprovider.patch, as this isn't really needed and just complicates things - update debian/patches/series.in * Manually stage the testsuite in debian/tmp and dh_install it in to the package from there rather than from objdir/dist, as dh_install is called after we have created the breakpad symbols, which modifies the files in objdir/dist and causes dh_strip to fail later on - update debian/build/mozbuild.mk - update debian/firefox-testsuite.install.in * Fix test failure due to Northern Sotho language pack - update debian/patches/fix-broken-langpack-install-manifests.patch * Fix test_langpack_chrome.js for Mongolian and Swedish - update debian/testing/extra/xpcshell/package-tests/test_langpack_chrome.js * Disable some unsupported tests that test search healthreporting, as these don't work on Ubuntu where the searchplugins are not in the application directory - update debian/testing/extra/mochitest/mochitest-chrome.json * Disable hanging / crashing WebRTC tests - update debian/testing/extra/mochitest/mochitest.json * Refresh patches - update debian/patches/dont-include-hyphenation-patterns.patch - update d/p/test-integration/mochitest-allow-test-manifest-for-chrome.patch - update d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch - update d/p/test-overrides/xpcshell-disable-failing-tests.patch -- Chris Coulson Thu, 09 May 2013 14:51:42 +0100 firefox (20.0+build1-0ubuntu2) raring; urgency=low * Update globalmenu-extension to 4.0 - Fix LP: #1169873 - Crash in uGlobalMenuObject::ShouldShowIcon() - Turn a nullptr deref in to a runtime abort for now, to try and get a better idea of what is happening (LP: #1169874) * Fix empty Replaces on 12.10 and later (LP: #1165408) - update debian/rules -- Chris Coulson Wed, 17 Apr 2013 09:29:49 +0100 firefox (20.0+build1-0ubuntu1) raring; urgency=low * New upstream stable release (FIREFOX_20_0_BUILD1) * Update globalmenu-extension to 3.9 - Firefox 20 compatibility fixes - This is the last version of this addon, and will be dropped in the next Firefox release * Drop patches fixed upstream - remove debian/patches/ionmonkey-hardfp-support.patch - update debian/patches/series.in * firefox-gnome-support needs explicit dependency on libnotify - update debian/control{,.in} * Add support for autopkgtest, package the xpcshell, reftest and mochitest testsuites and migrate the xpcshell-tests, reftest, crashtest, jstestbrowser and mochitest targets to this. Note that tests that can't be ran as an autopkgtest (eg, if they require write permissions to the application directory) will still be ran at build time - add firefox-testsuite package in debian/control.in - update debian/control - add debian/firefox-testsuite.install.in - add debian/firefox-testsuite.links.in - update debian/build/mozbuild.mk - update debian/rules - drop xpcshell-tests, reftest, crashtest, jstestbrowser and mochitest targets from debian/build/testsuite.mk, add xpcshell-tests-build and the ability to run xpcshell-tests with our own reduced manifest - add debian/tests/control - add debian/tests/crashtest - add debian/tests/jstestbrowser - add debian/tests/mochitest - add debian/tests/reftest - add debian/tests/xpcshell-tests - add debian/testing/run_mochitest.in - add debian/testing/run_xpcshell_tests.in - add debian/testing/run_reftest.in - add debian/testing/testrunhelper.py - update debian/config/mozconfig.in to always build with --enable-tests - add debian/testing/xpcshell-build.ini * Ensure that the directory provider returns all searchplugin paths during the search service xpcshell tests - add d/p/test-fixes/xpcshell-search-fix-browser-dirprovider.patch - update debian/patches/series.in * Fix various tests that assume that either the application directory or test directory can be written to - add d/p/test-fixes/xpcshell-docshell-no-writes-to-appdir.patch - add d/p/test-fixes/xpcshell-contentprefs-no-writes-to-appdir.patch - add d/p/test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch - add d/p/test-fixes/xpcshell-ctypes-no-writes-to-appdir.patch - add d/p/test-fixes/xpcshell-xpcom-no-writes-to-testdir-or-appdir.patch - add d/p/test-fixes/xpcshell-libpref-no-writes-to-testdir.patch - update debian/patches/series.in * Export NO_PNG_PKG_MANGLE as optipng breaks tests that are dependent on image format / size - update debian/build/mozbuild.mk * Don't test that the addon selection dialog appears in test_bug596343.js, as we disable this - add d/p/test-integration/xpcshell-disable-addon-select-dialog-test-for-adt.patch - update debian/patches/series * Don't write a log file to the script directory from mochitest - add d/p/test-integration/mochitest-optional-websock-log.patch - update debian/patches/series.in * Fix a failure in test_nodb_pluschanges.js due to const redeclaration - add d/p/test-fixes/xpcshell-search-fix-const-redeclaration.patch - update debian/patches/series.in * Don't run the GConf-specific test_421977.js on systems where GSettings is available, as it will fail - add d/p/t-f/xpcshell-shell-disable-gconf-tests-when-using-gsettings.patch - update debian/patches/series.in * Disable test_upgrade.js and test_upgrade_strictcompat.js xpcshell tests for now as they require write access to the application directory - add d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch - update debian/patches/series.in * Disable test_browserGlue_distribution.js for now as it requires write access to the application directory - update d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch * Reset the "browser" and "embed-app" content prefs after running content mochitests, so that the subsequent DOM browser-element tests don't fail - add d/p/test-fixes/mochitest-content-reset-permissions-when-done.patch - update debian/patches/series.in * Disable various failing mochitests: - add debian/testing/mochitest.json - add debian/testing/mochitest-chrome.json - update debian/firefox-testsuite.install.in * Fix issue where some tests were being added to the mochitest tests.jar using their absolute path in the build tree - add debian/patches/test-fixes/mochitest-tests-jar-fix.patch - update debian/patches/series.in * Don't run the GConf specific browser_420786.js mochitest on systems where GSettings is available, as it will fail - add d/p/t-f/mochitest-shell-disable-gconf-tests-when-using-gsettings.patch - update debian/patches/series.in * Don't ship the browser_bug538331.js mochitest as this isn't relevant when not using the Mozilla AUS - add d/p/test-fixes/mochitest-dont-ship-browser-postupdate-test.patch - update debian/patches/series.in * Make "--test-manifest" work when running chrome, browser-chrome and a11y mochitests so that we can maintain a distro manifest for these - add d/p/test-integration/mochitest-allow-test-manifest-for-chrome.patch - update debian/patches/series.in * Disable failing reftests - add d/p/test-overrides/reftest-disable-failing-tests.patch - update debian/patches/series.in * Add vendor xpcshell tests to verify that the search service loads the expected number of search plugins from each language pack - update debian/build/mozbuild.mk - add debian/firefox-testsuite.dirs.in - update debian/firefox-testsuite.install.in - update debian/rules - add debian/testing/xpcshell-package-tests/head_package_tests.js - add debian/testing/xpcshell-package-tests/test_searchplugins_valid.js - add debian/testing/xpcshell-package-tests/test_searchplugins_valid_real.js - add debian/testing/xpcshell-package-tests/xpcshell.ini - update debian/tests/control - add debian/tests/xpcshell-package-tests * Drop the hacky perl scripts that were being used to make sure the language packs ship the correct plugins. Add a xpcshell test instead - update debian/build/mozbuild.mk - update debian/rules - remove debian/build/refresh-search-modifications.pl - remove debian/build/verify-search-overrides.pl - remove debian/config/search-mods.list - update debian/control.in - remove debian/searchplugins/compute-overrides.json - add debian/testing/xpcshell-package-tests/test_ubuntu_searchplugins.js - add debian/testing/xpcshell-package-tests/test_ubuntu_searchplugins_real.js - update debian/testing/xpcshell-package-tests/xpcshell.ini * Fix a test failure with the Italian Amazon search plugin - update debian/searchplugins/it/amazon-it.xml * We set intl.locale.matchOS to ensure that Firefox uses the environment locale. Add a test to make sure this works as expected - add debian/testing/xpcshell-package-tests/test_locale_matchOS.js - add debian/testing/xpcshell-package-tests/test_locale_matchOS_real.js - update debian/testing/xpcshell-package-tests/head_package_tests.js - update debian/testing/xpcshell-package-tests/test_searchplugins_valid.js - update debian/testing/xpcshell-package-tests/test_ubuntu_searchplugins.js - update debian/testing/xpcshell-package-tests/xpcshell.ini - update debian/tests/control - update debian/tests/crashtest - update debian/tests/jstestbrowser - update debian/tests/mochitest - update debian/tests/reftest - update debian/tests/xpcshell-package-tests - update debian/tests/xpcshell-tests * We modify the user agent, so test that it is correct - add debian/testing/xpcshell-package-tests/test_ubuntu_useragent.js - update debian/testing/xpcshell-package-tests/xpcshell.ini * LP: #974146 - Add a "Open a New Private Window" action to the desktop file - update debian/firefox.desktop.in * Don't try to override the Amazon searchplugin for Kashubian or Mongolian, as it doesn't exist there - add debian/searchplugins/csb/list.txt - add debian/searchplugins/mn/list.txt - update d/t/xpcshell-package-tests/test_ubuntu_searchplugins_real.js * Testpilot only enabled on beta now - update debian/firefox.install.in * Don't run dh_scour on the testsuite package, as this screws up a lot of reftests and crashtests - update debian/build/mozbuild.mk * Add a test to make sure all of the language packs are loadable by the addon manager - add debian/testing/xpcshell-package-tests/test_langpack_load.js - update debian/testing/xpcshell-package-tests/xpcshell.ini * Add a test to make sure language pack chrome is registered correctly - add debian/testing/xpcshell-package-tests/test_langpack_chrome.js - update debian/testing/xpcshell-package-tests/xpcshell.ini * Disable failing xpcshell tests - add d/p/test-overrides/xpcshell-disable-failing-tests.patch - update debian/patches/series.in * Add JUnit output support for reftests - add d/p/test-integration/reftest-output-junit-xml.patch - update debian/patches/series.in - update debian/testing/run_reftest.in * Allow xpcshell tests to be run with JUnit outputting, and include a fix to make sure that the output matches the schema - update debian/testing/run_xpcshell_tests.in - add d/p/test-integration/xpcshell-output-valid-junit-xml.patch - update debian/patches/series.in * Add JUnit output support for mochitests - add d/p/test-integration/mochitest-output-junit-xml.patch - update debian/patches/series.in - update debian/testing/run_mochitest.in * Turn on JUnit XML output for all tests - update debian/build/mozbuild.mk - update debian/tests/crashtest - update debian/tests/jstestbrowser - update debian/tests/mochitest - update debian/tests/reftest - update debian/tests/xpcshell-package-tests - update debian/tests/xpcshell-tests * Fix a tab versus space issue in debian/build/mozbuild.mk * Refresh debian/patches/fix-broken-langpack-install-manifests.patch * Create the test results directory - update debian/tests/crashtest - update debian/tests/jstestbrowser - update debian/tests/mochitest - update debian/tests/reftest - update debian/tests/xpcshell-package-tests - update debian/tests/xpcshell-tests * Tidy up search xpcshell test fixes - drop d/p/test-fixes/xpcshell-search-fix-const-redeclaration.patch - update d/p/test-fixes/xpcshell-search-fix-browser-dirprovider.patch - update debian/patches/series.in * Install the test plugins in the testsuite directory so that they aren't visible to the normal browser - update debian/firefox-testsuite.install.in - update debian/firefox-testsuite.links.in - update debian/testing/run_xpcshell_tests.in - update debian/testing/testrunhelper.py * Fix test_ubuntu_useragent.js to work on channels other than Nightly - update debian/testing/xpcshell-package-tests/test_ubuntu_useragent.js * In test_ubuntu_useragent.js, check for the hardcoded buildid on official branded builds, and set up the appinfo with the actual build ID - update debian/testing/xpcshell-package-tests/head_package_tests.js - update debian/testing/xpcshell-package-tests/test_ubuntu_useragent.js * In test_langpack_chrome.js, only test the actual translation of general.useragent.locale on non-nightly builds, as the nightly translations aren't as complete. On nightly builds, just check that the correct locale is selected for the global package - update debian/testing/xpcshell-package-tests/test_langpack_chrome.js * Move duplicated code in to one place - update debian/testing/xpcshell-package-tests/head_package_tests.js - update debian/testing/xpcshell-package-tests/test_langpack_chrome.js - update debian/testing/xpcshell-package-tests/test_langpack_load.js - update debian/testing/xpcshell-package-tests/test_locale_matchOS_real.js - update debian/testing/xpcshell-package-tests/test_searchplugins_valid_real.js - update debian/testing/xpcshell-package-tests/test_ubuntu_searchplugins_real.js - update debian/testing/xpcshell-package-tests/test_ubuntu_useragent.js * Split mochitests in to separate autopkgtest test scripts so that we can propagate error codes from test harness failure without affecting other mochitest stages - update debian/tests/control - update debian/tests/mochitest - add debian/tests/mochitest-browser - add debian/tests/mochitest-chrome - add debian/tests/mochitest-a11y - add debian/tests/mochitest-ipcplugins * Fix an exception that caused mochitests to hang after hitting failures - update d/p/test-integration/mochitest-output-junit-xml.patch * Backport patch from Nightly to fix a build failure due to name lookup changes in gcc 4.7 - add debian/patches/gcc-4.7-name-lookup-fixes.patch - update debian/patches/series.in [ Jean-Baptiste Lallement ] * Allow the autopkgtest harness to specify a location for test results - update debian/tests/crashtest - update debian/tests/jstestbrowser - update debian/tests/mochitest - update debian/tests/reftest - update debian/tests/xpcshell-package-tests - update debian/tests/xpcshell-tests - update debian/build/mozbuild.mk [ Drey ] * Use a local favicon in the DuckDuckGo searchplugin (LP: #1120991) - update debian/searchplugins/en-US/duckduckgo.xml -- Chris Coulson Thu, 28 Mar 2013 01:22:41 +0000 firefox (19.0.2+build1-0ubuntu1) raring; urgency=low * New upstream stable release (FIREFOX_19_0_2_BUILD1) - see LP: #1152052 for USN information -- Chris Coulson Thu, 07 Mar 2013 11:33:49 +0000 firefox (19.0+build1-0ubuntu2) raring; urgency=low * Update globalmenu-extension to 3.7.2 - Fix various imagelib related crashes (LP: #1134409) -- Chris Coulson Wed, 27 Feb 2013 14:35:00 +0000 firefox (19.0+build1-0ubuntu1) raring; urgency=low * New upstream stable release (FIREFOX_19_0_BUILD1) * Switch to the release channel - update debian/config/branch.mk - update debian/control.in - disable Mongolian and Swahili -- Chris Coulson Tue, 26 Feb 2013 11:30:08 +0000 firefox (19.0~b6+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b6_BUILD1) * Update globalmenu-extension to 3.7.1 - Revert "convert document observer to JS". It's only needed for Firefox 20, and it seems to be causing some problems -- Chris Coulson Fri, 15 Feb 2013 22:24:53 +0000 firefox (19.0~b5+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b5_BUILD1) * Refresh debian/patches/fix-broken-langpack-install-manifests.patch -- Chris Coulson Wed, 06 Feb 2013 18:52:24 +0000 firefox (19.0~b4+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b4_BUILD1) -- Chris Coulson Mon, 04 Feb 2013 09:55:55 +0000 firefox (19.0~b3+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b3_BUILD1) * Refresh debian/patches/fix-broken-langpack-install-manifests.patch -- Chris Coulson Fri, 25 Jan 2013 15:16:37 +0000 firefox (19.0~b2+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b2_BUILD1) * Fix LP: #1098312 - Some language packs don't load in Firefox 18 - add debian/patches/fix-broken-langpack-install-manifests.patch - update debian/patches/series.in * Drop revert-restartless-language-packs.patch, as this changeset has been backed out upstream now -- Chris Coulson Wed, 16 Jan 2013 10:33:28 +0000 firefox (19.0~b1+build2-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b1_BUILD2) -- Chris Coulson Tue, 08 Jan 2013 21:19:54 +0000 firefox (19.0~b1+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_19_0b1_BUILD1) - Fix LP: #1096286 - 404 error when using Chambers (UK) search. Temporarily remove the plugin * Update globalmenu-extension to r3.7 - Update for imagelib changes in Firefox 19 and 20 - Update for nsCAutoString removal in Firefox 19 - Don't #include mozilla/dom/Element.h anywhere, as that now pulls in a lot of internal headers since Firefox 19 - implement the mutation observer in JS, as it's no longer possible to do it all in native code * Fix LP: #1064423 - "Submitting your report..." shows missing-icon icon. Install the throbber icon in the package - update debian/firefox.install.in * Refresh patches - update debian/patches/allow-lockPref-everywhere.patch - update debian/patches/ionmonkey-hardfp-support.patch - update debian/patches/python-virtualenv-multiarch-fix.patch * Switch to encrypted search for Google - update debian/searchplugins/en-GB/google.xml - update debian/searchplugins/en-US/google.xml - update debian/searchplugins/en-ZA/google.xml - update debian/searchplugins/ja/google-jp.xml - update debian/searchplugins/ku/google-ku.xml * Fix LP: #1094376 - Language pack isn't used. Revert bmo: #677092 (make language packs restartless) for now, as system-wide bootstrapped addons with chrome are pretty broken - add debian/patches/revert-restartless-language-packs.patch - update debian/patches/series.in -- Chris Coulson Tue, 08 Jan 2013 12:44:17 +0000 firefox (18.0~b7+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_18_0b7_BUILD1) -- Chris Coulson Wed, 02 Jan 2013 09:25:24 +0000 firefox (18.0~b5+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_18_0b5_BUILD1) -- Chris Coulson Sun, 23 Dec 2012 23:01:46 +0000 firefox (18.0~b4+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_18_0b4_BUILD1) * Make python-virtualenv compatible with the Python multiarch changes - add debian/patches/python-virtualenv-multiarch-fix.patch - update debian/patches/series.in * Backport bmo: #802358 from Firefox 20 (add hardfp support to ionmonkey) - add debian/patches/ionmonkey-hardfp-support.patch - update debian/patches/series.in -- Chris Coulson Thu, 13 Dec 2012 20:54:49 +0000 firefox (18.0~b2+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_18_0b2_BUILD1) -- Chris Coulson Thu, 29 Nov 2012 14:48:00 +0000 firefox (18.0~b1+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_18_0b1_BUILD1) * Update globalmenu-extension to 3.6.4 - Fix a build ordering issue causing the install.rdf to be missed from the addon xpi * Enable profiling on nightly builds - update debian/config/mozconfig.in * Drop patches fixed upstream - remove debian/patches/fix-for-bmo795395.patch - update debian/patches/series.in * Turn on Network Manager integration - update debian/vendor-gre.js * Update favicon for Google searchplugin - update debian/searchplugins/en-GB/google.xml - update debian/searchplugins/en-US/google.xml - update debian/searchplugins/en-ZA/google.xml - update debian/searchplugins/ja/google-jp.xml - update debian/searchplugins/ku/google-ku.xml -- Chris Coulson Wed, 21 Nov 2012 13:23:51 +0000 firefox (17.0~b6+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_17_0b6_BUILD1) -- Chris Coulson Wed, 14 Nov 2012 20:41:33 +0000 firefox (17.0~b5+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_17_0b5_BUILD1) * Update globalmenu-extension to 3.6.3 - revert "Don't override the binding on menupopups if we aren't exporting the menubar remotely", as this broke the Edit menu -- Chris Coulson Thu, 08 Nov 2012 09:38:15 +0000 firefox (17.0~b4+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_17_0b4_BUILD1) * Build with --disable-webrtc on all architectures except for i386 and amd64 - update debian/config/mozconfig.in -- Chris Coulson Mon, 05 Nov 2012 09:42:21 +0000 firefox (17.0~b3+build1-0ubuntu1) raring; urgency=low * New upstream release from the beta channel (FIREFOX_17_0b3_BUILD1) * Update globalmenu-extension to 3.6.2 - Fix crash in uGlobalMenu::InitializePopup - Don't override the binding on menupopups if we aren't exporting the menubar remotely - Fix issue with stale entries being left in the Recently Closed Tabs / Windows menus - Make logging work correctly on debug builds - Handle submenu's being reopened without getting a close event in between. We don't seem to get a close event when a menuitem is activated * Switch to beta - update debian/config/branch.mk * Enable beta only language support (Mongolian and Swahili) - update debian/config/locales.shipped - refresh debian/control * Install the web app support - update debian/firefox-globalmenu.links.in - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/patches/series.in - add debian/patches/webapprt-support-for-langpacks.patch - update debian/rules * Fix quoting issues when parsing preferences - update debian/apport/source_firefox.py.in * Refresh patches - update debian/patches/ubuntu-ua-string-changes.patch - update debian/patches/unity-globalmenu-build-support.patch - update debian/patches/fix-for-bmo795395.patch * Drop obsolete patches - remove debian/patches/add-nativehandle-attribute.patch - update debian/patches/series * Don't ship empty ".mkdir.done" files in our packages. This should probably be fixed in the upstream build system, but we'll do a temporary band-aid fix in the packaging for now just so we can get some builds - update debian/build/mozbuild.mk * Turn off searchplugin override verification for now -- Chris Coulson Fri, 26 Oct 2012 12:52:09 +0100 firefox (16.0.2+build1-0ubuntu0.12.10.1) quantal-security; urgency=low * New upstream stable release (FIREFOX_16_0_2_BUILD1) - see LP: #1071392 for USN information -- Micah Gersten Thu, 25 Oct 2012 16:00:46 -0500 firefox (16.0.1+build1-0ubuntu1) quantal-security; urgency=low * New upstream stable release (FIREFOX_16_0_1_BUILD1) - see LP: #1065285 for USN information -- Chris Coulson Wed, 10 Oct 2012 18:35:29 +0100 firefox (16.0+build1-0ubuntu1) quantal-security; urgency=low * New upstream stable release (FIREFOX_16_0_BUILD1) - see LP: #1062611 for USN information * Update globalmenu-extension to 3.5.4 - Fix crash in uGlobalMenuDocListener::HandleMutations * Drop StartupWMClass from the desktop file, as it isn't actually required by gnome shell or unity - update debian/firefox.desktop.in * Refresh patches - update debian/patches/ubuntu-ua-string-changes.patch - update debian/patches/dont-override-general-useragent-locale.patch * Drop compare-locales from the packaging, and just check out the current version when we create the tarball - update debian/build/mozbuild.mk - update debian/build/create-tarball.py - remove debian/build/compare-locales * Generate a list of the search engines that we modify and store this in bzr, rather than determining this list at build time. We refresh the list in the clean target and fail the build if anything changes. This ensures that any upstream changes to the search engine list for any locale will not go unnoticed and will force a manual check to ensure that we are shipping correctly modified search engines - add debian/build/refresh-search-modifications.pl - update debian/build/mozbuild.mk - add debian/config/search-mods.list - rename debian/build/check-search-overrides.pl => debian/build/verify-search-overrides.pl * Drop obsolete autocomplete-theme-tweak patch now - remove debian/patches/autocomplete-theme-tweak.patch - update debian/patches/series * Fix for bmo: #795395 - add debian/patches/fix-for-bmo795395.patch - update debian/patches/series -- Chris Coulson Fri, 05 Oct 2012 19:16:08 +0100 firefox (15.0.1+build1-0ubuntu4) quantal-proposed; urgency=low * Update globalmenu-extension to 3.5.1 - Fix LP: #1051152 - Crash in nsIContent::SetAttr with greasemonkey installed - Improve handling of radio items, and work correctly for radio items without a name (fixes the View -> Page Style submenu) - Stop causing nested DOM mutations. There is a big warning about doing this in nsIMutationObserver.h - Delay processing of DOM mutations during code sections when we are dispatching events. This should prevent a recurrence of reentrancy-triggered crashes such as LP: #1025011, LP: #1035305 and LP: #1051152, which have been exposed by updates of third-party addons recently and caused because our view of the menu changes during event delivery -- Chris Coulson Thu, 27 Sep 2012 13:21:18 +0100 firefox (15.0.1+build1-0ubuntu2) quantal; urgency=low * Repeat after me: - DO NOT UPLOAD BEFORE DRINKING COFFEE - DO NOT UPLOAD BEFORE DRINKING COFFEE - .... -- Chris Coulson Fri, 07 Sep 2012 09:14:01 +0200 firefox (15.0.1+build1-0ubuntu1) quantal; urgency=low * New upstream stable release (FIREFOX_15_0_1_BUILD1) * Fix LP: #1040313 - expose scriptable native window handle - add debian/patches/add-nativehandle-attribute.patch - update debian/patches/series.in -- Chris Coulson Thu, 06 Sep 2012 10:59:59 +0100 firefox (15.0+build1-0ubuntu1) quantal; urgency=low * New upstream stable release (FIREFOX_15_0_BUILD1) People running quantal should consider switching to the Firefox beta PPA next week to start testing Firefox 16, which will be released to Ubuntu 12.10 on around 9th October - https://launchpad.net/~mozillateam/+archive/firefox-next * Update globalmenu-extension to 3.4 final -- Chris Coulson Fri, 24 Aug 2012 22:41:20 +0100 firefox (15.0~b6+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_15_0b6_BUILD1) * Add Acholi to the locale blacklist -- Chris Coulson Wed, 22 Aug 2012 17:27:31 +0100 firefox (15.0~b5+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_15_0b5_BUILD1) -- Chris Coulson Mon, 20 Aug 2012 11:22:04 +0100 firefox (15.0~b4+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_15_0b4_BUILD1) * Update globalmenu-extension to 3.4 prerelease r435 + Drop the edit UI workarounds + Fixes for LP: #1035305 - Crash when switching apps back to Firefox with Firebug installed - Keep the menu we export in sync with the document tree all of the time, rather than only when the menus are on screen. The HUD likes to open submenus without opening any of its ancestors, which can result in us handling events on menu nodes that are no longer in a document if an ancestor responds to a bubbled-up event by removing its children - Ensure we always null check the result of nsIDocument::GetCurrentDoc + When tearing down a menu, make sure that we empty out our DbusmenuMenuitem in case the parent reuses that item for another menu. Fixes a memory leak and an issue where Firebug menu items are duplicated indefinitely each time a menu is opened -- Chris Coulson Sat, 11 Aug 2012 01:24:44 +0100 firefox (15.0~b2+build1-0ubuntu1) quantal-proposed; urgency=low * New upstream release from the beta channel (FIREFOX_15_0b2_BUILD1) * Update globalmenu-extension to 3.4 prerelease r422 + Fixes for LP: #1025011 - HUD search crashes Firefox when Firebug is installed - Provide our own binding for menupopup nodes which derives from the default binding and makes the "state" property work as if there were a frame - Make all menu nodes reference counted, and hold a strong ref when dispatching events, in case the event results in the removal of menu nodes -- Chris Coulson Wed, 25 Jul 2012 17:23:35 +0100 firefox (15.0~b1+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_15_0b1_BUILD1) [ Chris Coulson ] * Update globalmenu-extension to 3.3 * Disable PGO again - update debian/config/branch.mk * Separate the package name from the application name in various places. This enables us to change the package name without having to modify the application or packaging (eg, to allow us to provide official branded versions of Firefox ESR using the package name "firefox-esr") - update debian/README.Debian.in - update debian/apport/source_firefox.py.in - update debian/build/get-orig-source.mk - update debian/control{,.in} - update debian/control.langpacks - update debian/control.langpacks.unavail - update debian/firefox-locale.preinst.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.lintian-overrides.in - update debian/firefox.postinst.in - update debian/firefox.postrm.in - update debian/firefox.preinst.in - update debian/firefox.sh.in - remove debian/patches/change-moz-app-name.patch - update debian/patches/series - update debian/rules - update debian/usr.bin.firefox.apparmor.* * Move parts of debian/rules that can be shared with Thunderbird to a new, common file (mozbuild.mk) - update debian/rules - add debian/build/mozbuild.mk - add debian/build/mozvars.mk - update debian/build/testsuite.mk * Make it possible to use the same create-tarball.py for Firefox and Thunderbird - update debian/build/create-tarball.py - update debian/build/get-orig-source.mk - add debian/config/tarball.conf * Switch to source format 3.0 - add debian/source/format - add debian/source/options to diff-ignore the .mozclient.mk file which is created during clean, and to pass "--no-preparation" - update debian/build/enable-dist-patches.pl - rename debian/patches/series => debian/patches/series.in so the source isn't built with patches applied - update debian/README.source * Goodbye embedded tarball, and our use of tarball.mk! - update debian/build/create-tarball.py - update debian/build/extract-file.py - update debian/build/get-orig-source.mk - update debian/build/mozbuild.mk * Run the upstream cleansrcdir target during clean - update debian/build/mozbuild.mk * Refresh patches - update debian/patches/mozilla-kde.patch * Drop the plugin / abrowser / firefox-branding replaces + breaks on quantal - update debian/rules * Support the "parallel" option in DEB_BUILD_OPTIONS - update debian/build/mozbuild.mk - update debian/config/mozconfig.in * Drop some of the complex shell script for creating language packs - update debian/build/mozbuild.mk - update debian/build/get-xpi-id.py * Drop searchplugin patches - these patches are an absolute pain to maintain, as they seem to break frequently and we have to touch each localized plugin. Instead, just keep our own copy of plugins we modify, and add these in to the language packs at the end of the build process - remove debian/patches/ubuntu-codes-google.patch - remove debian/patches/ubuntu-codes-amazon.patch - remove debian/patches/ubuntu-codes-baidu.patch - update debian/patches/series.in - update debian/build/mozbuild.mk - add debian/searchplugins/* * Get rid of pointless python script - remove debian/build/extract-file.py - update debian/build/mozbuild.mk * Add an automated check for finding search engines that match particular patterns and verifying that they are replaced with our own search engine if we think they should be - add debian/build/check-search-overrides.pl - update debian/build/mozbuild.mk - add debian/searchplugins/overrides.json - update debian/control{,.in} * Drop reload-new-plugins.patch, as this shouldn't actually be needed - remove debian/patches/reload-new-plugins.patch - update debian/patches/series.in * Merge get-orig-source.mk in to mozbuild.mk - update debian/build/mozbuild.mk - remove debian/build/get-orig-source.mk * Handle comments in locales.blacklist - update debian/build/refresh-supported-locales.pl - update debian/config/locales.blacklist * Fork the upstream text preprocessor and add support for additional comparison operators, which means we no longer have to add new defines for every distro version specific change we add - add debian/build/Expression.py - add debian/build/Preprocessor.py - update debian/apport/source_firefox.py.in - update debian/build/mozbuild.mk - update debian/config/mozconfig.in - update debian/firefox-dev.install.in - update debian/firefox-locale.preinst.in - update debian/firefox.desktop.in - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.postrm.in - update debian/firefox.preinst.in - update debian/firefox.prerm.in - update debian/rules * Refresh shipped locales * Drop powerpc patches, which are fixed upstream - remove debian/patches/fix-dtoa-build-on-ppc.patch and - remove debian/patches/fix-build-failure-without-yarr-jit.patch - update debian/patches/series.in * Drop fix-crashreporter-ftbfs-with-gcc4.7.patch, which is fixed upstream [ Adam Conrad ] * Add no_neon_on_arm.patch to skip the NEON tests on ARM, since we don't build with NEON by default on either of our ARM architectures -- Chris Coulson Mon, 23 Jul 2012 12:18:19 +0100 firefox (14.0.1+build1-0ubuntu1) quantal; urgency=low * New upstream stable release -- Chris Coulson Sat, 14 Jul 2012 23:44:16 +0100 firefox (14.0~b12+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b12_BUILD1) -- Chris Coulson Wed, 11 Jul 2012 19:46:08 +0100 firefox (14.0~b11+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b11_BUILD1) [ Ben Collins ] * Cherry pick patch from aurora to use YARR interpreter on ppc - update debian/patches/fix-build-failure-without-yarr-jit.patch - update debian/patches/series * Fix ppc build due to new dtoa library - add debian/patches/fix-dtoa-build-on-ppc.patch - update debian/patches/series [ Matthieu Baerts (matttbe) ] * debian/apport/source_firefox.py.in: - Update apport hook for python3 -- Chris Coulson Wed, 04 Jul 2012 17:01:45 +0100 firefox (14.0~b10+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b10_BUILD1) * Update globalmenu-extension to 3.3 prerelease r388 - Fix a crash in uGlobalMenu::RecycleList::~RecycleList() * Drop debian/patches/plugin-for-mimetype-pref.patch. The burden of carrying this is starting to outweigh the benefits of it -- Chris Coulson Wed, 27 Jun 2012 10:37:38 +0100 firefox (14.0~b9+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b9_BUILD1) [ Chris Coulson ] * Update globalmenu-extension to 3.3 prerelease r386 - Fix LP: #1016081 - Menubar is not hidden when using the Firefox button outside of Unity - Fix LP: #775305 - An empty menu appears when FFChrome is installed - Fix LP: #1017247 - Menubar appears in the window as well as the Unity panel. Manually register our UA stylesheet rather than relying on this happening via chrome registration, to work around a bug in various bootstrapped third party addons (eg, pentadactyl), which initialize and use the stylesheet service before extension chrome is registered for non-restartless addons such as ours - Add a small delay when opening the menu with the keyboard, so that the additional items are added before the menu appears. Fixes an issue where keyboard focus isn't on the first item when opening the history menu with the keyboard * Apport hook improvements: - Sort preferences alphabetically in the apport data - Treat preferences set in default addons as default prefs so that they don't show up in apport data, unless the preference files have been modified - Support random pref files dropped in to the Firefox install folder, and preferences from application bundles - Fix ordering issues when loading preferences * Fix LP: #1013171 - Fully support Python 3 in the apport hook - update debian/apport/source_firefox.py.in [ Martin Pitt ] * Add partial support for Python 3 in the apport hook (LP: #1013171) - update debian/apport/source_firefox.py.in -- Chris Coulson Thu, 21 Jun 2012 11:15:26 +0100 firefox (14.0~b8+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b8_BUILD1) * Update globalmenu-extension to 3.3 prerelease r369 - Fix LP: #1010580 - No choice of folder when adding a bookmark from the bookmark menu - Fix LP: #775080 - Thunderbird with Firetray/MinimizeToTray - Global menu disappears - Fix LP: #813775 - Hitting an assertion in dbusmenu - Fix LP: #861565 - No buttons in the "Show All Bookmarks" dialog -- Chris Coulson Wed, 20 Jun 2012 18:17:11 +0100 firefox (14.0~b7+build1-0ubuntu2) quantal; urgency=low * Fix LP: #1013186 - install our vendor preferences as application defaults rather than GRE defaults, so that they are loaded after the upstream defaults again. The upstream defaults were also moved as part of the webapp runtime work (which has it's own application defaults) - update debian/firefox.install.in - update debian/firefox.links.in -- Chris Coulson Thu, 14 Jun 2012 15:10:21 +0100 firefox (14.0~b7+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b7_BUILD1) * Kill the SDK - nothing in the archive depends on it (note, we still provide the NPAPI SDK though) - update debian/firefox-dev.install.in - update debian/firefox-dev.links.in * Don't support PGO builds on armhf. The builders are incapable of building it - update debian/rules -- Chris Coulson Wed, 13 Jun 2012 16:15:03 +0100 firefox (14.0~b6+build2-0ubuntu2) quantal-proposed; urgency=low * It seems that the preferences moved back again. Thanks for that last minute change, it's most appreciated! - update debian/firefox.install.in - update debian/firefox.links.in - update debian/apport/source_firefox.py.in -- Chris Coulson Wed, 06 Jun 2012 09:43:50 +0100 firefox (14.0~b6+build2-0ubuntu1) quantal-proposed; urgency=low * New upstream release from the beta channel (FIREFOX_14_0b6_BUILD1) * Update globalmenu-extension to 3.2.4 prerelease r338 * Refresh patches - update debian/patches/allow-lockPref-everywhere.patch - update debian/patches/plugin-for-mimetype-pref.patch - update debian/patches/ubuntu-codes-google.patch - update debian/patches/add-syspref-dir.patch * Drop patches fixed upstream - remove debian/patches/revert-bmo-621446-investigation.patch - remove debian/patches/fix-ftbfs-in-test-poison-area-with-gcc4.7.patch - update debian/patches/series * Add Keywords to the desktop file - update debian/firefox.desktop.in * Update desktop file translations - update debian/firefox.sh.in * Ensure that additional actions in the desktop file match the fd.o spec in precise and newer - update debian/firefox.desktop.in - update debian/rules * Fix a small leak in nsPluginHost::FindPluginForType, caused by one of our patches - update debian/patches/plugin-for-mimetype-pref.patch * When a plugin is chosen using a "modules.plugins.mimetype." pref, only use it if it is enabled and handles the requested mimetype - update debian/patches/plugin-for-mimetype-pref.patch * Drop the application/vnd.mozilla.xul+xml mimetype from the desktop file. Firefox hasn't been able to view XUL files from non-chrome URI's since version 4.0 - update debian/firefox.desktop.in * Add application/x-xpinstall to the MimeType field of the desktop file - update debian/firefox.desktop.in * Drop the ability to select between tree/system libraries using a single option in debian/rules. It adds additional complexity and was never used - update debian/config/mozconfig.in - update debian/control.in - update debian/firefox-dev.install.in - update debian/firefox-dev.links.in - update debian/pkgconfig/libxul.pc.in - update debian/rules * Pref location changed to defaults/preferences - update debian/firefox.install.in - update debian/firefox.links.in - update debian/apport/source_firefox.py.in * Update StartupWMClass to the correct name - update debian/firefox.desktop.in - update debian/rules * Add search plugin for DuckDuckGo * Fix LP: #1000820 - firefox-dev conflicts with xulrunner-1.9-dev for people with the latter still installed - update debian/control{,.in} * Add Fulah to locales.blacklist -- Chris Coulson Tue, 05 Jun 2012 22:29:35 +0100 firefox (13.0~b7+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_13_0b7_BUILD1) -- Chris Coulson Fri, 01 Jun 2012 16:23:01 +0100 firefox (13.0~b6+build1-0ubuntu2) quantal; urgency=low * Switch back to GCC 4.7 now that the issues with bitfield stores are fixed, and also reenable PGO (LP: #1003733) - update debian/config/branch.mk - update debian/control{,.in} -- Chris Coulson Thu, 31 May 2012 13:52:01 +0100 firefox (13.0~b6+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_13_0b6_BUILD1) * Fix for NSS libs not being signed, breaking FIPS - update debian/rules -- Chris Coulson Tue, 29 May 2012 10:24:57 +0100 firefox (13.0~b5+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_13_0b5_BUILD1) * Switch back to gcc 4.6 until LP #1003733 is fixed. This means we also turn off PGO again - update debian/config/branch.mk * Single quotes in preference values break the Apport hook - update debian/source_firefox.py.in -- Chris Coulson Sat, 26 May 2012 00:05:19 +0100 firefox (13.0~b4+build1-0ubuntu4) quantal; urgency=low * Shuffle the order of google-breakpad/src/common/dwarf/Makefile.in to fix a variable substitution issue, which was causing some objects to be built with the wrong compiler flags, resulting in dump_syms crashing (LP: #1002590) - add debian/patches/fix-makefile-substitution-bug.patch * Build with --disable-methodjit on armel in quantal - update debian/config/mozconfig.in * Turn crash reporter back on again - update debian/config/branch.mk -- Chris Coulson Tue, 22 May 2012 17:38:38 +0100 firefox (13.0~b4+build1-0ubuntu3) quantal; urgency=low * Turn off the crash reporter again, as dump_syms crashes when building the breakpad symbols in the build with gcc 4.7 (how ironic!). Needs further investigation - update debian/config/branch.mk * Don't build with --enable-thumb2 on armel in Quantal - update debian/rules - update debian/config/mozconfig.in * Whitelist the architectures we care about for PGO (i386, amd64 and armhf). - update debian/build/mozbuild.mk -- Chris Coulson Tue, 22 May 2012 02:23:57 +0100 firefox (13.0~b4+build1-0ubuntu2) quantal; urgency=low * Fix weird build failure caused by running clean target without xutils-dev installed, exposed by turning on PGO - add debian/patches/fix-clean-with-pgo.patch - update debian/patches/series * Update debian/patches/make-makefile-test-fix.patch to actually do the right thing this time -- Chris Coulson Fri, 18 May 2012 03:23:08 +0100 firefox (13.0~b4+build1-0ubuntu1) quantal; urgency=low * New upstream release from the beta channel (FIREFOX_13_0b4_BUILD1) * Build with PGO. This will probably get turned off again later in the quantal cycle though - update debian/config/branch.mk * Backport patch from mozilla-central to fix a crashreporter build failure with gcc 4.7 - add debian/patches/fix-crashreporter-ftbfs-with-gcc4.7.patch - update debian/patches/series * Turn the crashreporter back on again - update debian/rules * Fix make-makefile test failure when the build directory contains perl regexp control characters - add debian/patches/make-makefile-test-fix.patch - update debian/patches/series -- Chris Coulson Thu, 17 May 2012 18:13:24 +0100 firefox (13.0~b3+build1-0ubuntu1) quantal; urgency=low [ Chris Coulson ] * New upstream release from the beta channel (FIREFOX_13_0b3_BUILD1) * Refresh build-depends: - Bump minimum GTK version to 2.14 as we build with GIO support - Add minimum requirement for glib (2.18) - Drop libidl-dev, this doesn't appear to be needed now - Bump minimum NSPR version to 4.9.0 for --enable-system-nspr builds - Bump minimum sqlite version to 3.7.10 for --enable-system-sqlite builds - Bump minimum NSS version to 3.13.2 for --enable-system-nss builds * Refresh patches: - update debian/patches/ubuntu-ua-string-changes.patch - update debian/patches/ubuntu-codes-google.patch - update debian/patches/dont-include-hyphenation-patterns.patch * Clean up the file exclude list and add comments for excluded files - update debian/build/create-tarball.py * Make it easy to run Firefox in valgrind for builds that are compiled with explicit valgrind support - update debian/firefox.sh.in * Bump debhelper compat to 7 - update debian/apport/blacklist.in - update debian/apport/source_firefox.py.in - update debian/compat - update debian/config/mozconfig.in - update debian/control.in - update debian/firefox-dev.install.in - update debian/firefox-dev.links.in - update debian/firefox-globalmenu.dirs.in - update debian/firefox-gnome-support.install.in - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.preinst.in - update debian/firefox.sh.in - update debian/pkgconfig/libxul.pc.in - update debian/pkgconfig/mozilla-nspr.pc.in - update debian/pkgconfig/mozilla-plugin.pc.in - update debian/rules - update debian/usr.bin.firefox.apparmor.10.04 - update debian/usr.bin.firefox.apparmor.10.10 - update debian/usr.bin.firefox.apparmor.11.04 - update debian/usr.bin.firefox.apparmor.12.04 - update debian/usr.bin.firefox.apparmor.9.10 * Override 2 embedded-library lintian errors - update debian/firefox.lintian-overrides.in * Drop debian/patches/distro-locale-searchplugins after landing of bmo: #515232 * Don't hardcode general.useragent.locale to en-US, now that it's used for searchplugin localization. This means we can drop this pref from ubufox - add debian/patches/dont-override-general-useragent-locale.patch - update debian/patches/series * Drop patches fixed upstream - remove debian/patches/no-sps-profiler-on-unsupported-archs.patch - remove debian/patches/avoid-dbus-roundtrip-for-httpchannel.patch - update debian/patches/series * Apport hook improvements: - Add support for reporting preference defaults that are set by extensions - When reporting preferences, record the source of each preference - Report plugin packages for plugins that are installed with the package manager - Add some addon manager related prefs to the whitelist - Display additional metadata in the extensions report - Take "default-to-compatible" in to account when determining whether the user is running incompatible addons - Attach submitted crash ID's to bug reports - Report if files in the profile folder have broken permissions - Report errors when parsing preferences and plugins - Handle preferences spanning across multiple lines * Fix LP: #993273 - Exception thrown in Apport hook with preferences which have empty values - update debian/apport/source_firefox.py.in * Update compare-locales to 0.9.5 * Disable crash reporter on quantal - update debian/rules * Fix a build failure in TestPoisonArea.cpp with gcc 4.7 - add debian/patches/gcc-4.7-fix-in-test-poison-area.patch - update debian/patches/series [ Jamie Strandboge ] * adjust apparmor profile to deny reads to @{PROC}/[0-9]*/net/dev. Patch thanks to James Troup (LP: #955066) * adjust apparmor profile to deny reads to @{PROC}/[0-9]*/net/wireless. Patch thanks to James Troup (LP: #974141) -- Chris Coulson Wed, 09 May 2012 14:26:15 -0700 firefox (12.0+build1-0ubuntu0.12.04.1) precise-security; urgency=low * New upstream stable release (FIREFOX_12_0_BUILD1) - see LP: #987262 for USN information * Update globalmenu-extension to 3.2.3 - Fix regression introduced by the fix for LP: #915888 * Firefox recommends libcanberra0 now that bmo: #635918 has landed - update debian/control{,in} * Refresh patches - update debian/patches/avoid-dbus-roundtrip-for-httpchannel.patch - update debian/patches/no-sps-profiler-on-unsupported-archs.patch - update debian/patches/ubuntu-codes-google.patch * Refresh locales - refresh debian/config/locales.all - refresh debian/control * Make the language packs Architecture: any. Whilst they are actually architecture independent, we do install them in to /usr/lib (as the extensions location is shared with architecture-specific extensions). This also avoids the problem of offering incompatible language pack upgrades to users on architectures where Firefox fails to build (I'm looking at you, powerpc) - update debian/control.langpacks - update debian/control.langpacks.unavail - update debian/rules - refresh debian/control * Disable fix-build-failure-without-yarr-jit.patch, as it needs some work. This means that there is currently no powerpc support -- Chris Coulson Mon, 23 Apr 2012 13:13:27 +0100 firefox (11.0+build1-0ubuntu4) precise; urgency=low * Update globalmenu-extension to 3.2 - Fix LP: #915888 - Handling of checkbox menuitems with a command node is completely broken - Make uGlobalMenu::RemoveMenuObjectAt work correctly when removed items are not contiguous - Don't try to recycle an item that wasn't a separator as an item that is a separator, as this breaks the menu (we already ensured that the reverse of this couldn't happen) -- Chris Coulson Tue, 10 Apr 2012 11:44:48 +0100 firefox (11.0+build1-0ubuntu3) precise; urgency=low * Update globalmenu-extension to 3.1 - Fix a crash where a menu is destroyed whilst there is a pending event to empty its recycle list -- Chris Coulson Mon, 02 Apr 2012 16:19:01 +0100 firefox (11.0+build1-0ubuntu2) precise; urgency=low * Update globalmenu-extension to 3.0.1 - Reduce our memory footprint a bit, which wasn't really a lot anyway - Avoid the use of the component manager for accessing commonly used services, where "commonly used" means "accessed when building every menu item". This should save some CPU cycles when building or refreshing menus - Try to recycle menuitems when they are removed from a menu by adding contiguous blocks of removed items to a "free list" which is emptied asynchronously, and reusing the items in this list when new items are added in place of the removed items. This means that refreshing the history menu contents when the menu is opened no longer alters the menu structure, but results in a shifting of properties between existing nodes instead. This has a few benefits: + With no layout changes, unity-panel-service doesn't request the entire menu structure, which significantly reduces dbus traffic and makes it much faster to refresh the menu contents + The size of the menu doesn't change when it is refreshed, which eliminates the flicker that used to occur when opening the history menu. + The HUD can refresh our menus now without triggering layout updates (assuming that menu layout really hasn't changed, eg, by adding a bookmark) - Remove all use of the global observer service for sending our own internal notifications around - Clean up the way we ensure that the correct edit commands are enabled by just installing our own popupshowing handler rather than using an additional notification to fix things up after the default handler runs - Get rid of a static initializer - Don't support older than Firefox 11 - Fix some GError leaks - Hide the internal menu when creating a native menu, rather than waiting for confirmation that the native menu is registered successfully. We don't try to create a native menu if we don't find a menu service to register the menu with anyway - Keep menu contents updated whilst the menu is open, rather than just whilst it is opening -- Chris Coulson Mon, 02 Apr 2012 08:30:28 +0100 firefox (11.0+build1-0ubuntu1) precise; urgency=low * New upstream stable release (FIREFOX_11_0_BUILD1) * Clean up search plugin installation now that we build our own language packs: - Drop the recursive symlink from /usr/lib/firefox-addons/searchplugins, which lintian kept complaining about - Don't effectively symlink distribution/searchplugins to searchplugins, as they have different layouts and this avoids the same data being iterated over twice - Revert to the upstream layout in distribution/searchplugins - Simplify distro-locale-searchplugins.patch, as we don't need to swap the loading order of common / locale-specific searchplugin paths now. $LIBDIR/distribution/searchplugins/common is no longer a symlink to $LIBDIR/searchplugins, so there is no need to have the ability for locale-specific plugins to override common ones. They already override those in $LIBDIR/searchplugins - add debian/firefox-locale.preinst.in, which will end up in all language packs to assist the symlink -> folder transition - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.preinst.in - update debian/patches/distro-locale-searchplugins.patch - update debian/rules * Fix LP: #807733 - Firefox doesn't restart after upgrades where the version changes. Don't include the version number in the install path, as Firefox cannot re-exec itself. In doing this, we also move the distribution.ini back in to our installation directory, as that never made sense in /usr/lib/firefox-addons - update debian/firefox-dev.install.in - update debian/firefox-dev.links.in - update debian/firefox-locale.preinst.in - update debian/firefox.lintian-overrides.in - update debian/firefox.preinst.in - update debian/rules * Expose distribution/extensions in /usr/lib/firefox-addons, to allow administrators to add extensions that they want to add to default user profiles, and that they want the addon manager to keep updated. We lost this functionality when upgrading from Firefox 3.6, due to the loss of /etc/firefox/profile - update debian/firefox.dirs.in - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in -- Chris Coulson Tue, 13 Mar 2012 14:05:38 +0000 firefox (11.0~b7+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b7_BUILD1) -- Chris Coulson Fri, 09 Mar 2012 11:07:47 +0000 firefox (11.0~b6+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b6_BUILD1) [ Jamie Strandboge ] * debian/usr.bin.firefox.apparmor.*: - allow access to statm and smaps for about:memory (LP: #911494) - allow read access to files in /opt (LP: #728485) [ Chris Coulson ] * Update debian/patches/fix-build-failure-without-yarr-jit.patch * Fix LP: #926495 - Disable the SPS profiler on unsupported architectures - add debian/patches/no-sps-profiler-on-unsupported-archs.patch - update debian/patches/series -- Chris Coulson Thu, 08 Mar 2012 16:15:52 +0000 firefox (11.0~b5+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b5_BUILD1) [ Jamie Strandboge ] * debian/usr.bin.firefox.apparmor.12.04: fix typo (LP: #941293) -- Chris Coulson Fri, 02 Mar 2012 11:20:44 +0000 firefox (11.0~b4+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b4_BUILD1) * Update globalmenu-extension to 2.0.4 - Add support for Firefox 12 - Ensure we correctly hide dummy menu items * Fix LP: #915895 - Just set autoDisableScopes to 0. Other distributions are already doing this, and we already made this feature pretty much useless by allowing extensions in the application directory, so that our language packs aren't disabled by default - update debian/vendor.js * Fix LP: #926495 - Add patch based on one from bmo: #691898 to enable building on ppc again - add debian/patches/fix-build-failure-without-yarr-jit.patch - update debian/patches/series * Fix LP: #939657 - Don't call g_settings_new each time we create a HTTP channel. Doing this causes a dbus roundtrip, and results in us spamming the session bus unnecessarily - add debian/patches/avoid-dbus-roundtrip-for-httpchannel.patch - update debian/patches/series * Fix LP: #894166 - Make Firefox work with our system hyphenation patterns, and stop including our own - update debian/vendor.js - add debian/patches/dont-include-hyphenation-patterns.patch - update debian/patches/series [ Jamie Strandboge ] * debian/usr.bin.firefox.apparmor.12.04: include p11-kit abstraction (only needed on 12.04). LP: #918973 -- Chris Coulson Fri, 24 Feb 2012 14:55:30 +0000 firefox (11.0~b3+build2-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b3_BUILD2) -- Chris Coulson Thu, 16 Feb 2012 21:57:08 +0000 firefox (11.0~b2+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b2_BUILD1) * Refresh debian/patches/ubuntu-ua-string-changes.patch -- Chris Coulson Fri, 10 Feb 2012 20:24:39 +0000 firefox (11.0~b1+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_11_0b1_BUILD1) - Fix LP: #875266 - Firefox ignores GNOME3 proxy settings - Fix LP: #857153 - Needs to get accessibility settings from GSettings * Update globalmenu-extension to 2.0.3 * Ensure that the crash reporter is disabled if rebuilt by Ubuntu derivatives, as there will be no crash symbols for those - update debian/rules * Only add "Ubuntu" to the UA string when being built for Ubuntu - update debian/rules * Drop obsolete Debian menu file - remove debian/firefox.menu.in - don't create a 32x32 xpm icon in debian/rules - drop the imagemagick build-depend in debian/control * Temporarily disable ipdl tests due to build failures. These aren't enabled upstream, anyway - update debian/config/mozconfig.in * Always set the update channel - not setting it at build-time on release builds breaks the extensions.checkCompatibility pref. The only things using it at runtime are nsBlocklistService, Test Pilot (beta + aurora) and the about dialog (where the channel is hidden anyway) - update debian/rules - update debian/firefox.install.in * Don't declare an extra DEB_ENABLE_THUMB2 variable, as it's only used for the mozconfig. Just do the "if DEB_HOST_ARCH == armel" check directly there instead - update debian/rules - update debian/config/mozconfig.in * Fix LP: #898883 - IPC xpcshell tests hang the buildd's. Give all xpcshell tests an X display, as plugin-container won't work without one - update debian/build/testsuite.mk * Turn on all IPC xpcshell tests again - update debian/build/testsute.mk * Drop the default-apps xml file from lucid and maverick - there is already one provided by gnome-control-center, which means that ours is only relevant for nightly builds. It's not worth the extra complexity for this - remove debian/firefox.xml.in - update debian/firefox-gnome-support.install.in - update debian/rules * Ship Test Pilot as a distribution addon, like upstream. This means that the addon manager can update it. It does also mean that it will remain installed in users profiles if they try the beta or aurora builds, but the Feedback button is disabled on release builds - update debian/firefox.install.in - fixes LP: #913357 * Drop patches fixed upstream - remove debian/patches/fix-build-failure-without-yarr-jit.patch - remove debian/patches/fix-cursor-handling.patch - update debian/patches/series * Keep the firefox-kde-support suggest on releases older than precise for now - update debian/rules * Ensure that we suggest kmozillahelper on lucid - update debian/rules * Ensure that we replace kubuntu-firefox-installer on lucid - update debian/rules * Don't build with --disable-gconf on precise and newer. There won't be a hard runtime requirement on this from Firefox 12 anyway, and this keeps us closer to the upstream configuration - update debian/config/mozconfig.in - update debian/rules * Call xvfb-run with "-a" in case there are other servers running on the builder - update debian/build/testsuite.mk * Really fix LP: #898883 - IPC xpcshell tests hang the build. What was actually happening is plugin-container would fail to start because all available X connections had been used up by many instances of dbus-launch, spawned each time an xpcshell tried to talk to the session bus. Because we run all of the xpcshell tests with one Xvfb instance, the buses accumulate until the available X connections all run out. To fix this, run all tests requiring a display inside dbus-launch, so we create just a single bus for all xpcshell tests - update debian/build/testsuite.mk - update debian/control{,.in} * Add Ligurian to locale blacklist, as we don't support this in Ubuntu - update debian/config/locales.blacklist -- Chris Coulson Thu, 02 Feb 2012 18:40:28 +0000 firefox (10.0~b6+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_10_0b6_BUILD1) -- Chris Coulson Thu, 26 Jan 2012 19:39:54 +0000 firefox (10.0~b5+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_10_0b5_BUILD1) [ Micah Gersten ] * Fix LP: #917529 - Make sure new transitional packages have a versioned dependency on Firefox so as to not break Firefox during partial upgrades - update debian/control{,.in} [ Chris Coulson ] * Make it possible to have per-arch patches - update debian/build/enable-dist-patches.pl - update debian/rules - update debian/patches/series * Drop the solid white separators from the addressbar autocomplete dropdown, and increase padding so that it doesn't look so bad with dark themes - add debian/patches/autocomplete-theme-tweak.patch - update debian/patches/series * Fix LP: #908508 - Add patch from upstream to fix powerpc build failure. Only apply this patch on powerpc to avoid compromising the quality of the architectures that we care about - add debian/patches/fix-build-failure-without-yarr-jit2.patch - update debian/patches/series * Also make the previous powerpc build fix apply on ppc only - update debian/patches/series -- Chris Coulson Thu, 19 Jan 2012 21:33:22 +0000 firefox (10.0~b4+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_10_0b4_BUILD1) [ Jamie Strandboge ] * debian/usr.bin.firefox.apparmor.12.04: update comment for Ux rules [ Chris Coulson ] * Refresh shipped locales for the current beta (adds Assamese) - refresh debian/config/locales.shipped - refresh debian/control -- Chris Coulson Fri, 13 Jan 2012 10:25:10 +0000 firefox (10.0~b3+build2-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_10_0b3_BUILD2) * "Fix" LP: #897794 - some websites expect "X11" to be the first token of the platform component in the UA string - update debian/patches/ubuntu-ua-string-changes.patch * Defuzz ubuntu-codes-google.patch -- Chris Coulson Thu, 05 Jan 2012 16:43:28 +0000 firefox (10.0~b2+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_10_0b2_BUILD1) * Disable the tests on powerpc, because it sucks too much to run them - update debian/rules -- Chris Coulson Mon, 02 Jan 2012 17:41:18 +0000 firefox (10.0~b1+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_10_0b1_BUILD1) [ Chris Coulson ] * Update patches for PRBool -> bool transition - refresh debian/patches/firefox-kde.patch - refresh debian/patches/mozilla-kde.patch - refresh debian/patches/ubuntu-ua-string-changes.patch * Drop some more hanging IPC xpcshell tests - update debian/build/testsuite.mk * Borrow functionality from Chromium package to have distro specific patches - update debian/rules - add debian/build/enable-dist-patches.pl * Don't enable unity-globalmenu-build-support.patch on lucid and maverick - update debian/patches/series * Remove prerm hook for cleaning up pyc files in the apport package-hooks folder. Nothing creates these - update debian/firefox.prerm.in * Set up alternatives in the postinst script on abort-remove too - update debian/firefox.postinst.in * Imporove maintainer script magic for moving the system pref file and removing obsolete conffiles when upgrading from 3.6, by doing what dpkg-maintscripts-helper does - update debian/firefox.postinst.in - update debian/firefox.postrm.in - update debian/firefox.preinst.in * Only run the Apparmor stuff in the postinst script on configure, and in the preinst script on install or upgrade, to handle upgrade failures more gracefully - update debian/firefox.postinst.in - update debian/firefox.preinst.in * Add add-syspref-dir.patch for Lucid and Maverick builds only, so we get nightly/aurora coverage for this - add debian/patches/add-syspref-dir.patch - update debian/patches/series - update debian/rules - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.postrm.in - update debian/firefox.preinst.in * Drop the Ubuntuzilla workarounds now - update debian/firefox.postinst.in * Refresh patches - update debian/patches/mozilla-kde.patch - update debian/patches/allow-lockPref-everywhere.patch - update debian/patches/ubuntu_bookmarks.patch * Turn off Network Manager integration for now, as it causes Firefox to always start in offline mode. In any case, probing Network Manager isn't the most reliable way to test if there is a connection - update debian/vendor.js * Update after landing of bmo: #701875 - Rename omni.jar to omni.ja - update debian/firefox.install.in * Update mozilla-kde.patch and firefox-kde.patch to remove the use of nsCStringArray, which was dropped from Firefox 10 * Disable KDE patches, which currently don't work with Firefox 10 - update debian/patches/series * Drop the firefox-kde-support suggest on precise onwards, whilst the patches are disabled - update debian/rules - update debian/control{,.in} [ Micah Gersten ] * Rebase patches for PRBool -> bool transition (bmo: 675553) - update debian/patches/allow-lockPref-everywhere.patch - update debian/patches/mozilla-kde.patch * Drop patch after upstream landing of (bmo: 690432) aka Logging.h passes a string directly to printf - drop debian/patches/printf-fix.patch - update debian/patches/series -- Chris Coulson Thu, 22 Dec 2011 23:26:50 +0000 firefox (9.0~b6+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_9_0b6_BUILD1) [ Jamie Strandboge ] * add debian/usr.bin.firefox.apparmor.12.04 and adjust it to declare a @{MOZ_LIBDIR} which will help with overrides * debian/rules: adjust to install the profile on 12.04 * debian/usr.bin.firefox.apparmor.12.04: don't use @{MOZ_LIBDIR} variable for the binary names [ Chris Coulson ] * Fix LP: #901838 - Ugly busy pointer, due to libxcursor no longer matching the cursor bitmap to a nice themed pointer - add debian/patches/fix-cursor-handling.patch - update debian/patches/series -- Chris Coulson Thu, 15 Dec 2011 14:00:30 +0000 firefox (9.0~b5+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_9_0b5_BUILD1) [ Micah Gersten ] * Add patch from upstream to hopefully fix PowerPC FTBFS (bmo: 703534) aka Build failure on platforms without YARR JIT - add debian/patches/fix-build-failure-without-yarr-jit.patch - update debian/patches/series [ Chris Coulson ] * Don't install the libxul pkgconfig file in precise. Mozvoikko doesn't need this anymore - update debian/rules - update debian/firefox-dev.install.in -- Chris Coulson Fri, 09 Dec 2011 13:29:20 +0000 firefox (9.0~b4+build1-0ubuntu2) precise; urgency=low * Add missing build-dep on non-essential locales, since we use it. -- Adam Conrad Fri, 02 Dec 2011 23:24:05 -0700 firefox (9.0~b4+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_9_0b4_BUILD1) -- Chris Coulson Fri, 02 Dec 2011 11:27:15 +0000 firefox (9.0~b3+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_9_0b3_BUILD1) -- Chris Coulson Thu, 24 Nov 2011 17:04:18 +0000 firefox (9.0~b2+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_9_0b2_BUILD1) -- Chris Coulson Thu, 17 Nov 2011 22:15:30 +0000 firefox (9.0~b1+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_9_0b1_BUILD1) * Update globalmenu-extension to 2.0.2 * Install the Apport hook as a source package hook - rename debian/apport/firefox.py.in => debian/apport/source_firefox.py.in - update debian/firefox.install.in - update debian/rules * Don't unconditionally overwrite SourcePackage when reporting bugs with the nightly apport hook - update debian/apport/source_firefox.py.in * Set "Channel = Unavailable" if channel-prefs.js doesn't contain a channel name - update debian/apport/source_firefox.py.in * Ensure that create-tarball can handle there not being a locale blacklist - update debian/build/create-tarball.py * Drop xpt.py and xpidl from $LIBDIR. xpidl is gone, and xpt.py isn't included there in the upstream SDK - update debian/firefox-dev.links.in * Refresh patches - update debian/patches/firefox-kde.patch - update debian/patches/mozilla-kde.patch * Drop patches fixed upstream - remove debian/patches/only-add-ENABLE_JIT-to-CXXFLAGS-if-jit-is-enabled.patch - update debian/patches/series * Turn off the one-time addon selection dialog (LP: #888307) - update debian/vendor.js * Ensure we include locales in the tarball if they are in shipped-locales but not in all-locales - update debian/build/create-tarball.py -- Chris Coulson Tue, 15 Nov 2011 21:26:09 +0000 firefox (8.0+build1-0ubuntu1) precise; urgency=low * New upstream stable release (FIREFOX_8_0_BUILD1) -- Chris Coulson Sun, 06 Nov 2011 20:55:39 +0000 firefox (8.0~b6+build2-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_8_0b6_BUILD2) -- Chris Coulson Thu, 03 Nov 2011 10:16:44 -0400 firefox (8.0~b6+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_8_0b6_BUILD1) * Don't disable our bundled addons on upgrade - update debian/vendor.js * Refresh supported locales as upstream added Kashubian for beta - refresh debian/config/locales.all - refresh debian/config/locales.shipped - refresh debian/control -- Chris Coulson Tue, 01 Nov 2011 17:54:35 -0400 firefox (8.0~b4+build1-0ubuntu2) precise; urgency=low * Backport patch from aurora to correctly handle EOF in js::TokenStream::getAtSourceMappingURL on platforms with unsigned chars - add debian/patches/correctly-handle-EOF.patch - update debian/patches/series -- Chris Coulson Sun, 23 Oct 2011 00:02:42 +0100 firefox (8.0~b4+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_8_0b4_BUILD1) -- Chris Coulson Thu, 20 Oct 2011 13:33:48 +0100 firefox (8.0~b3+build1-0ubuntu1) precise; urgency=low * New upstream release from the beta channel (FIREFOX_8_0b3_BUILD1) [ Chris Coulson ] * Provide a useful error message when trying to build the source package with an out of date control file - update debian/rules * Provide a way to prevent the source package from being built if the list of shipped locales changed upstream. Note that this is disabled on nightly and aurora - update debian/rules - add debian/extract-file.py * Move custom scripts to debian/build - move debian/get-xpi-id.py to debian/build/get-xpi-id.py - move debian/refresh-supported-locales.pl to debian/build/refresh-supported-locales.pl - move debian/extract-file.py to debian/build/extract-file.py - update debian/rules * Dropped patches fixed upstream: - remove debian/patches/build-fix-for-no-ENABLE_YARR_JIT.patch - remove debian/patches/compile-pldhash-as-C++.patch - update debian/patches/series * Refresh patches: - update debian/patches/firefox-kde.patch - update debian/patches/mozilla-kde.patch - update debian/patches/ubuntu-codes-google.patch * Update support for doing PGO builds: - Add "mk_add_options MOZ_PGO=1" to mozconfig when doing a PGO build, rather than changing the make target to "profiledbuild" - update debian/mozconfig.in - update debian/rules - Run the profiling 10 times - update debian/mozconfig.in - Don't turn off the crash reporter or force unofficial branding for PGO builds - update debian/rules - Don't force the compiler to gcc-4.5 when doing PGO builds. Instead, we will just rely on the default compiler and not enable PGO on Ubuntu versions which don't have a new enough toolchain - update debian/rules * Shrink the default mozconfig right down, by using defaults rather than forcing things like --disable-system-cairo and friends. We still retain the ability to override the defaults though by setting MOZ_OVERRIDE_SHLIBS to either "tree" or "system", but we use upstream defaults now. We also drop the pkg-config checks in debian/rules which allowed a fallback build configuration when dependencies aren't satisfied. Really, the build should just fail here rather than continuing in some undesirable fallback mode - update debian/firefox-dev.install.in - update debian/firefox-dev.links.in - update debian/mozconfig.in - update debian/pkgconfig/libxul.pc.in - update debian/control.in - update debian/rules * Refresh build-depends, as this hasn't been done for a while: - Drop patchutils, libxft-dev, libxinerama-dev, libgnome2-dev and bzip2. These don't appear to be needed - Drop liborbit2-dev - only appears to be required if there is no libidl - Add libglib2.0-dev, libext-dev, libfontconfig1-dev and libpango1.0-dev, as the configure script checks for these directly - Add minimum versions to libgconf2-dev, libgnomevfs2-dev, yasm and libgnomeui-dev - Specify minimum versions for libnspr4-dev, libcairo2-dev, libsqlite3-dev and libnss3-dev when using system versions of those libs * Disable gconf support on >= 12.04 - update debian/rules - update debian/mozconfig.in * Refresh binary dependencies: - Change ubufox recommends to xul-ext-ubufox - Drop psmisc and fontconfig depends. We don't use any binaries from either of these packages - Drop debianutils dependency. This is an essential package * Disable printing of a lot of makefile commands to reduce noise. Also add some headers in various places - update debian/rules * Introduce a branch-specific config file (debian/config/branch.mk) which will hold settings that are tied to a specific branch, and which shouldn't be merged between branches when merging new Firefox versions (eg, whether the crash reporter should be enabled on a branch). The idea is to confine these types of settings to a single file - add debian/config/branch.mk - update debian/rules * Move debian/locales.* to debian/config - move debian/locales.shipped => debian/config/locales.shipped - move debian/locales.unavail => debian/config/locales.unavail - move debian/locales.blacklist => debian/config/locales.blacklist - update debian/rules - update debian/build/refresh-supported-locales.pl * Move debian/testsuite.mk to debian/build * Don't open about:blank from the New Window quicklist entry - update debian/firefox.desktop.in * We need to keep the complete list of language packs (shipped and transitional) in sync between branches. However, this was proving to be difficult because the list was split across 2 files (locales.shipped and locales.unavailable). Rework this so that we have a locales.all (containing the list of current and past language packs), and a locales.shipped. The locales.all can be easily kept in sync between branches now, so we end up with the correct transitional language packs on branches which have some languages disabled. This also makes it more complicated to add the language packs to debian/control though, so we offload this to a new perl script now rather than trying to do it all in bash - add debian/build/dump-langpack-control-entries.pl - update debian/build/refresh-supported-locales.pl - add debian/config/locales.all - update debian/config/locales.shipped - remove debian/config/locales.unavailable - update debian/control - update debian/rules * Touch debian/control.in during clean to force a refresh of debian/control, so we can check if it is out-of-date and fail if it is - update debian/rules * Ensure that we get the correct package relationships depending on the target distro version - update debian/control.in - update debian/rules - refresh debian/control * Drop the mozilla-devscripts dependency. We were only using this for creating tarballs anyway. Instead, implement our own get-orig-source target, which also fixes some problems we were having - update debian/control.in - remove debian/moz-rev.sh - update debian/rules - remove debian/mozclient/firefox.mk - remove debian/mozclient/firefox.conf - update debian/config/branch.mk - add debian/build/create-source - add debian/build/get-orig-source.mk * Drop the 'nobinonly' suffix from the version number. All this really does is make the version number longer without adding any useful information, because: - We don't strip all binary files as there are a lot remaining which are used by the test-suite (eg, images, fonts, videos, sqlite dbs, extensions) - Stripping binary files from the source tarball isn't the only change we make to it. We also merge in the upstream l10n data, but we don't indicate that in the version number * Keep a copy of shipped-locales outside of the embedded tar.bz2. This makes it faster to verify the list of shipped locales when creating source packages - update debian/build/create-tarball.py - update debian/build/extract-file.py - update debian/rules * When calling refresh-supported-locales, automatically refresh debian/control too - update debian/rules * Don't fail to create the tarball if locales listed in all-locales don't really exist upstream. We already check that everything in shipped-locales exists - update debian/build/create-tarball.py * Refresh shipped locales for beta * Don't fail to create a tarball when not using a local cache - update debian/build/create-tarball.py * Modify the UA string to add "Ubuntu" to the platform component - add debian/patches/ubuntu-ua-string-changes.patch - update debian/patches/series - update debian/rules [ Brian Murray ] * Fix LP: #758111 - update ubuntulinux.org bookmark - thanks to Jonathan Rothwell for the patch -- Chris Coulson Tue, 18 Oct 2011 14:10:41 +0100 firefox (7.0.1+build1+nobinonly-0ubuntu2) oneiric-proposed; urgency=low * We need to keep the postinst magic for the distribution.ini folder -> symlink transition permanently to handle upgrades from Natty, as Natty users are upgrading from the the same upstream version of Firefox as Oneiric, and always will be. This means that we can't rely on the install location changing during the upgrade (LP: #869311) - update debian/firefox.postinst.in -- Chris Coulson Sat, 08 Oct 2011 01:03:07 +0100 firefox (7.0.1+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream stable release (FIREFOX_7_0_1_BUILD1) - Fixes LP: #861664 * Add Mongolian and Swahili to locale blacklist. These aren't meant to be built on the release channel, but they still appear in the upstream shipped-locales - update debian/locales.blacklist * Drop the temporary postinst magic for the distribution.ini folder -> symlink transition. The new upstream release means that the install location changes, so this is redundant now - update debian/firefox.postinst.in -- Chris Coulson Wed, 28 Sep 2011 23:53:21 +0100 firefox (7.0+build2+nobinonly-0ubuntu4) oneiric; urgency=low * Really fix LP: #858683 - Clean up the symlinks for users who upgraded to 7.0+build2+nobinonly-0ubuntu2; This means checking for everything before the -0ubuntu3 revision since the -0ubuntu2 users already upgraded - update debian/firefox.postinst.in -- Micah Gersten Mon, 26 Sep 2011 01:30:33 -0500 firefox (7.0+build2+nobinonly-0ubuntu3) oneiric; urgency=low * Fix LP: #858683 - All search engines disappear. Handle the directory -> symlink conversion in the postinst script - update debian/firefox.postinst.in -- Chris Coulson Sun, 25 Sep 2011 13:13:27 +0100 firefox (7.0+build2+nobinonly-0ubuntu2) oneiric; urgency=low * Fix LP: #858683 - All search engines disappear. Revert the change to move distribution.ini, it seems to need some extra postinst magic to make it upgrade correctly and not break everything. Not for a Sunday morning though - update debian/rules -- Chris Coulson Sun, 25 Sep 2011 08:21:19 +0100 firefox (7.0+build2+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream stable release (FIREFOX_7_0_BUILD2) * Move distribution.ini to a stable install path in Oneiric for now, so it can be diverted without breaking during upgrades - update debian/rules -- Chris Coulson Sat, 24 Sep 2011 23:15:18 +0100 firefox (7.0~b6+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_7_0b6_BUILD1) * Fix LP: #848211 - Firefox 7 beta displays wrong language in about:addons. Don't incorrectly omit the addon manager translations from the tarball -- Chris Coulson Sat, 17 Sep 2011 14:24:03 +0100 firefox (7.0~b5+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_7_0b5_BUILD1) * Update globalmenu-extension to 2.0.1 * Only install channel-prefs.js on aurora/beta, where we need it for Test Pilot - update debian/rules - update debian/firefox.install.in - update debian/apport/firefox.py.in * Don't error out whilst creating the source package if mozilla-devscripts or cdbs aren't installed. This enables us to create source packages on machines which don't have these available - update debian/rules - update debian/mozclient/firefox.mk -- Chris Coulson Mon, 12 Sep 2011 15:15:09 +0100 firefox (7.0~b4+build2+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_7_0b4_BUILD2) [ Chris Coulson ] * Update globalmenu-extension to 2.0 - Only update a menu in realtime if it's parent is opening. For all other times, just invalidate the menu. Avoids spamming dbus everytime something changes in the menu - When removing a menuitem from its parent, check that the index is in-bounds. Should fix a frequent crash on startup, although it doesn't explain how it gets in to that state in the first place - Add the ability to turn on debugging without building Firefox with debugging on * Add upstream patch to only add ENABLE_JIT=1 to CXXFLAGS if any of trace/ method/yarr jit is enabled. Fixes a build failure on PPC - add debian/patches/only-add-ENABLE_JIT-to-CXXFLAGS-if-jit-is-enabled.patch - update debian/patches/series * Add upstream patch to fix build failure with ENABLE_YARR_JIT=0 - add debian/patches/build-fix-for-no-ENABLE_YARR_JIT.patch - update debian/patches/series * Add upstream patch to work around a linker bug - add debian/patches/compile-pldhash-as-C++.patch - update debian/patches/series [ Jamie Strandboge ] * AppArmor - debian/usr.bin.firefox.apparmor.11.04: update for /sys/devices/system/cpu (LP: #819479) -- Chris Coulson Mon, 05 Sep 2011 13:36:47 +0100 firefox (7.0~b3+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_7_0b3_BUILD1) - LP: #837557 -- Chris Coulson Tue, 30 Aug 2011 19:15:51 +0100 firefox (7.0~b2+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_7_0b2_BUILD1) * Apport hook improvements: - Remove the redundant DefaultProfile prefix from attachment names when there is only a single profile - Hold the profile lock for only as long as necessary, else apport will prevent firefox from opening - Handle a single profile correctly, where there is no official default - Don't call attach_related_packages with an empty array - We were relying on ConfigParser to throw if there is no profiles.ini, but that doesn't seem to happen. Manually check that there are profiles instead - Tidy up add_info a bit - Implement some get_* functions as properties with real getters - Add general.skins.* to the set of whitelisted prefs in the apport hook -- Chris Coulson Thu, 25 Aug 2011 19:47:08 +0100 firefox (7.0~b1+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_7_0b1_BUILD1) * Rewrite the apport hook to be more useful - update debian/apport/firefox.py.in * Update the apport blacklist file now that the binary name has changed - update debian/apport/firefox.in * Dropped patches which are obsolete/fixed upstream - remove debian/patches/cairo-lcd-filter.patch - remove debian/patches/fix-sdk-bin-install.patch - update debian/patches/series * Refresh patches - update debian/patches/firefox-kde.patch - update debian/patches/mozilla-kde.patch - update debian/patches/reload-new-plugins.patch * Look in the correct location for the staged langpack xpi's. They moved from dist/install to dist/linux-$(DEB_HOST_GNU_CPU) - update debian/rules * Ensure we use DEB_BUILD_* and DEB_HOST_* consistently so that cross- compiling works - update debian/rules - update debian/mozconfig.in - update debian/firefox-dev.install.in * Improve the description for unavailable language packs - update debian/control.langpacks.unavail * Simplify firefox-dev.install a bit by installing everything in /usr/include - update debian/firefox-dev.install.in * Use $(MOZ_DISTDIR) rather than $(MOZ_OBJDIR)/dist in debian/rules. - update debian/rules * Handle video/webm mimetypes - update debian/firefox.desktop.in * Fix check-sync-dirs.py test failure - ensure config/system-headers and js/src/config/system-headers are kept in sync - update debian/patches/unity-globalmenu-build-support-patch * Fix browserGlue_distribution.js and browserGlue_smartBookmarks.js xpcshell test failures. Update DEFAULT_BOOKMARKS_ON_MENU with the correct number of default bookmarks - update debian/patches/ubuntu-bookmarks.patch * Fix jsreftest failures by setting the correct timezone and locale - update debian/testsuite.mk * Switch off debian/patches/fix-selection-drag-autoscroll.patch for now. It doesn't apply and needs a rethink - update debian/patches/series * Fix "format not a string literal and no format arguments" error - add debian/patches/printf-fix.patch - update debian/patches/series * Update for the binary name change - update debian/firefox.install.in - update debian/firefox.sh.in * Ensure we install dependentlibs.list so that Firefox knows which libs to dlopen before libxul - update debian/firefox.install.in * Get rid of some more hanging IPC xpcshell tests - update debian/testsuite.mk * Now Firefox lazy loads libxul, drop the LD_LIBRARY_PATH hack from the shell wrapper (LP: #561124) - update debian/firefox.sh.in * Refresh shipped locales for beta - refresh debian/locales.shipped - refresh debian/locales.unavailable - refresh debian/control * Ship a file in /etc/apport/native-origins.d to enable bug reporting on PPA branches - add debian/apport/native-origins.in - rename debian/apport/firefox.in => debian/apport/blacklist.in - update debian/rules - update debian/firefox.install.in - update debian/firefox.dirs.in -- Chris Coulson Fri, 19 Aug 2011 16:54:02 +0100 firefox (6.0~b5+build1+nobinonly-0ubuntu3) oneiric; urgency=low * Update globalmenu-extension to 1.9.2 - fixes a regression which causes the menu to not build and potentially crash when encountering non-menuitem nodes, due to an uninitialized value -- Chris Coulson Tue, 09 Aug 2011 23:56:00 +0100 firefox (6.0~b5+build1+nobinonly-0ubuntu2) oneiric; urgency=low * Update globalmenu-extension to 1.9.1 - Drop Firefox 4 and 5 compatibility - Drop the uIGlobalMenuLoader interface, as it never served any purpose - Rework how we synchronize attributes to menuitems from their corresponding command nodes - Don't synchronize attributes from command nodes associated with menus - Rework how we handle document insertion/removals. Rather than keeping our dbusmenu structure in sync at all times, and routing the events to the correct node in the tree, we just mark the menu as invalid and rebuild it from scratch next time it opens. This should reduce problems like LP: #821391 - Honour the collapsed attribute. This solves a problem with multiple seprators appearing adjacent to each other in the greasemonkey menu - Store all booleans as PRPackedBool rather than PRBool - Add error checking around uGlobalMenuDocListener - Make uGlobalMenuDummy more robust, and use it as a fallback if the real menuitem fails to initialize. This should help reduce problems like LP: #831391 - If a menu fails to build correctly, mark it invalid and stop processing document events on it (which should avoid the crash in LP: #831391) - Invalidate a menu if we fail to insert/remove a node whilst processing a document event (which should help avoid the crash in LP: #831391) - Make uGlobalMenu::CanOpen() respect the collapsed attribute - Allow more than one menu node to register as a listener for any DOM node. In the case of command nodes, these may be shared across multiple menu nodes, with each one interested in receiving events. Previously, we just erased the first listener if a second menu node tried to register (discovered after adding error checking around uGlobalMenuDocListener) -- Chris Coulson Tue, 09 Aug 2011 18:29:02 +0100 firefox (6.0~b5+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_6_0b5_BUILD1) -- Chris Coulson Fri, 05 Aug 2011 19:18:58 +0100 firefox (6.0~b4+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_6_0b4_BUILD1) * Update globalmenu-extension to 1.8 - Update for imgILoader changes in Firefox 8 - Fix LP: #810489 - Inconsistent behaviour if extension is enabled after turning off the menubar, which will affect Lucid -> P upgrades once Lucid has a newer Firefox. document.loadOverlay() triggers a reload of localstore.rdf, which overwrites our changes to the UI to hide the Firefox button and bookmark button. Restore them when this happens - Fix LP: #800733 - Quick Filter Bar checkbox in Thunderbird menu is not marked as checked. On menuitems with command nodes, ensure we update the state on the correct node - Ensure we disconnect all signal handlers when a menu is destroyed. Should fix a SIGSEGV in uGlobalMenu::OnClose() * Drop a distro pref that should have gone a long time ago - update debian/vendor.js * Remove patches fixed upstream - remove debian/patches/change-opt-back-to-Os.patch - update debian/patches/series -- Chris Coulson Mon, 01 Aug 2011 20:41:31 +0100 firefox (6.0~b3+build2+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_6_0b3_BUILD2) * Unconditionally build with --disable-elf-hack. It's basically a noop on Ubuntu, as we don't get any of the nice space saving and startup time improvements that upstream builds get with it. Enabling it is problematic (it fails to build on all architectures in Ubuntu from Firefox 7 onwards, and is problematic on armel when building on older Ubuntu versions) - update debian/rules - update debian/mozconfig.in * Refresh debian/patches/reload-new-plugins.patch -- Chris Coulson Mon, 25 Jul 2011 19:52:56 +0100 firefox (6.0~b2+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_6_0b2_BUILD1) * Revert an upstream change which switched the default optimization from -Os to -O3. The intention is that -O3 will be used for PGO builds and -Os used for non-PGO builds. -O3 increases the package size by over 3MB - add debian/patches/change-opt-back-to-Os.patch - update debian/patches/series * Don't unconditionally set -fshort-wchar in the libxul.pc pkgconfig file. It's no longer needed with newer toolchains which support gnu++0x, and defining it breaks the mozvoikko build - update debian/pkgconfig/libxul.pc.in - update debian/rules -- Chris Coulson Mon, 18 Jul 2011 09:11:06 +0100 firefox (6.0~b1+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_6_0b1_BUILD1) * Update globalmenu-extension to 1.7 - Fixes LP: #779905 - menubar sometimes appears inside the window rather than the panel, due to a startup race * Drop the profile migrator, as it doesn't really make any sense with the new release cycle. Instead, just copy the firefox profile (if it exists) to firefox-trunk (if it doesn't exist) - remove debian/migrator/xulapp-profilemigrator - update debian/firefox.sh.in - update debian/firefox.install.in - update debian/rules - update debian/control.in * xpt_link and xpt_dump have been replaced by xpt.py - update debian/firefox-dev.install.in - update debian/firefox-dev.links.in * Add support for the system provided hyphenation patterns, by linking @MOZ_LIBDIR@/hyphenation to /usr/share/hyphen - update debian/firefox.links.in * Refreshed patches: - update debian/patches/firefox-kde.patch - update debian/patches/mozilla-kde.patch - update debian/patches/plugin-for-mimetype-pref.patch - update debian/patches/reload-new-plugins.patch * The official branding moved from other-licenses to browser. Handle this - update debian/rules * Dropped patches fixed upstream: - remove debian/patches/use-MOZ_APP_LAUNCHER-for-launcher-exec.patch - remove debian/patches/fix-nsGIOService.patch - remove debian/patches/default-browser-check-use-gio.patch - remove debian/patches/update-assembler-excl-arch-list.patch - remove debian/patches/default-uri-handler-check-use-gio.patch - remove debian/patches/powerpc-build-fix.patch - update debian/patches/series * Drop the special "kde.js" file handling from the pref service. It hasn't had the desired effect since Firefox 4, as the specialfile handling doesn't apply to pref files inside the omni.jar. Moving kde.js back in to defaults/pref isn't an option, as these are always read after the prefs in the omni.jar, which would mean that all users would get the KDE specific prefs. Note, we only override one pref in kde.js anyway, it can go elsewhere if really required - update debian/patches/mozilla-kde.patch - update debian/patches/firefox-kde.patch -- Chris Coulson Fri, 08 Jul 2011 20:43:38 +0100 firefox (5.0+build1+nobinonly-0ubuntu3) oneiric; urgency=low * Switch off crashtests temporarily. One of them causes a huge memory leak and causes the build to time out - update debian/testsuite.mk -- Chris Coulson Tue, 05 Jul 2011 11:42:55 +0100 firefox (5.0+build1+nobinonly-0ubuntu2) oneiric; urgency=low * Fix the language packs to not depend on Firefox (LP: #800857) - update debian/control.langpacks -- Chris Coulson Mon, 04 Jul 2011 21:59:08 +0100 firefox (5.0+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the release channel (FIREFOX_5_0_BUILD1) -- Micah Gersten Thu, 16 Jun 2011 17:50:25 -0500 firefox (5.0~b7+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_5_0b7_BUILD1) Yes, this really is the last one this time :-) -- Chris Coulson Wed, 15 Jun 2011 11:21:35 +0100 firefox (5.0~b6+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_5_0b6_BUILD1) -- Chris Coulson Tue, 14 Jun 2011 10:12:42 +0100 firefox (5.0~b5+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_5_0b5_BUILD1) * Set the right Vcs-Bzr URL - update debian/control.in - refresh debian/control * Refresh shipped locales from new tarball - bg, cy, mk, nn, or, sr, ta and th are enabled again - refresh debian/locales.shipped - refresh debian/locales.unavailable - refresh debian/control -- Chris Coulson Thu, 09 Jun 2011 15:42:38 +0100 firefox (5.0~b3+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_5_0b3_BUILD1) * Support storing language descriptions in locales.unavailable. This will be useful for translations which disappear temporarily - update debian/rules - update debian/refresh-supported-locales.pl * Add languages that are currently dropped in FF5 (compared with FF4) to locales.unavailable. Having transitional packages now will make transitioning easier later on if they come back - update debian/locales.unavailable * Refresh debian/control to pick up transitional packages * Don't bundle our vendor preferences in the omni.jar. This needs a distro patch and it turns out that Firefox does still read prefs from $LIBDIR/defaults/pref, so just install it there instead - rename debian/distrib.js => debian/vendor.js - update debian/rules - update debian/firefox.install.in - remove debian/patches/install-vendor-prefs.patch - update debian/patches/series * Add a global pref file again (/etc/firefox/syspref.js) and add the necessary preinst/postinst magic to move the old file there if it was previously customized - add debian/syspref.js - update debian/firefox.install.in - update debian/firefox.links.in - update debian/firefox.postinst.in - update debian/firefox.preinst.in * Ensure "Depends: ${misc:Depends}" is added to all transitional language packs - update debian/control.langpacks.unavail - refresh debian/control * Ship testpilot on aurora too - update debian/firefox.install.in * Update list of language packs to include new ones added upstream - refresh debian/locales.shipped and debian/locals.unavailable - refresh debian/control -- Chris Coulson Thu, 02 Jun 2011 22:34:48 +0100 firefox (5.0~b2+build1+nobinonly-0ubuntu2) oneiric; urgency=low * Ship channel-prefs.js. We used to ship this in Firefox 3.6, and it's required by Test Pilot now - update debian/firefox.install.in * Backport patch from mozilla-central to fix powerpc build failure - add debian/patches/powerpc-build-fix.patch - update debian/patches/series -- Chris Coulson Sun, 22 May 2011 07:52:43 +0100 firefox (5.0~b2+build1+nobinonly-0ubuntu1) oneiric; urgency=low * New upstream release from the beta channel (FIREFOX_5_0b2_BUILD1) - Fixes LP: #765970 * Switch to mozilla-beta - update debian/mozclient/firefox.conf * Drop support for building with an external xulrunner - update debian/apport/firefox.in - update debian/firefox.install.in - update debian/firefox.lintian-overrides.in - update debian/firefox.sh.in - update debian/mozconfig.in - update debian/rules * Ditch all the version-number based branding selection. Do this all purely on the channel name now - remove debian/firefox-beta.desktop.in - remove debian/firefox-nightly.desktop.in - remove debian/firefox-unofficial.desktop.in - rename debian/firefox-final.desktop.in => debian/firefox.desktop.in - update debian/firefox.desktop.in - update debian/rules - update debian/firefox.sh.in * Drop the DEB_ENABLE_IPC option, now that IPC is mandatory - update debian/rules - update debian/apport/firefox.in - update debian/firefox.install.in - update debian/mozconfig.in * Build language packs directly from the firefox source + Fixes LP: #294187 - Firefox Locales should install locale specific search plugins + Rip out the bits to create a en-US.xpi - update debian/rules - remove debian/translation-support/install.rdf.in + Include compare-locales FIREFOX_5_0b1_BUILD1 from http://hg.mozilla.org/build/compare-locales. It's needed for merging en-US strings with incomplete locales + Pull l10n data in to tarball from bzr - update debian/mozclient/firefox.conf + Configure build for creating language packs by configuring with "--with-l10n-base=" - update debian/mozconfig.in + Store the list of locales to ship, and provide a way of automatically generating that list and the control file entries from the upstream source. Also provide a way to blacklist languages. We map languages to package names using langpack-o-matic (and also get descriptions from there too) - update debian/rules - add debian/locales-supported - add debian/control.langpacks - update debian/control - add debian/locale-blacklist - add debian/refresh-supported-locales.pl + Add common-build-indep hook to build the translation xpi's - update debian/rules + Add common-binary-post-install-indep to install the xpi's and searchplugins in to the correct debian packages - update debian/rules - add debian/get-xpi-id.py + When rebuilding debian/control in the clean target, fail the build if the control file was out-of-date. This ensures that we don't accidentally drop language packs, and forces me to maintain an up-to-date control file in bzr - update debian/rules + Apply vendor patches to localized searchplugins too - update debian/patches/ubuntu-codes-amazon.patch - add debian/patches/ubuntu-codes-baidu.patch - update debian/patches/ubuntu-codes-google.patch * Rename vendor.js to distrib.js. The pref service reads these in reverse alphabetical order, and we want ours to be read last - rename debian/vendor.js => debian/distrib.js - update debian/rules - update debian/patches/install-vendor-prefs.patch * Ensure we set LD_LIBRARY_PATH before running "firefox -h" - update debian/firefox.sh.in * Add some missing options to the manpage - update debian/firefox.1.in * Drop patches merged upstream: - 64-bit-be-fix.patch * Refresh patches: - mozilla-kde.patch * Drop DEBIAN_XUL_VER now that Firefox/Gecko versions are the same - update debian/rules - update debian/pkgconfig/*.pc.in * Add geolocation parameter to en-GB and en-ZA google search plugins. This will improve relevance of results for non-US English speaking users - update debian/ubuntu-codes-google.patch * Update globalmenu-extension code to 1.5 * Fix LP: #783790 - Firefox 4 crashes when opening Selenium IDE window. Ignore signals for menus without popups * Fix LP: #783856 - Firefox 4.0.1 Crash Report [@ uGlobalMenuBar::~uGlobalMenuBar ]. Don't bail out of building a menu when encountering a non-XUL element. Also toughen up destructors to not crash if the menuitem never initialized properly * Fix LP: #783997 - Firefox 4.0.1 Crash Report [@ uGlobalMenuBar::ShouldParentStayVisible ]. Don't crash if the window gets destroyed before the panel responds to RegisterWindow * Use --with-app-name to set MOZ_APP_NAME on nightlies now - update debian/rules - update debian/mozconfig.in -- Chris Coulson Fri, 20 May 2011 23:24:44 +0100 firefox (4.0.1+build1+nobinonly-0ubuntu0.11.04.2) natty-proposed; urgency=low * Fix LP: #770719 - Dutch localization doesn't include spell-checker. Look in /usr/share/hunspell for the system dictionaries on maverick and later, rather than /usr/share/myspell/dicts. This got dropped somehow in natty - update debian/rules - update debian/firefox.links/in * Hopefully fix LP: #643899 - Firefox sending header "Accept-Language: chrome://global/locale/intl.properties" because the intl.accept_languages preference is messed up. Drop a patch which causes the preferences system to save a user preference when changing a preference value to equal the system default value (and revert to the original behaviour where the preference is just discarded). This should hopefully stop Firefox Sync from breaking localized preferences where they haven't been modified by the user, but does regress LP: #548866 - update debian/patches/series -- Chris Coulson Tue, 03 May 2011 20:43:30 +0100 firefox (4.0.1+build1+nobinonly-0ubuntu0.11.04.1) natty-security; urgency=low * New upstream release v4.0.1 (FIREFOX_4_0_1_BUILD1) - see USN-1121-1 * Fix LP: #767966 - globalmenu extension pollutes main window javascript scope - update globalmenu-extension to 1.0.3 -- Chris Coulson Fri, 22 Apr 2011 15:12:46 -0500 firefox (4.0+nobinonly-0ubuntu3) natty; urgency=low [ Felix Geyer ] * Fix LP: #572772 - can't save files in KDE - update debian/patches/mozilla-kde.patch [ Chris Coulson ] * Fix LP: #766151 - popuphiding and popuphidden events aren't dispatched when a menu is closed, leading to exceptions being thrown in browserPlacesViews.js (visible from the error console) - update globalmenu-extension to 1.0.2 * Fix LP: #744580 - Firefox doesn't autoscroll when selecting content downwards - add debian/patches/fix-selection-drag-autoscroll.patch - update debian/patches/series -- Chris Coulson Tue, 19 Apr 2011 17:10:50 +0100 firefox (4.0+nobinonly-0ubuntu2) natty; urgency=low * Update globalmenu-extension to 1.0.1 - Fixes LP: #749450 - bookmarks editor doesn't work properly * Added Spanish and Japanese translations for static quicklist entry - update debian/firefox-*.desktop.in * Fix LP: #727372 - URI handling is broken. Use GIO for checking if a particular URI scheme has a handler, rather than probing GConf - add debian/patches/default-uri-handler-check-use-gio.patch - update debian/patches/series -- Chris Coulson Sat, 16 Apr 2011 23:21:03 +0100 firefox (4.0+nobinonly-0ubuntu1) natty; urgency=low * Bump the version number to 4.0 final. This is just so we stop confusing people with rc2 in the version number, but the tarball is identical * Update globalmenu-extension code to 1.0 - Drop the hacks we had to workaround the lack of menu closed signals from Unity. We no longer synthesize our own menu closed events, but use the proper event from dbusmenu. - In addition to this, we split the work done during menu opening in to 2 phases - the first phase triggered off "about-to-show" and the second phase triggered off "opened". In the future, we should be able to delay the menu opening with the about-to-show handler, which is where we do all the work to update the menu - Fix LP: #755701 - When iterating over each label, check if the current character equals the access key (to set a flag indicating we've already seen it) *before* we mangle the label, rather than after it. This fixes an issue where we never set the flag, and subsequently see the mnemonics repeated multiple times in labels - Also remove the hack we had to add placeholder entries to empty menus so that we could get an about-to-show signal (now that LP: #619811 is fixed) * Fix typo in German translation of static quicklist item (LP: #750220) - update debian/firefox-*.desktop.in * Re-enable -pie (LP: #663294) - update debian/rules -- Chris Coulson Mon, 11 Apr 2011 01:07:23 +0100 firefox (4.0~rc2+build3+nobinonly-0ubuntu2) natty; urgency=low [ Chris Coulson ] * Ship a mozilla-plugin.pc and libxul.pc rather than our custom firefox-plugin.pc. No other source packages are aware of firefox-plugin and this way avoids patching a whole bunch of apps. We now conflict with the xulrunner SDK though - rename debian/pkgconfig/firefox-plugin.pc.in => debian/pkgconfig/mozilla-plugin.pc.in - update debian/pkgconfig/mozilla-plugin.pc.in - add debian/pkgconfig/libxul.pc.in - add debian/pkgconfig/mozilla-nspr.pc.in - update debian/rules - update debian/control.pp * Add some missing symlinks in the SDK - update debian/firefox-dev.links.in * Add Asturian, Bengali, Croatian, Danish, Galician, Hebrew, Kurdish, Lithuanian, Romanian, Slovene, Uyghur and Ukrainian, and updated Catalan and French translations, plus add static quicklist translations for Chinese, Dutch, French, Hungarian, Italian and Russian - update debian/firefox-*.desktop.in * Update globalmenu-extension code to 0.6.1. Pressing Alt shows the menu now [ Bilal Akhtar ] * debian/firefox-*.desktop.in: Add static quicklist item 'Open a New Window'. (LP: #741046) -- Chris Coulson Thu, 31 Mar 2011 17:54:51 +0100 firefox (4.0~rc2+build3+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 RC2 build3 (FIREFOX_4_0rc2_BUILD3). D'oh! Should have spotted that before uploading build2 -- Chris Coulson Mon, 21 Mar 2011 11:02:11 +0000 firefox (4.0~rc2+build2+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 RC2 (FIREFOX_4_0rc2_BUILD2) -- Chris Coulson Mon, 21 Mar 2011 09:08:27 +0000 firefox (4.0~rc1+build1+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 RC1 (FIREFOX_4_0rc1_BUILD1) * Switch to mozilla-2.0 - update debian/mozclient/firefox.conf * Only build the globalmenu extension on Natty and newer - update debian/rules - update debian/firefox-globalmenu.dirs.in - update debian/mozconfig.in * Define MOZ_DISTDIR throughout the build - update debian/rules - update debian/testsuite.mk - update debian/firefox-mozsymbols.install.in * Don't disable the crashreporter for DEB_BUILD_UNOFFICIAL builds. - update debian/rules * Automatically set DEB_BUILD_UNOFFICIAL for builds where we change MOZ_APP_NAME - update debian/rules * Disable the crashreporter for nightlies - update debian/rules * Revert a previous change to add vendor preferences to distribution.ini. The preferences there aren't read by the pref service, but loaded and set later on, after profile-initial-state, which is too late to have any effect on the selected locale - add debian/vendor.js - update debian/distribution.ini - update debian/rules - add debian/patches/install-vendor-prefs.patch - update debian/patches/series * Refresh patches - update debian/patches/mozilla-kde.patch * Fix build on PPC64 - add debian/patches/64-bit-be-fix.patch - add debian/patches/update-assembler-excl-arch-list.patch - update debian/patches/series -- Chris Coulson Thu, 10 Mar 2011 02:25:21 +0000 firefox (4.0~b12+build1+nobinonly-0ubuntu3) natty; urgency=low * Land the Unity appmenu extension work. It's shipped in its own package, although we build it from the Firefox source tree (LP: #637827) * Fix build with system NSPR - update debian/firefox-dev.install.in * Don't trample on existing alternatives in the postinst script if we detect Ubuntuzilla breakage - update debian/firefox.postinst.in -- Chris Coulson Thu, 03 Mar 2011 16:18:56 +0000 firefox (4.0~b12+build1+nobinonly-0ubuntu2) natty; urgency=low * Fix some typos in the manpage - update debian/firefox.1.in * Fix up the mess left by Ubuntuzilla rather than leaving our official package in a broken and inconsistent state, which ends up with users reporting bugs to Launchpad and giving us a bad reputation. If /usr/bin/firefox has been diverted and there is no /usr/bin/firefox provided on the system, just do the job of whatever package it was that broke the users install and remove the diversion for them. This should hopefully stop the frequently reported bugs we get from Ubuntuzilla users about /usr/bin/firefox being missing - update debian/firefox.postinst.in - Fixes LP: #512937, LP: #529136, LP: #552919, LP: #572733, LP: #574111, LP: #599978, LP: #600271, LP: #610522, LP: #610756, LP: #610907, LP: #612162, LP: #620400, LP: #623980, LP: #625014, LP: #630643, LP: #635166, LP: #638342, LP: #641838, LP: #658828, LP: #668809, LP: #672282, LP: #676239, LP: #707704, LP: #724090 * Don't allow users to report bugs with apport-bug when /usr/bin/firefox has been diverted - update debian/firefox.py.in * Don't build with --disable-elfhack on armel. It's been fixed now - update debian/rules -- Chris Coulson Fri, 25 Feb 2011 13:54:59 +0000 firefox (4.0~b12+build1+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 B12 (FIREFOX_4_0b12_BUILD1) * Add support for unpacked xpi's in the apport hook when reporting the extensions installed - update debian/apport/firefox.py.in * Ensure the Apport hook can be tested properly without modification - update debian/apport/firefox.py.in * Add DEP-3 compliant headers to all of our patches, and drop the bug numbers we carried in filenames. Some of the filenames are so long that we get constant lintian warnings about long lines in the changelog * Drop libxul-sdk-nspr.patch - it doesn't seem to be needed - remove debian/patches/libxul-sdk-nspr.patch - update debian/patches/series * Move default-apps/firefox.xml to firefox-gnome-support when it is installed - update debian/firefox.install.in - update debian/firefox-gnome-support.install.in * Fix menu-icon-not-in-xpm-format lintian error - generate the xpm at build time - update debian/rules - update debian/control * Quieten embedded-zlib and embedded-libjpeg lintian errors. These aren't really errors, as we're intentionally embedding copies here - update debian/rules - add debian/firefox.lintian-overrides.in * Fix some extended-description-is-empty lintian errors - update debian/control * Add a manpage to fix a lintian warning - add debian/firefox.1.in - add debian/firefox.manpages.in * Fix build on armel, make sure we install $(INCDIR)/tremor - update debian/firefox-dev.install.in * Fix description of firefox-dev - update debian/control * Ship a pkgconfig file to enable browser plugins to build against Firefox rather than xulrunner - add debian/pkgconfig/firefox-plugin.pc.in - update debian/firefox-dev.install.in - update debian/rules * Check for tee surface support when deciding whether to use tree or system cairo - update debian/rules * Check the hunspell version is new enough in DEB_MIN_SYSDEPS=0 mode - update debian/rules - update debian/mozconfig.in * Fix the permissions of some files once they are installed, rather than directly in debian/. We weren't restoring them in clean anyway - update debian/rules * Quiten some image-in-usr-lib lintian warnings by adding them to lintian-overrides. There's not much point in moving them to /usr/share unless we split them out in to an arch-all firefox-common package - update debian/firefox.lintian-overrides.in * Don't call update-menus in postinst, and add #DEBHELPER# tokens where those are missing - update debian/firefox.postinst.in - update debian/firefox.postrm.in - update debian/firefox.preinst.in * Fix desktop-entry-invalid-category lintian warnings - remove Internet and Application categories, add GTK and GNOME - update debian/firefox-beta.desktop.in - update debian/firefox-final.desktop.in - update debian/firefox-nightly.desktop.in - update debian/firefox-unofficial.desktop.in * Fix menu-icon-too-big lintian error, by downscaling the icon - update debian/rules * Fix package-contains-hardlink lintian warning in SDK. Replace it with symbolic link - update debian/rules * Don't ship a vendor.js with our preferences in, as it requires a patch in order to get it in to the distributed omni.jar. Instead, move our vendor prefs in to distribution.ini - remove debian/vendor.js - update debian/distribution.ini - update debian/rules - remove debian/patches/install-ubuntu-prefs.patch - update debian/patches/series * Add "set -e" to launcher script as per Debian policy 10.4 - update debian/firefox.sh.in * Bump Standards-Version to 3.9.1 - update debian/control * Fix dbg-package-missing-depends lintian warning - add firefox-gnome-support dependency to firefox-gnome-support-dbg transitional package - update debian/control * Fix LP: #717666 - firefox needs to replace kubuntu-firefox-installer again. This got dropped accidentally during the package reorg after dropping abrowser - update debian/control * Add some missing files to the SDK - update debian/firefox-dev.install.in * Refresh patches - update debian/patches/mozilla-kde.patch - update debian/patches/reload-new-plugins.patch * Don't hardcode the browser executable to /usr/bin/firefox for the default browser. Instead, apply a patch reviewed upstream to set this to MOZ_APP_LAUNCHER - drop debian/patches/system-path-default-browser.patch - add debian/patches/use-MOZ_APP_LAUNCHER-for-launcher-exec.patch - update debian/patches * Fix the default browser check to use the new x-scheme-handler mechanism via GIO, rather than the old GConf way - add debian/patches/fix-nsGIOService.patch - add debian/patches/default-browser-check-use-gio.patch - update debian/patches/series * Don't install $(INCDIR)/md - update debian/firefox-dev.install.in * The toolkit.networkmanager.disable preference has been removed. There is now only a single pref for managing network link status, and this is off by default. Re-enable that to restore the previous behaviour - update debian/distribution.ini -- Chris Coulson Fri, 25 Feb 2011 02:53:55 +0000 firefox (4.0~b11+build3+nobinonly-0ubuntu2) natty; urgency=low * Drop abrowser: - remove debian/abrowser-branding.install.in - remove debian/abrowser-branding.links.in - remove debian/abrowser.desktop.in - remove debian/abrowser.xml.in - update debian/control - remove debian/firefox-branding.install.in - remove debian/firefox-branding.links.in - update debian/firefox.install.in - update debian/firefox.links.in - rename debian/firefox-branding.menu.in => debian/firefox.menu.in - update debian/firefox.sh.in - update debian/mozclient/firefox.conf - remove debian/patches/awesome_branding_updates.patch - remove debian/patches/browser_branding.patch - update debian/patches/series - update debian/rules - remove debian/vendor-abrowser.js.in - rename debian/vendor-firefox.js.in => debian/vendor.js.in * Don't install the example config file (firefox.cfg) - it's redundant at the moment as there is no way to configure system preferences - remove debian/firefox.cfg - remove debian/firefox.docs.in - update debian/rules * Don't install presubj, this is for the Debian BTS - remove debian/presubj - update debian/firefox.install.in * Don't install the default-apps xml file for gnome-control-center in Natty. It's not needed any more - update debian/rules - update debian/firefox.install.in * Ship an SDK again - update debian/control - add debian/firefox-dev.install.in - add debian/firefox-dev.links.in - add debian/patches/bzXXX_fix_sdk_bin_install.patch - update debian/patches/series - update debian/rules * Build with --disable-elf-hack on armel and powerpc - update debian/rules - update debian/mozconfig.in * Drop the general.useragent.vendor* preferences. These are obsolete in Firefox 4 - rename debian/vendor.js.in => debian/vendor.js - update debian/vendor.js - update debian/rules * Update the apport hook to not choke on unpacked extensions, and install it again. We still need to add support for unpacked xpi's though - update debian/apport/firefox.py.in - update debian/firefox.install.in -- Chris Coulson Wed, 09 Feb 2011 13:57:51 +0000 firefox (4.0~b11+build3+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 B11 (FIREFOX_4_0b11_BUILD3) [ Jamie Strandboge ] * AppArmor: - update to allow owner read access to @{PROC}/[0-9]*/task/[0-9]*/stat [ Chris Coulson ] * Add support to the launcher for specifying a debugger - update debian/firefox.sh.in -- Chris Coulson Mon, 07 Feb 2011 15:58:53 +0000 firefox (4.0~b10+build1+nobinonly-0ubuntu2) natty; urgency=low * Fix FTBFS - testpilot moved to distribution/extensions - update debian/firefox.install.in -- Chris Coulson Wed, 26 Jan 2011 11:28:03 +0000 firefox (4.0~b10+build1+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 B10 (FIREFOX_4_0b10_BUILD1) [ Jamie Strandboge ] * AppArmor: - allow access to defaults.list for all derivatives (LP: #664093) [ Chris Coulson ] * Refresh patches after landing of bmo: #624267 aka Crash on Ubuntu [@ nsGNOMEShellService::SetDefaultBrowser ] - update debian/patches/lp185622_system_path_default_browser.patch * Refresh patches after landing of bmo: #624625 aka change home page of Google search plugin to google.com - update debian/patches/ubuntu_codes_google.patch * Remove debian/remove.binonly.sh from package, it's not used anyway (the one from mozilla-devscripts is used instead) - remove debian/remove.binonly.sh * Don't make DEB_ENABLE_THUMB2 configurable, this should just be totally automatic - update debian/rules * Bump NSS and NSPR minimum versions to 3.12.9 and 4.8.7 respectively - update debian/rules * Clean unused variable from debian/rules - update debian/rules * Use the smaller crashreporter-symbols.zip after landing of bmo: #588129 aka symbols.txt file missing from *.crashreporter-symbols.zip - update debian/firefox-mozsymbols.install.in * Run jstestbrowser and mochitest test suites - update debian/testsuite.mk * Fix LP: #690009 - GTK applications launched by firefox don't appear in global menu. Don't unset UBUNTU_MENUPROXY - update debian/firefox.sh.in -- Chris Coulson Tue, 25 Jan 2011 21:50:54 +0000 firefox (4.0~b9+build1+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0b9 (FIREFOX_4_0b9_BUILD1) [ Micah Gersten ] * Fix typo in rules file comment - update debian/rules [ Chris Coulson ] * Refresh patches - update debian/patches/mozilla-kde.patch -- Chris Coulson Wed, 12 Jan 2011 09:00:16 -0600 firefox (4.0~b8+nobinonly-0ubuntu3) natty; urgency=low [ Chris Coulson ] * Fix LP: #694391 - firefox-branding (rather than firefox) should replace kubuntu-firefox-installer - update debian/control.pp [ Micah Gersten ] * Really fix LP: #696895 - FTBFS on armel; Add DEB_ENABLE_THUMB2 to DEB_DEFINES so thumb2 is actually enabled; Thanks to Jani Monoses for the fix - update debian/rules * Define the default for DEB_ENABLE_THUMB2 with the rest of the defaults - update debian/rules -- Micah Gersten Wed, 05 Jan 2011 13:50:56 -0600 firefox (4.0~b8+nobinonly-0ubuntu2) natty; urgency=low * fix LP: #696895 - FTBFS on armel; Add --enable-thumb2 to build for armv7; Thanks to Jani Monoses for the fix - update debian/mozconfig.in - update debian/rules -- Micah Gersten Mon, 03 Jan 2011 22:44:12 -0600 firefox (4.0~b8+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0b8 (FIREFOX_4_0b8_RELEASE) [ Chris Coulson ] * Add a hack to the launcher to handle being launched from an alternative, which is a symlink to the launcher script, and breaks the current launch mechanism. Also remove a useless stat() from the current script - update debian/firefox.sh.in * Re-add patch that got dropped to not remove and re-add search plugins during upgrade - add debian/patches/bz534663_attXXX_normalize_distribution_searchplugins.patch - update debian/patches/series * Move libmozgnome.so to the main package in common-binary-predeb-arch. The previous method of deleting it from -gnome-support and copying it to the main package from debian/tmp in each of the binary-predeb targets meant that we were shipping an unstripped copy, which caused a lintian error. This new method ensures we retain the stripped SO and we still only move it after dh_shlibdeps has run - update debian/rules * Support debug builds. By setting "debug" in DEB_BUILD_OPTIONS, firefox will build with --enable-debug and --disable-optimize - update debian/rules - update debian/mozconfig.in * Really build with --disable-gnomevfs this time - update debian/mozconfig.in * Refresh patches after landing of bmo: 588410 aka Fix make install to work with omnijar - remove debian/patches/bz588410_fix_make_install_with_omnijar.patch - update debian/patches/series * Generate the en-US xpi at build time again for importing in to Launchpad - update debian/rules - update debian/translation-support/install.rdf.in [ Jamie Strandboge ] * update debian/usr.bin.firefox.apparmor.10.10: - deny write to /var/cache/fontconfig - allow read to @{HOME}/.local/share/applications/mimeapps.list - allow read to @{PROC}/[0-9]*/mountinfo (LP: #659450) - allow read to /tmp/.X[0-9]*-lock - deny read to @{HOME}/.local/share/recently-used.xbel - deny execute of /usr/bin/gconftool-2 - allow read to @{HOME}/.thumbnails/*/*.png - allow read/write to @{HOME}/.gnome2/firefox*-bin-* * update debian/usr.bin.firefox.apparmor.{9.04,10.04}: - deny write to /var/cache/fontconfig - allow read to @{PROC}/[0-9]*/mountinfo (LP: #659450) - allow read to /tmp/.X[0-9]*-lock - deny execute of /usr/bin/gconftool-2 - remove extraneous @{HOME}/.config/ibus/bus/ * add debian/usr.bin.firefox.apparmor.11.04: - based on 10.10 - remove redundant abstractions included by the gnome abstraction (LP: #692406) * debian/rules: updated for usr.bin.firefox.apparmor.11.04 [ Micah Gersten ] * Change xubuntu applications defaults list in natty apparmor profile; Path changed in xubuntu-default-settings (11.04.0) - update usr.bin.firefox.apparmor.11.04 * fix LP: #694391 - Kubuntu Firefox Installer Fails; Add Replaces on kubuntu-firefox-installer again in firefox-branding - update debian/control [ Felix Geyer ] * Re-add KDE integration (LP: #684482) - update debian/patches/mozilla-kde.patch - update debian/patches/firefox-kde.patch - update debian/patches/series - update debian/rules * Make firefox-4.0 suggest firefox-kde-support - update debian/control - update debian/control.pp -- Chris Coulson Fri, 31 Dec 2010 15:27:46 +0000 firefox (4.0~b7+nobinonly-0ubuntu3) natty; urgency=low * Build with --enable-startup-notification again, this got dropped in the 3.6 => 4.0 update - update debian/mozconfig.in * Ship the testpilot extension for beta as per the official builds, based on the discussion on #developers. We achieve this by building with --enable-update-channel=beta for the beta milestones only. The update channel isn't used anywhere at runtime because we disable the updater. This means that Ubuntu users can participate in testpilot user studies in Natty - update debian/rules - update debian/firefox.install.in - update debian/mozconfig.in -- Chris Coulson Mon, 22 Nov 2010 19:52:28 +0000 firefox (4.0~b7+nobinonly-0ubuntu2) natty; urgency=low * Fix the profile migrator to not hang when ~/.mozilla doesn't exist, and other improvements - update debian/migrator/xulapp-profilemigrator -- Chris Coulson Fri, 19 Nov 2010 01:31:17 +0000 firefox (4.0~b7+nobinonly-0ubuntu1) natty; urgency=low * New upstream release v4.0 B7 (FIREFOX_4_0b7_RELEASE) [ Chris Coulson ] * Don't build with -pie on Natty (LP: #663294) - update debian/rules * Update mozclient for mozilla-central - update debian/mozclient/firefox.conf - update debian/mozclient/firefox.mk * Auto-generate Debhelper files at build time, using the Mozilla text preprocessor. This makes it easier to maintain branches for different versions (because we'll avoid having different filenames for each version, which makes merging really difficult). We can also use standard preprocessor directives for our different build options, which means we drop a lot of logic from debian/rules - rename debian/abrowser.desktop => debian/abrowser.desktop.in - add debian/abrowser-branding.install.in - add debian/abrowser-branding.links.in - add debian/firefox-branding.install.in - add debian/firefox-branding.links.in - rename debian/apport/firefox.py => debian/apport/firefox.py.in - rename debian/firefox-final.desktop => debian/firefox-final.desktop.in - rename debian/firefox-gnome-support.install => debian/firefox-gnome-support.install.in - rename debian/firefox.dirs => debian/firefox.dirs.in - rename debian/firefox.install => debian/firefox.install.in - rename debian/firefox.links => debian/firefox.links.in - rename debian/firefox.menu => debian/firefox.menu.in - rename debian/firefox.postinst.in => debian/firefox.postinst.in - rename debian/firefox.postrm.in => debian/firefox.postrm.in - rename debian/firefox.preinst.in => debian/firefox.preinst.in - rename debian/firefox.prerm.in => debian/firefox.prerm.in - rename debian/firefox.xml => debian/firefox.xml.in - updated debian/abrowser.desktop.in - updated debian/firefox-final.desktop.in - updated debian/firefox-gnome-support.install.in - updated debian/firefox.dirs.in - updated debian/firefox.install.in - updated debian/firefox.links.in - updated debian/firefox.menu.in - updated debian/firefox.postinst.in - updated debian/firefox.postrm.in - updated debian/firefox.preinst.in - updated debian/firefox.prerm.in - updated deibna/firefox.xml.in - updated debian/rules - add debian/firefox-mozsymbols.install.in * Simplify generating the Apport blacklist file to remove a superfluous debian/rules target - rename debian/apport/blacklist => debian/apport/firefox.in - update debian/rules * Auto-generate debian/control in the clean target - add debian/control.pp - update debian/rules * Drop the ability to disable patches on a per-release basis. This adds additional complexity, and we're not really using it at the moment. We can always add it back again if we need it - remove debian/disable-patches.sh - update debian/rules - remove debian/patches/series-disable-patches.8.04 * Rework the branding selection logic so that we automatically use the nightly branding for nightly builds, unofficial branding for alpha milestones, and official branding for beta, RC's and final. Auto-populate the branding names in the desktop files rather than hard-coding them, and add a special beta desktop file - add debian/firefox-beta.desktop.in - rename debian/firefox-minefield.desktop => debian/firefox-nightly.desktop.in - rename debian/firefox-namaroka.desktop => debian/firefox-unofficial.desktop.in - update debian/rules * Drop the update-notifier restart required hook. Instead, we rely on the ubufox restart required banner inside the browser, rather than having 2 notification mechanisms - remove debian/firefox-restart-required.update-notifier - update debian/firefox.postinst.in - update debian/firefox.prerm.in * Rewrite the launcher script to not wrap around the upstream start scripts, but start the Firefox binary directly. The upstream start scripts contain a lot of complexity for dealing with things that we don't need to worry about, and are quite slow. Also, add in the hooks for the new profile migrator - update debian/firefox.sh.in * Replace the old profile migrator. The previous one relied on hard-coded values and fragile shell script that isn't really scalable enough now that stable Ubuntu releases see new major Firefox versions. The new profile migrator doesn't require any hard-coded values, and should be lower maintenance - add debian/migrator/xulapp-profilemigrator - remove debian/migrator/main.c - update debian/rules - update debian/firefox.sh.in - update debian/control.pp * Build with "make -f client.mk" and using a mozconfig, rather than the autoconf/configure/make steps used previously. The client.mk contains the sequencing for doing PGO builds - update debian/firefox-mozsymbols.install.in - add debian/mozconfig.in - update debian/rules * Add support for building with PGO. Add a build option (DEB_BUILD_PGO) which will run the build with make -f client.mk profiledbuild. This is off by default. - update debian/rules - update debian/mozconfig.in * Run the Mozilla test suite at build time. Currently, we run the following targets: check, xpcshell-tests, reftest and crashtest. Test-suite failures won't break the build just yet - add debian/testsuite.mk - update debian/rules - update debian/control.pp * Tidy up the vendor preferences - remove debian/ubuntu-useragent.js.tmpl - rename debian/firefox.js => debian/vendor-firefox.js.in - rename debian/ubuntu-abrowser.js.tmpl => debian/vendor-abrowser.js.in - update debian/vendor-firefox.js.in - update debian/vendor-abrowser.js.in - update debian/rules * Don't touch .autoreg on upgrade. This isn't necessary with the XPCOM changes in Gecko 2.0 - update debian/firefox.postinst.in - remote debian/firefox-gnome-support.postinst.in * Disable gnomevfs support on >= 11.04 (LP: #661287) - update debian/rules - update debian/mozconfig.in - update debian/firefox-gnome-support.install.in * Add x-scheme-handler magic to desktop files - update debian/firefox.desktop.in - update debian/firefox-beta.desktop.in - update debian/firefox-nightly.desktop.in - update debian/firefox-unofficial.desktop.in * Dropped obsolete / not-needed patches - remove debian/patches/add_syspref_dir.patch - remove debian/patches/bz386904_config_rules_install_dist_files.patch - remove bz534663_attXXX_normalize_distribution_searchplugins.patch - remove debian/patches/bz591331_att469858_breakpad_allow_ptrace.patch - remove debian/patches/ubuntu_no_app_updates.patch - update debian/patches/series * Update build-depends for Firefox 4.0 - update debian/control.pp * Rebased patches for Firefox 4.0 - update browser_branding.patch - update bz460917_att350845_reload_new_plugins.patch - update bz467738_att351145_lockPref_everywhere.patch - update bz515232_att399338_distro_locale_searchplugins.patch - update bzXXX_libxul_sdk_nspr.patch - udpate bzXXX_plugin_for_mimetype_pref.patch - update lp185622_system_path_default_browser.patch - update lp512615_cairo_lcd_filter.patch - update lp548866_bz467766_att351173-dont-reset-user-prefs-on-upgrade.patch - update ubuntu_bookmarks.patch * Disable KDE integration temporarily until I've reviewed the updated patches - update debian/patches/series * Install top-level chrome.manifest after landing of (bmo: 579178) aka single-chrome-manifest - update debian/firefox.install.in * Add trademarkInfo key to the brand.dtd file in the awesome-branding to fix an issue with Help->About not working. Also drop the unneeded overrides from the manifest file and rename the patch to reflect it's extended scope. Eventually, this patch should be merged in to the awesome-branding bzr branch - rename debian/patches/awesome_branding_chrome_rename.patch => debian/patches/awesome_branding_updates.patch - update debian/patches/awesome_branding_updates.patch - update debian/patches/series * Install our vendor preferences in to dist/bin before running stage-package. This seems to be the only way to ensure that they are included in the omni.jar. This means we need to patch the upstream package-manifest to include the extra file - add debian/patches/install_ubuntu_prefs.patch - update debian/rules * Clean up the files in /etc/firefox on upgrade - update debian/firefox.preinst.in * Support builds suitable for valgrind, by building with DEB_MOZ_VALGRIND=1. This will automatically pick the right optimisations and build flags - update debian/rules - update debian/mozconfig.in * Fix make install with --enable-chrome-format=omni. Add patch to create the omni.jar file after running stage-package. This has already landed on mozilla-central, so we can drop again at beta 8 - add debian/patches/bz588410_fix_make_install_with_omnijar.patch - update debian/patches/series * Drop other unused cruft from the package - remove debian/debsearch.src - remove debian/firefox.png.uu - remove debian/debsearch.gif.uu - update debian/rules * Build-depend on yasm - update debian/control * Fix the profile migrator to not crash on profiles where 'LastVersion=Safe Mode' (LP: #674607) - update debian/migrator/xulapp-profilemigrator [ Jamie Strandboge ] * debian/usr.bin.firefox*: - allow .{firefox,mozilla} instead of just .mozilla (LP: #624435) - allow owner write to ~/.config/ibus/bus/ - adjust apparmor profile for latest sun-java6 plugin (LP: #633369) [ Micah Gersten ] * Drop patch after upstream landing of (bmo: 551152) aka Symlinked components break everything - drop debian/patches/lp518422.patch - update debian/patches/series * Add mesa-common-dev to build-depends after landing of configure test aka (bmo: 517566) which is for WebGL aka (bmo: 516213) - update debian/control -- Chris Coulson Wed, 17 Nov 2010 21:35:57 +0000 firefox (3.6.12+build1+nobinonly-0ubuntu0.10.10.1) maverick-security; urgency=low * New upstream release v3.6.12 (FIREFOX_3_6_12_BUILD1) - see USN-1011-1 [ Jamie Strandboge ] * AppArmor: - allow mmap for temporary files that we own (LP: #662918) - add owner read to environ and auxv in @{PROC} as well as /etc/lsb-release read and expr ix for the crash reporter - update path for Xubuntu default settings (LP: #664093) -- Chris Coulson Wed, 27 Oct 2010 08:31:06 -0400 firefox (3.6.11+build3+nobinonly-0ubuntu0.10.10.1) maverick-security; urgency=low * New upstream release v3.6.11 (FIREFOX_3_6_11_BUILD3) - see USN-997-1 [ Jamie Strandboge ] * AppArmor: - fix for Google Gears (LP: #644976) [ Chris Coulson ] * Refresh patches after landing of (bmo: 327323) aka Can't "Open with" files that are send as application/octet-stream (or other "unknown to firefox" mime types) - update debian/patches/mozilla-kde.patch - update debian/patches/series - remove debian/patches/bz327323_att471859_lp239952_launch_from_extension.patch * Bump minimum system NSS to 3.12.8 after landing of (bmo: 600104) aka Bump minimum required version for system NSS to 3.12.8 - update debian/rules * Bump minimum system NSPR to 4.8.6 after landing of (bmo: 567620) aka Bump minimum required version for system NSPR to 4.8.6 - update debian/rules * Bump minimum version of sqlite to 3.7.1 after landing of (bmo: 583611) aka Upgrade to SQLite 3.7.1 - update debian/rules -- Chris Coulson Wed, 13 Oct 2010 12:23:34 +0100 firefox (3.6.10+build1+nobinonly-0ubuntu3) maverick; urgency=low * Fix LP: #239952 - the associated helper application does not exist. Where a launcher doesn't exist for a particular mimetype, use the file extension instead - add debian/patches/bz327323_att471859_lp239952_launch_from_extension.patch - update debian/patches/series -- Chris Coulson Tue, 21 Sep 2010 23:09:29 +0100 firefox (3.6.10+build1+nobinonly-0ubuntu2) maverick; urgency=low * Add the following .desktop translations; Thanks to David Planella for organizing the translations and to those who contributed the translations - update debian/firefox-final.desktop + Asturian + Croatian + Galician + German + Hebrew + Uyghur * Update the Italian Name for Firefox - update debian/firefox-final.desktop -- Micah Gersten Wed, 15 Sep 2010 22:51:30 -0500 firefox (3.6.10+build1+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.10 (FIREFOX_3_6_10_BUILD1) [ Chris Coulson ] * Fix "ISO C++ forbids braced-groups within expressions" error on GCC < 4.4 (which is also a warning on GCC >= 4.4) - update debian/patches/bz591331_att469858_breakpad_allow_ptrace.patch * Blacklist plugin-container in Apport - update debian/apport/blacklist * Fix LP: #637434 - components.list is not installed - update debian/firefox.install * De-fuzz patches - update debian/patches/mozilla-kde.patch [ Jamie Strandboge ] * adjust apparmor profile for non-maverick dailies for latest sun-java6 plugin (LP: #633369) * ignore writes to /var/cache/fontconfig for 10.10 -- Chris Coulson Wed, 15 Sep 2010 17:50:08 +0100 firefox (3.6.9+build1+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.9 build1 (FIREFOX_3_6_9_BUILD1) * Drop patch after landing of (bmo: 569836) aka Build fails on Fedora Core 13 - remove debian/patches/ftbfs_crashreporter.patch - update debian/patches/series * Don't suggest the transitional kmozillahelper now we've branched for Maverick. This stops it from being displayed as an addon for Firefox in software-center - update debian/control * Don't suggest the transitional latex-xft-fonts. Use ttf-lyx instead - update debian/control * Fix LP: #623509 - Firefox is creating empty crash reports due to kernel ptrace hardening - add debian/patches/bz591331_att469858_breakpad_allow_ptrace.patch - update debian/patches/series * Build with MOZILLA_OFFICIAL=1 again and in turn, enable the crashreporter - update debian/rules * Really fix LP: #605336 - "Report Broken Web Site" option missing - make sure that we install the reporter chrome - update debian/rules -- Chris Coulson Fri, 27 Aug 2010 20:14:45 +0100 firefox (3.6.8+build1+nobinonly-0ubuntu3) maverick; urgency=low [ Chris Coulson ] * Fix LP: #605336 - "Report Broken Web Site" option missing - don't disable the reporter extension when building with DEB_MIN_SYSDEPS=1 - update debian/rules * Add DEB_HOST_GNU_CPU to MOZ_SYMBOLS_EXTRA_BUILDID to avoid the possibility of filename collisions on the server if our builds happen to run at the same time - update debian/rules * Build without MOZILLA_OFFICIAL=1 for beta until LP #623509 is fixed, so we're not sending empty crash reports - update debian/rules [ Jamie Strandboge ] * add debian/usr.bin.firefox.apparmor.10.10 (LP: #565756, LP: #592121) * debian/rules: updated for usr.bin.firefox.apparmor.10.10 * debian/firefox.postinst.in: - remove old code for the dailies - update for local include file - update for addons include file - use '-T -W' with apparmor_parser to pull in abstraction updates * debian/firefox.postrm.in: - update for local include file - update for addons include file [ Micah Gersten ] * fix LP: #559154 - KDE users installing Firefox from archive don't know about kmozillahelper; kmozillahelper was renamed to firefox-kde-support so update Suggests - update debian/control -- Chris Coulson Thu, 26 Aug 2010 00:09:49 +0100 firefox (3.6.8+build1+nobinonly-0ubuntu2) maverick; urgency=low [ Chris Coulson ] * Provide iceweasel - update debian/control * Really build with MOZILLA_OFFICIAL=1 this time, so that the crash reporter is actually enabled - update debian/rules * Only enable the crashreporter and build the Breakpad symbols on i386, amd64 and armel - update debian/control - update debian/rules * Blacklist Firefox in Apport on architectures where we use the Mozilla crash reporter - add debian/apport/blacklist - update debian/rules * Drop the DEBIAN_META_NAME stuff - we don't need this now we are always using unversioned sources for the official in-archive version. This simplifies the wrapper script a little - update debian/rules - update debian/firefox.sh.in * Rework how abrowser is launched a little. Drop an unnecessary patch and ship both abrowser and abrowser-bin files in LIBDIR. With the DEBIAN_META_NAME bits gone, the wrapper script will always search for $LIBDIR/abrowser if you launch /usr/bin/abrowser. From there, the Mozilla scripts already handle this properly - update debian/firefox.sh.in - update debian/rules - remove debian/patches/abrowser_run_mozilla.patch - update debian/patches/series * Don't handle launching GDB in our wrapper script, run-mozilla.sh already does all this. Just make sure that we pass the right arguments - update debian/firefox.sh.in * Fix LP: #613049 - Default website link in Maverick firefox is invalid - update debian/patches/ubuntu_bookmarks.patch * Refresh favicon's in the default bookmark collection, so they display the latest Ubuntu branding on a fresh profile - update debian/patches/ubuntu_bookmarks.patch * Drop the mips-specific binutils build-depend - we don't even build on this arch - update debian/control * Only try to install the crashreporter binary when building with the bundled xulrunner library - update debian/firefox.install - update debian/rules * Fix LP: #615889 - Add Ubuntu One bookmark to Firefox fresh install - update debian/patches/ubuntu_bookmarks.patch * Fix LP: #612185 - Apport leaks the secret name of the Firefox profile directory - update debian/apport/firefox.py * Fix LP: #614190 - Chinese update for firefox.desktop. Thanks to Cheng-Chia Tseng and Aron Xu - update debian/firefox-final.desktop * Fix LP: #559083 - Incomplete Vietnamese translation for items listed in desktop main menu. Thanks to Vu Do Quynh for the translations - update debian/firefox-final.desktop [ Igor Zubarev ] * Fix LP: #569762 - Add Russian translations to desktop files - update debian/abrowser.desktop - update debian/firefox-final.desktop -- Chris Coulson Thu, 12 Aug 2010 21:52:18 +0100 firefox (3.6.8+build1+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.8build1 (FIREFOX_3_6_8_BUILD1) [ Alexander Sack ] * add support for mozilla breakpad symbols and in turn enable crashreporter - add debian/patches/ftbfs_crashreporter.patch - update debian/patches/series - update debian/control - update debian/rules [ Chris Coulson ] * Drop all the transitional packages and conflicts/replaces cruft built up from the pre-LTS releases - update debian/control * Install the crash reporter - update debian/firefox.install * Build with MOZILLA_OFFICIAL=1. This is required to enable the crash reporter in application.ini - update debian/rules [ Micah Gersten ] * Add build depends on libcurl4-openssl-dev for building the crash reporter - update debian/control -- Chris Coulson Fri, 23 Jul 2010 16:40:54 +0200 firefox (3.6.7+build2+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.7build2 (FIREFOX_3_6_7_BUILD2) * Make it possible to disable patches on a per-release basis. This makes it easier to share packaging branches across releases, and makes it possible to disable the patches which make the Hardy daily builds fail - update debian/rules - add debian/disable-patches.sh - add debian/patches/series-disable-patches.8.04 * Make the debian/usr.bin.firefox.apparmor.in target a dependency of pre-build rather than makebuilddir. Whilst this doesn't really change much, it is technically slightly more correct (makebuilddir is just for creating the build directory, whilst pre-build is for doing all the preparation work) - update debian/rules * Merge the debian/firefox.sh target in to the match-all target, this just de-clutters things a little - update debian/rules * Remove debian/stamp-autotools-files-moz in the clean target - update debian/rules * Drop the empty firefox-dev and firefox-*-dev transitional packages. We didn't install anything in to firefox-dev, and we can reintroduce it in the future if anything in the archive depends on the browser specific interfaces - update debian/control - remove debian/firefox-dev.install - remove debian/firefox-dev.links * Fix some Lintian warnings - add debian/README.source - update debian/control * Make debian/migrator/ffox-beta-profile-migration-dialog a dependency of post-patches rather than pre-build. This avoids the need for having to build the profile migrator when unpacking the source tarball - update debian/rules -- Chris Coulson Thu, 15 Jul 2010 23:51:25 +0200 firefox (3.6.7+build1+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.7 (FIREFOX_3_6_7_BUILD1) * Set the StartupWMClass to the same value as the WM_CLASS property on the browser window. This makes startup notification work for all branding and also makes it work properly with Docky - update debian/firefox-minefield.desktop - update debian/firefox-namoroka.desktop - update debian/abrowser.desktop -- Chris Coulson Fri, 09 Jul 2010 12:16:23 +0100 firefox (3.6.6+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.6 (FIREFOX_3_6_6_RELEASE) * fix LP: #590450 - Firefox should use the hunspell directory for dictionaries - update debian/rules -- Micah Gersten Sun, 27 Jun 2010 01:30:09 -0500 firefox (3.6.4+build7+nobinonly-0ubuntu1) maverick; urgency=low * New upstream release v3.6.4 (FIREFOX_3_6_4_BUILD7) [ Micah Gersten ] * Rebase patch after upstream landing of Lorentz branch - update debian/patches/bz460917_att350845_reload_new_plugins.patch * Drop patch after upstream landing of (bmo: 544481) aka Build fails on Ubuntu Lucid Lynx using 'dash' shell - drop debian/patches/fix-build-glitch.patch - update debian/patches/series [ Jamie Strandboge ] * AppArmor: - allow ixr access to /usr/lib/xulrunner-*/plugin-container for xul builds - finetune Adobe Reader access (LP: #570337) - silence noisy denial on /boot/vmlinuz* and /boot/initrd.img* caused by readlinking symlinks in / (LP: #571761) - allow 'm' for java's 'classes.jsa' file (LP: #574459) - transition to firefox_java on Sun's jre/bin/java_vm too (LP: #570128) - allow Uxr for gnome-codec-install (LP: #577097) [ Chris Coulson ] * Rebase patches for 3.6.4 release - update debian/patches/firefox-kde.patch - update debian/patches/mozilla-kde.patch - update debian/patches/add_syspref_dir.patch * Build with --enable-ipc on amd64, i386 and armel. These are the only architectures where OOPP is supported. Build with --disable-ipc on all other architectures - update debian/rules * Fix LP: #513887 - Install the plugin-container binary for OOPP support when building with --enable-ipc - update debian/rules * Fix build failure with fontconfig 2.5 - update debian/patches/lp512615_cairo_lcd_filter.patch * Fix LP: #469752 - KDE/Gnome startup notification not disappearing when app window is up - build with --enable-startup-notification - update debian/rules -- Chris Coulson Wed, 23 Jun 2010 15:31:44 +0100 firefox (3.6.3+nobinonly-0ubuntu4) lucid; urgency=low * fix LP: #443147 - Firefox on ARM inappropriately adds scroll bars to many frames and images; this is a workaround that forces -O2 for the whole mozilla tree build on armel; the scroll bar only manifests on lucid toolchain when using the upstream optimization flag mix - update debian/rules -- Alexander Sack Wed, 21 Apr 2010 17:14:28 +0200 firefox (3.6.3+nobinonly-0ubuntu3) lucid; urgency=low [ Jamie Strandboge ] * AppArmor: add read access to /etc/xul-ext/**, now needed by adblock [ Chris Coulson ] * Create checksums for NSS libraries to make FIPS mode work (LP: #559881) - update debian/rules -- Chris Coulson Tue, 13 Apr 2010 22:20:28 +0100 firefox (3.6.3+nobinonly-0ubuntu2) lucid; urgency=low [ Chris Coulson ] * Fix LP: #526291 - abrowser menu entry has Firefox icon. After changing the branding in common-post-build-arch, ensure that the firefox icons in dist/bin/icons are replaced with the abrowser icons - update debian/rules * Fix LP: #408238 - does not provide gnome-www-browser - update debian/firefox-gnome-support.postinst.in - add debian/firefox-gnome-support.prerm.in - update debian/rules * Update Google and Yahoo! search URL's - add debian/patches/ubuntu_codes_google.patch - update debian/patches/series - update debian/firefox.js * Fix LP: #520166 - Restore ability to set a preferred plugin for a given mime-type, which regressed since we are not using the system xulrunner - add debian/patches/bzXXX_plugin_for_mimetype_pref.patch - update debian/patches/series * Fix LP: #557640 - nrf-003 testcase failed Default "Welcome to Ubuntu" page doesn't appear without connectivity - re-enable the NetworkManager integration - update debian/firefox.js * Fix LP: #541951 - Firefox 3.6 does not honour lockPref - resurrect the patch used in xulrunner to reimplement this - add debian/patches/bz467738_att351145_lockPref_everywhere.patch - update debian/patches/series [ Jamie Strandboge ] * AppArmor: - add apturl (LP: #558432) -- Chris Coulson Fri, 09 Apr 2010 12:29:53 +0100 firefox (3.6.3+nobinonly-0ubuntu1) lucid; urgency=low * New upstream release v3.6.3 (FIREFOX_3_6_3_RELEASE) [ Jamie Strandboge ] * AppArmor: - add leafpad and mousepad text editors for XFCE users (LP: #543587) [ Micah Gersten ] * fix LP: #548866 - forgets middlemouse.contentLoadURL on upgrade; add patch from xulrunner-1.9.1 - update debian/patches/series - add debian/patches/lp548866_bz467766_att351173-dont-reset-user-prefs-on-upgrade.patch [ Chris Coulson ] * Add a cairo LCD filter to use Freetype LCD colour filtering features, based on the same patch applied to our system cairo package. Thanks to Marc Deslauriers for helping to make this work. (LP: #512615) - add debian/patches/lp512615_cairo_lcd_filter.patch - update debian/patches/series * Fix LP: #546490 - "Firefox will not start in debug mode" - update debian/firefox.sh.in * Fix a build issue installing ubuntu-abrowser.js when building with DEB_MIN_SYSDEPS=0 - update debian/rules -- Chris Coulson Fri, 02 Apr 2010 16:44:02 +0100 firefox (3.6.2+nobinonly-0ubuntu1) lucid; urgency=low * New upstream release v3.6.2 (FIREFOX_3_6_2_RELEASE) [ Felix Geyer ] * Rebase mozilla-kde.patch for 3.6.2 - update debian/patches/mozilla-kde.patch [ Jamie Strandboge ] * AppArmor profile cleanup for Lucid users: - remove sys_ptrace now that the kernel DTRT (LP: #498317) - don't use @{PROC}/[0-9]*/mounts or /etc/gnome/defaults.list (part of gnome abstraction now) - don't use @{PROC}/[0-9]*/maps (part of base abstraction) - don't use /etc/sound (part of audio abstraction) - use 'owner' for Desktop and all dot files and directories in @{HOME} - use ubuntu-bittorrent-clients abstraction - use ubuntu-media-players abstraction - allow access to xubuntu default app list (LP: #500231) - add ark and xarchiver for KDE and XFCE archive managers - add thunar for XFCE - add editors supported by It's All Text, thanks to James Troup (LP: #507711) - allow RealPlayer plugin and access to /usr/local/lib (LP: #501822) - allow Ux for scim and scim-bridge - allow ix for gst-plugin-scanner * ship different AppArmor profiles for different releases: - move usr.bin.firefox.apparmor.in to usr.bin.firefox.apparmor.9.10 - add usr.bin.firefox.apparmor.10.04 - debian/rules: ship AppArmor profile based on release: + add DISTRIB, DISTRIB_VERSION_MAJOR and DISTRIB_VERSION_MINOR + ship 9.10 profile for Karmic and under and 10.04 profile for Lucid and later * update AppArmor profile to transition to a java child profile rather than Ux. This has the added benefit of restricting java a bit more than before. This is needed since the java plugins are expecting certain environment variables to be present, which get scrubbed with Ux. 'cx' doesn't remove these from the environment but allows for better profiling over 'ux'. Thanks to John Johansen for discussion and idea. (LP: #484148) [ Alexander Sack ] * fix LP: #518422 - Firefox does not start with certain addons installed; don't normalize paths for xpti.dat - add debian/patches/lp518422.patch - update debian/series [ Micah Gersten ] * Bump minimum system NSS to 3.12.6 after upstream landing of (bmo: 545755) aka Update Mozilla stable branches to NSS 3.12.6 and minimal support for RFC 5746 - update debian/rules * Really fix FTBFS for sparc; Add configure flag to correct variable - update debian/rules -- Micah Gersten Wed, 24 Mar 2010 01:17:46 -0500 firefox (3.6+nobinonly-0ubuntu6) lucid; urgency=low [ Jamie Strandboge ] * adjust AppArmor profile to allow scim [ Felix Geyer ] * Apply KDE integration from openSUSE (LP: #494067) - add debian/patches/mozilla-kde.patch - add debian/patches/firefox-kde.patch - update debian/patches/series - update debian/rules * Add kmozillahelper to suggests of firefox - update debian/control [ Kees Cook ] * fix LP: #531581 - cannot report bugs or crashes when profile names contains spaces; concatenate non alnum characters in profile name for apport use - update debian/apport/firefox.py [ Micah Gersten ] * fix LP: #531895 - Firefox isn't in Ubuntu Software Center's "Internet" or "Web Browsers" sections; Add Internet and WebBrowser Categories to .desktop - update debian/abrowser.desktop - update debian/firefox-final.desktop - update debian/firefox-namoroka.desktop * fix FTBFS on sparc; disable jit on sparc until bmo 502369 is fixable - update debian/rules -- Micah Gersten Sat, 06 Mar 2010 23:47:38 -0600 firefox (3.6+nobinonly-0ubuntu5) lucid; urgency=low [ Micah Gersten ] * fix LP: #514108 - Cookie Accept Dialog Not Shown on Firefox 3.6; install chrome/comm.* libraries - update debian/rules * fix LP: #525181 - "Make a Support Request to the Ubuntu Community" bookmark woefully out of date; update bookmark - update debian/patches/ubuntu_bookmarks.patch [ Felix Geyer ] * fix LP: #396786 - Default theme missing in Firefox 3.6 - update debian/firefox.install [ Alexander Sack ] * use preference way to set yahoo search code 'chr-ubuntu-os' rather than patching source - update debian/firefox.js - delete debian/patches/ubuntu_codes_yahoo.patch - update debian/patches/series -- Alexander Sack Mon, 22 Feb 2010 12:53:08 +0100 firefox (3.6+nobinonly-0ubuntu4) lucid; urgency=low * fix LP: #523569 - No search providers or default search provider in 3.6+nobinonly-0ubuntu3; fix syntax issue in bugfix for bmo 534663 - update debian/patches/bz534663_attXXX_normalize_distribution_searchplugins.patch -- Alexander Sack Thu, 18 Feb 2010 03:16:19 +0100 firefox (3.6+nobinonly-0ubuntu3) lucid; urgency=low [ Alexander Sack ] * fix LP: #520963 - sysprefs not honoured since firefox is built without system xulrunner; resurrect the patch we ship in xulrunner - add debian/patches/add_syspref_dir.patch - update debian/patches/series * fix LP: #520682 - Only search provider is Ask.com; set en-US as distribution.searchplugins.defaultLocale in syspref firefox.js - update debian/firefox.js * fix LP: #428306 - default search engines are removed and readded (keywords wiped) with upgrade - add debian/patches/bz534663_attXXX_normalize_distribution_searchplugins.patch - update debian/patches/series * add ubuntu fr code for yahoo (en-US) searchplugin - add debian/patches/ubuntu_codes_yahoo.patch - update debian/patches/series [ Micah Gersten ] * Rename apport hook to firefox.py (unversioned) - rename debian/apport/firefox-3.6.py => debian/apport/firefox.py * Update apport hook to pull from unversioned profile directory * Update apport hook to report on non-distro package and tag PPA * Collect version info for firefox/abrowser packages - update debian/apport/firefox.py * Install apport hook again - update debian/firefox.install [ Jamie Strandboge ] * debian/firefox.postinst.in: move aside the old firefox-3.5 AppArmor profile -- Alexander Sack Wed, 17 Feb 2010 21:48:12 +0100 firefox (3.6+nobinonly-0ubuntu2) lucid; urgency=low [ Alexander Sack ] * fix firefox-3.5-gnome-support transitional package typo; depend on firefox-gnome-support instead of firefox-3.5-gnome-support - update debian/control [ Michael Vogt ] * add missing Replace: firefox-3.0 for the firefox-branding package (LP: #518747). This fixes a upgrade issues from hardy to lucid. - update debian/control [ Jamie Strandboge ] * debian/firefox.postinst.in: - remove AppArmor profile from dailies on upgrades (LP: #512470) - remove extraneous -T -W from apparmor_parser - check for disabled profile ourselves, since apparmor_parser on Ubuntu 9.04 and earlier didn't honor the disable/ directory * debian/firefox.preinst.in: unconditionally disable the AppArmor profile on Ubuntu 9.04 and earlier, since it requires abstractions found only in 9.10 * debian/control: have firefox Depends on lsb-release (needed in preinst) * debian/usr.bin.firefox.apparmor.in: - adjustments in rules for name change (LP: #513160) - allow /usr/bin/tr [ Micah Gersten ] * Add replaces to firefox-branding on kubuntu-firefox-installer (LP: #439431) - update debian/control * Add firefox 3 transitional packages and Replaces/Provides/Conflicts (LP: #513074) - update debian/control * Don't install firefox.xml for adding entries to gnome-default-applications-properties (LP: #519606) - update debian/control * Update rosetta template name to firefox-3.6 - update debian/translation-support/install.rdf.in * Update EM_TRANSLATION variables for firefox 3.6 - update debian/rules -- Micah Gersten Wed, 10 Feb 2010 14:52:12 -0600 firefox (3.6+nobinonly-0ubuntu1) lucid; urgency=low * New upstream release v3.6 (FIREFOX_3_6_RELEASE) + fix LP: #449744 - Firefox crashes when attempting to load Firebug 1.5 + fix LP: #66015 - Duplicate spell checking dictionaries for every entry + fix LP: #132938 - tooltips dont work in sidebar + fix LP: #195698 - Password asked separately for each tab that requires it (proxy) + fix LP: #239462 - tooltips disappear too fast + fix LP: #385816 - Resize corner grab stays visible after maximize + fix LP: #429476 - firefox crash on javascript page + fix LP: #432876 - Icons missing in Firefox searchbox drop down list + fix LP: #486284 - maxlength on input box can be overriden by autocomplete + fix LP: #501393 - Integrate Firefox notifications with notify-osd bling [ H. Montoliu ] * fix LP: #361052 - firefox apport hook fails to retrieve pluginreg.dat file * update debian/apport/firefox-3.6.py - removed unused code and minor refactoring. [ Fabien Tassin ] * Update the location of the upsteam branch now that 3.6/Namoroka has its own branch, and trunk moved on to 3.7 - update debian/mozclient/firefox-3.6.conf * Use Namoroka instead of Shiretoko as brand name and use it for snapshots. Name it Namoroka in the Preferred Application UI too - update debian/firefox-3.6-shiretoko.desktop => debian/firefox-3.6-namoroka.desktop - update debian/firefox-3.6.xml - update debian/rules * Target the 'default' branch instead of tip - add debian/moz-rev.sh - update debian/mozclient/firefox-3.6.conf * Add firefox 3.6 to the list of Preferred Applications in Gnome - add debian/firefox-3.6.xml - update debian/firefox-3.6-gnome-support.install * Add ${misc:Depends} to all non-transitional packages, make firefox-3.6-dbg depend on firefox-3.6 with the exact same version, move -dbg packges to priority extra and add firefox-3.6-gnome-support-dbg - update debian/control * Update diverged patches: - update debian/patches/browser_branding.patch - update debian/patches/firefox-profilename - update debian/patches/ubuntu_bookmarks.patch - update debian/patches/lp185622_system_path_default_browser.patch - update debian/patches/dont_depend_on_nspr_sources.patch [ Alexander Sack ] * add libnotify-dev to build-depends - update debian/control * add libiw-dev to build-depends to fix build failure - update debian/control * until we move searchplugins to a separate package provided only by the current default firefox, we need to make firefox-3.6 replace all the older firefox binary packages: firefox-3.5, firefox-3.2, firefox-3.1, firefox-3.0 - update debian/control * implement MIN_SYS_DEPS approach that does not use system xulrunner and only a minimal set of system dependencies. + drop patches not required anymore: - delete debian/patches/dont_depend_on_nspr_sources.patch - update debian/patches/series + update browser directory provider patch - update debian/patches/bz515232_att399338_distro_locale_searchplugins.patch + move .install lines that depend on whether MIN_SYS_DEPS is used or not to debian/rules in ifneq (,$(MIN_SYS_DEPS)) blocks - update debian/rules - update debian/firefox-3.5.install + ship gnome support .so's inside of the main package, but keep dependencies in the (now empty) gnome-support package; to achieve this, we first install the gnome support files in the -gnome-support package and move them to the main package _after_ shlib depends where generated - update debian/rules + do not build-depend on xulrunner dev package anymore; local xulrunner builds with MIN_SYS_DEPS=0 should still work though - update debian/control + make firefox-3.5 conflict firefox-3.5-gnome-support as it shipps the gnome files directly now - update debian/control * add patch for armv7 support - add debian/patches/bz532198_lp488354_ns_invokebyindex_not_thumb2_safe.patch - update debian/patches/series * move to unversioned binary and source package name for "archive" firefox + generalize final version dependent pieces in debian/rules - update debian/rules + update mozclient/ files to create unversioned sources/tarballs - rename debian/mozclient/firefox-3.6.conf => debian/mozclient/firefox.conf - update debian/mozclient/firefox.conf - rename debian/mozclient/firefox-3.6.mk => debian/mozclient/firefox.mk + rename and update previously versioned debhelper files - rename debian/firefox-3.6-dev.install => debian/firefox-dev.install - rename debian/firefox-3.6-dev.links => debian/firefox-dev.links - rename debian/firefox-3.6-gnome-support.install => debian/firefox-gnome-support.install - rename debian/firefox-3.6-gnome-support.postinst.in => debian/firefox-gnome-support.postinst.in - rename debian/firefox-3.6.dirs => debian/firefox.dirs - rename debian/firefox-3.6.install => debian/firefox.install - update debian/firefox.install - rename debian/firefox-3.6.links => debian/firefox.links - update debian/firefox.links + rename versioned maintainer scripts - rename debian/firefox-3.6.postinst.in => debian/firefox.postinst.in - rename debian/firefox-3.6.postrm.in => debian/firefox.postrm.in - rename debian/firefox-3.6.preinst.in => debian/firefox.preinst.in - rename debian/firefox-3.6.prerm.in => debian/firefox.prerm.in + rename and update previously versioned .desktop, gnome helper and other debian integration files - rename debian/abrowser-3.6.desktop => debian/abrowser.desktop - rename debian/firefox-3.6-final.desktop => debian/firefox-final.desktop - update debian/firefox-final.desktop - rename debian/firefox-3.6-minefield.desktop => debian/firefox-minefield.desktop - update debian/firefox-minefield.desktop - rename debian/firefox-3.6-namoroka.desktop => debian/firefox-namoroka.desktop - update debian/firefox-namoroka.desktop - rename debian/firefox-3.6.menu => debian/firefox.menu - update debian/firefox.menu - rename debian/firefox-3.6.xml => debian/firefox.xml - update debian/firefox.xml - rename debian/firefox-3.6-restart-required.update-notifier => debian/firefox-restart-required.update-notifier - update debian/firefox-restart-required.update-notifier - update debian/control + disable patches for versioned directories and binaries - update debian/patches/series + add fix issues in libpr0n for make syntax issues after lucid dash/bash update; patch by Kees Cook - add debian/patches/fix-build-glitch.patch - update debian/patches/series * ease transition for daily firefox-3.6 users by adding conflicts/replaces on firefox-3.6-gnome-support to firefox binary package which now ships bits previously in there. - update debian/control * update to firefox.sh.in start script from firefox-3.5 branch and add firefox-3.6 transition accordingly; also adjust a bunch of wrongly worded debug messages - update debian/firefox.sh.in * fix version number used in profile migration dialog - update debian/migrator/main.c * fix wrapper startscript to properly handle all-static firefox build - update debian/firefox.sh.in * fix DEBIAN_NAME_OTHER to work for non-versioned abrowser main packages - update debian/rules * fix startscript for abrowser; set CMDNAME_USER=firefox for run-mozilla.sh; and also use META_NAME to guess the -bin binary - update debian/firefox.sh.in * add CMDNAME_USER feature to overwrite cmdname for abrowser in run-mozilla.sh - add debian/patches/abrowser_run_mozilla.patch - update debian/patches/series * fix abrowser.desktop; use unversioned icon and exec name - update debian/abrowser.desktop * copy abrowser.desktop translations from firefox-3.5.head branch - update debian/abrowser.desktop * add firefox-2* transitional packages for hardy users - update debian/control [ Micah Gersten ] * Rebase/minor code change after upstream landing of unified manifest (bmo: 511642) - update debian/patches/awesome_browser_branding_install.patch - update debian/patches/browser_branding.patch - update debian/patches/bzXXX_moz_app_name_inconsistencies.patch [ Jamie Strandboge ] * add AppArmor profile (disabled by default) - debian/firefox-3.6.dirs: add etc/apparmor.d/disable - add debian/firefox-3.6.preinst.in: disable the profile on new installs, installs where the last modified profile is disabled and upgrades to this version - debian/firefox-3.6.postinst.in: reload profile - add debian/firefox-3.5.postrm.in: cleanup force-complain and disable directories - add debian/usr.bin.firefox.apparmor.in - add debian/README.Debian.in with note about AppArmor - debian/apport/firefox-3.6.py: add AppArmor information if the profile is not disabled - debian/rules: install profile and update subst_files - allow dirname and pwd. Thanks to Thomas Templin. (LP: #510644) - allow the IBM jre - debian/usr.bin.firefox.apparmor.in: use @LIBDIR@/firefox-*bin as binary confined by AppArmor [ Kees Cook ] * enable PIE build for stronger security (LP: #507744) - update debian/rules - update debian/control -- Alexander Sack Sat, 23 Jan 2010 16:46:32 +0100 firefox-3.5 (3.5.7+nobinonly-0ubuntu1) lucid; urgency=low * New upstream release v3.5.7 (FIREFOX_3_5_7_RELEASE) - see USN-878-1 [ Benjamin Drung ] * Add metadata for mozilla-devscripts - update debian/control -- Micah Gersten Tue, 05 Jan 2010 18:02:04 -0600 firefox-3.5 (3.5.6+nobinonly-0ubuntu1) lucid; urgency=low * New upstream release v3.5.6 (FIREFOX_3_5_6_RELEASE) - see USN-874-1 [ Micah Gersten ] * Bump minimum system cairo to 1.8.8 - update debian/rules * Fix .desktop Name field for Slovak translation (LP: 448683) - update debian/firefox-3.5-final.desktop * Fix .desktop Name field for Estonian and Arabic translations (LP: 419507, LP: 321239) - update debian/firefox-3.5-final.desktop [ Jamie Strandboge ] * AppArmor fixes: - allow access to nautilus, to allow "Open containing folder" to work (LP: #452591) - allow access for deluge (LP: #455792) - work better with KDE by adding kde abstraction, allow access to soffice, allow access to okular and read access to /etc/fstab (for print dialog) (LP: #447006) - allow access to acroread (LP: #473268) - allow access to eog (LP: #464016) - allow access to transmission (LP: #476299) - deny noisy write attempts to deny /usr/lib/xulrunner-*/components/*.tmp as seen with 'firefox --help') - deny noisy read to /.suspended (when navigating directories) - allow access to /usr/bin/liferea-add-feed (LP: #488851) - allow access to azureus (LP: #482677) - don't require 'owner' for /media (LP: #479580) - adjust AppArmor profile binary globbing to match other branches - allow ixr access to sed (for first runs) [ Alexander Sack ] * bump lower bound for system sqlite3 to >= 3.6.16.1 - update debian/rules -- Alexander Sack Wed, 16 Dec 2009 00:43:08 +0100 firefox-3.5 (3.5.5+nobinonly-0ubuntu2) lucid; urgency=low * New upstream release v3.5.5 (FIREFOX_3_5_5_RELEASE) * fixes regressions/crashes -- Alexander Sack Mon, 09 Nov 2009 11:40:35 +0100 firefox-3.5 (3.5.4+nobinonly-0ubuntu1) lucid; urgency=low * New upstream release v1.9.1.4 (FIREFOX_3_5_4_RELEASE) - see USN-853-1 [ Alexander Sack ] * use awesome-browser-branch-3.5 during tarball creation - update debian/mozclient/firefox-3.5.conf * drop branding patch for lp:396156 as new upstream tarballs automatically contain this fix now. - delete debian/patches/lp396156_prepatch_abrowser_branding.patch - update debian/patches/series [ Fabien Tassin ] * Don't enable the AppArmor profile by default for backports coming from the Mozilla daily PPA. It's still possible for users to enable that themselves though - update debian/firefox-3.5.preinst.in -- Alexander Sack Mon, 09 Nov 2009 11:21:28 +0100 firefox-3.5 (3.5.3+build1+nobinonly-0ubuntu6) karmic; urgency=low [ Fabien Tassin ] * fix LP: #454166 - target the 'default' branch instead of tip - add debian/moz-rev.sh - update debian/mozclient/firefox-3.5.conf [ Alexander Sack ] * fix LP: #455504 - abrowser does not run from Applications Menu; create the unversioned link in debian/rules like we do for the firefox name - update debian/rules * fix LP: #455517 - supersede firefox 3.0 and xulrunner-1.9 in karmic; add transitional packages and add Conflicts/Replaces/Provides accordingly. - update debian/control * fix LP: #396156 - Help→About does not function (abrowser-3.5, jaunty-proposed); we prepatch the required changes to browser/branding/awesome-browser/ tree taken from the 3.5 branding branch: lp:~mozillateam/firefox/awesome-browser-branding-3.5 - add debian/patches/lp396156_prepatch_abrowser_branding.patch - update debian/patches/series -- Alexander Sack Tue, 20 Oct 2009 10:42:56 +0200 firefox-3.5 (3.5.3+build1+nobinonly-0ubuntu5) karmic; urgency=low * fix LP: #411691 - many Exception... "update.locale file doesn't exist" in console"; patch by Micah Gersten - update debian/rules -- Alexander Sack Thu, 15 Oct 2009 02:49:12 +0200 firefox-3.5 (3.5.3+build1+nobinonly-0ubuntu4) karmic; urgency=low [ Fabien Tassin ] * Bump requirement for system sqlite to >= 3.6.16 (bmo 508104) - update debian/rules [ Alexander Sack ] * fix LP: #423610 - daily build failures after landing of mozilla-nss.pc droppage (bug 422829); we drop our previously used nspr pkgconfig patch and fix configure.in to not require in-source nspr if libxul-sdk is used - delete debian/patches/nspr_flags_by_pkg_config_hack.patch - add debian/patches/bzXXX_libxul_sdk_nspr.patch - update debian/patches/series * now that we always use libxul-sdk for getting the nspr flags we can use --without-system-nspr and --without-system-nss all the time - update debian/rules * rework localized search engine patch to use ChromeRegistry locale information rather than a char pref; also change plugin dir order to allow locale specific searchplugins to overlay the ones shipped in "searchplugins/common" - add debian/patches/bz515232_att399338_distro_locale_searchplugins.patch - update debian/patches/series * adjust packaging to support localized searchplugins + ship default searchplugins in /usr/lib/firefox-addons/searchplugins/en-US/ and link that directory to $(DEBIAN_FF3_DIR)/distribution/searchplugins instead of the main firefox APP_DIR - update debian/rules + set default searchplugin locale pref to en-US - which is used as a fallback if no matching searchplugins/LOCALE directory exists for the current locale directory - update debian/firefox.js + do not install upstream searchplugins through debhelper file and install "debsearch" to the new distribution/.../en-US location - update debian/firefox-3.0.install + ship "common" searchplugins link that points to the old default searchplugins location '/usr/lib/firefox-addons/searchplugins/ - update debian/rules [ Jamie Strandboge ] * fix bugs surrounding apparmor profile + allow ixr access to gnash (LP: #429061) + allow ixr access to pulseaudio (LP: #432702) + allow access to plugins directory (LP: #428071) + allow access to mounted media (LP: #433362) + allow access to abstractions/ubuntu-console-email, abstractions/ubuntu-email and abstractions/ubuntu-gnome-terminal for mailto:. Add commented section for using xterm and konsole - update debian/usr.bin.firefox-3.5 + allow access to extensions directory (LP: #433128) + allow 'k' access to @{HOME}/.mozilla/**/*.sqlite* (LP: #449286) + allow Ux access to apport-bug (LP: #449423) + allow access to /etc/mplayerplug-in.conf (LP: #439484) -- Alexander Sack Thu, 15 Oct 2009 02:30:48 +0200 firefox-3.5 (3.5.3+build1+nobinonly-0ubuntu3) karmic; urgency=low [ Jamie Strandboge ] * disable profile on upgrades from earlier Ubuntu releases (LP: #436221) - update debian/firefox-3.5.preinst.in -- Alexander Sack Mon, 28 Sep 2009 10:35:46 +0200 firefox-3.5 (3.5.3+build1+nobinonly-0ubuntu2) karmic; urgency=low * security/stability update v3.5.3 build1 (FIREFOX_3_5_3_BUILD1) - see USN-821-1 - fix LP: #333127 - Firefox 3.5 and above crash on full screen flash video - fix LP: #236853 - firefox crashed with SIGSEGV in NSSRWLock_LockRead_Util() [ Alexander Sack ] * fix LP: #422365 - apport hook fails because profiles_d is not initialized in add_info if no profiles.ini exist; we ensure that profiles_d gets instantiated as an empty map even if no profiles.ini exist. - update debian/apport/firefox-3.5.py * hook firefox-addons/searchplugins as the distribution/searchplugins directory to support localized distro search engines. - update debian/rules * in case localized search engines are available the main searchplugins directory is not scanned anymore; to fix this we provide a compatibility link /usr/lib/firefox-addons/searchplugins/common => /usr/lib/firefox-addons/searchplugins - update debian/firefox-3.5.links * fix localized search engine upstream code to properly deal with general.useragent.locale being a complex pref; also change plugin dir order to allow locale specific searchplugins to overlay the ones shipped in "searchplugins/common" - add debian/patches/fix_complex_locale_distro_searchplugins.patch - update debian/patches/series [ Jamie Strandboge ] * add AppArmor profile (disabled by default) (LP: #382917) - debian/firefox-3.5.dirs: add etc/apparmor.d/disable - add debian/firefox-3.5.preinst.in: disable the profile on new installs and upgrades to this version - debian/firefox-3.5.postinst.in: reload profile - add debian/firefox-3.5.postrm.in: cleanup force-complain and disable directories - add debian/usr.bin.firefox.apparmor.in - debian/rules: install profile - add debian/README.Debian.in with note about AppArmor - debian/apport/firefox-3.5.py: add AppArmor information if the profile is not disabled - debian/firefox-3.5.preinst.in: allow for when apparmor is not installed -- Alexander Sack Thu, 03 Sep 2009 10:03:08 +0200 firefox-3.5 (3.5.2+nobinonly-0ubuntu2) karmic; urgency=low Firefox 3.5 by default upload + see: https://blueprints.launchpad.net/ubuntu/+spec/desktop-karmic-firefox-3.5 [ Fabien Tassin ] * Make firefox-3.5 the default firefox. Use the official branding only for releases (the -daily PPA remains branded as Shiretoko, like the upstream nightlies). Activate the profile migrator and the apport hooks. Add the meta packages to make the transition smoother. - update debian/control - drop debian/patches/firefox-fsh - drop debian/patches/firefox-profilename - update debian/patches/series - update debian/firefox-3.5.install - update debian/firefox.sh.in - update debian/migrator/main.c - update debian/mozclient/firefox-3.5.mk - update debian/rules - update debian/firefox-3.5-final.desktop - update debian/firefox-3.5-shiretoko.desktop - update debian/abrowser-3.5.desktop - update debian/apport/firefox-3.5.py [ Alexander Sack ] * make -final and -shiretoko .desktop file refer to unversioned "firefox" Binary and Icon - update debian/firefox-3.5-shiretoko.desktop - update debian/firefox-3.5-final.desktop - update debian/firefox-3.5-minefield.desktop - update debian/abrowser-3.5.desktop * add translations for .desktop file from firefox-3.0.head branch - update debian/firefox-3.5-final.desktop - update debian/abrowser-3.5.desktop * set BUILD_OFFICIAL = 1 to enable all official build features - update debian/rules * fix LP: #404827 - Firefox doesn't warn about Attack Sites!?; add --enable-safe-browsing to configure flags - update debian/rules * fix LP: #383484 - search engine plugins missing in firefox-3.5 packages; installing searchplugins and default theme as now firefox-3.5 Replaces: firefox-3.0 - update debian/firefox-3.5.install * fix restart issues by installing proper versioned binary (without a firefox-fsh patch); in turn drop unversioned firefox link from .install - update debian/rules - update debian/firefox-3.0.install -- Alexander Sack Mon, 10 Aug 2009 17:05:37 +0200 firefox-3.5 (3.5.2+nobinonly-0ubuntu1) karmic; urgency=low * security/stability update v3.5.2 (FIREFOX_3_5_2_RELEASE) [ Fabien Tassin ] * Fix postinst to also consider firefox-3.5 for the update-notifier restart notification - update debian/firefox-3.5.postinst.in * Fix bogus prerm rule removing the wrong alternative - update renamed debian/firefox-3.5.prerm * Refresh diverged patch - update debian/patches/nspr_flags_by_pkg_config_hack.patch -- Alexander Sack Mon, 03 Aug 2009 16:52:25 +0200 firefox-3.5 (3.5.1+build1+nobinonly-0ubuntu1) karmic; urgency=low * security/stability update v3.5.1 build1 (FIREFOX_3_5_1_BUILD1) * fix LP: #396460 - Firefox 3.5 'final' version is in repos but tooltip in menu says 'beta'; we update the shiretoko desktop file to not say "beta" anymore - update debian/firefox-3.5-shiretoko.desktop * fix LP: #398121 - firefox-3.5-gnome-support failed to install/upgrade; we make the postinst script more failsafe - update debian/firefox-3.5-gnome-support.postinst.in -- Alexander Sack Thu, 16 Jul 2009 18:27:57 +0200 firefox-3.5 (3.5+nobinonly-0ubuntu1) karmic; urgency=low * New upstream release taken from tag FIREFOX_3_5_RELEASE * Bump Depends/Build-Depends for xulrunner-1.9.1(-dev) to >= 1.9.1 - update debian/control * Bump EM_TRANSLATION_{MIN,MAX}_VERSION and MaxVersion/MinVersion (from application.ini) - update debian/rules -- Fabien Tassin Tue, 30 Jun 2009 20:01:33 +0200 firefox-3.5 (3.5~rc2+nobinonly-0ubuntu1) karmic; urgency=low * New upstream release taken from tag FIREFOX_3_5rc2_RELEASE * Fix startup page, release notes and first run bogus URLs when using non official brandings. Also fix bogus addons URLs due to our change of appname (LP: #388880) - update debian/patches/firefox-profilename * Fix profile migrator broken when using abrowser-3.5 (LP: #331654) - update debian/firefox.sh.in * Bump Standards-Version to 3.8.1 - update debian/control * Call update-menus - update debian/firefox-3.5.postinst.in * Make firefox-3.5-dbg depend on firefox-3.5 with the exact same version - update debian/control * Bump Depends and Build-depends to xulrunner* >= 1.9.1~rc2 - update debian/control * Refresh diverged patch: - update debian/patches/firefox-profilename -- Fabien Tassin Fri, 19 Jun 2009 18:55:00 +0200 firefox-3.5 (3.5~b4+nobinonly-0ubuntu2) karmic; urgency=low * bump (build-)depends version on xulrunner-1.9.1 to >= 1.9.1~b4 - update debian/control -- Alexander Sack Wed, 06 May 2009 22:27:21 +0200 firefox-3.5 (3.5~b4+nobinonly-0ubuntu1) karmic; urgency=low * New upstream release 3.5 b4 [ H. Montoliu ] * fix LP: #361052 - firefox apport hook fails to retrieve pluginreg.dat file - update debian/apport/firefox-3.5.py - removed unused code and minor refactoring -- Alexander Sack Wed, 29 Apr 2009 15:19:59 +0200 firefox-3.5 (3.5~b4~hg20090330r24021+nobinonly-0ubuntu1) jaunty; urgency=low * New upstream snapshot, needed to initiate the firefox 3.1->3.5 transition (LP: #352995) * Add libstartup-notification0-dev to build-deps as it now seems to be mandatory on lpia - update debian/control * Fix the mozclient include to really use the local configuration - update debian/rules * Update MOZCLIENT_GETDATE to make it use pushlog so it is not confused by merges with dates in the past - update debian/mozclient/firefox-3.5.conf -- Fabien Tassin Mon, 30 Mar 2009 19:00:40 +0200 firefox-3.1 (3.1~b3+build2+nobinonly-0ubuntu1) jaunty; urgency=low * New upstream release taken from tag FIREFOX_3_1b3_BUILD2 (LP: #339181) -- Fabien Tassin Sat, 07 Mar 2009 15:27:58 +0100 firefox-3.1 (3.1~b3~hg20090205r23182+nobinonly-0ubuntu1) jaunty; urgency=low [ Fabien Tassin ] * Drop upstreamed patch now that it has landed and add --with-system-libxul to configure. - update debian/rules - drop debian/patches/installer_shouldnt_copy_xulrunner.patch - update debian/patches/series [ Alexander Sack ] * add lower bound for xulrunner-1.9.1-dev build-depends to >= 1.9.1~b3~ - update debian/control -- Alexander Sack Sat, 07 Feb 2009 15:18:30 +0100 firefox-3.1 (3.1~b3~hg20090122r22900+nobinonly-0ubuntu1) jaunty; urgency=low [ Alexander Sack ] * improve reload plugins patch; dont rename function - update debian/patches/bzXXX_reload_new_plugins.patch * forward reload plugins patch upstream - debian/patches/bzXXX_reload_new_plugins.patch => bz460917_att350845_reload_new_plugins.patch * fix reload new plugins patch - use variables that actually exist on 3.1 - update debian/patches/bz460917_att350845_reload_new_plugins.patch [ Fabien Tassin ] * Move mozclient project files from mozilla-descripts to this package and update the upstream branch now that it has moved to 3.2 - add debian/mozclient/firefox-3.1.conf - add debian/mozclient/firefox-3.1.mk - update debian/rules * Fix menu still mentionning firefox 4 - update debian/firefox-3.1.menu * Fix WM class for minefield - update debian/firefox-3.1-minefield.desktop * Fix the update-notifier script to really look for firefox-3.1 - update debian/firefox-3.1-restart-required.update-notifier * Fix patch series after the rename of patch bz460917_* - update debian/patches/series * Revert to codename branding for betas - update debian/rules * Fix typo in control file - update debian/control * Drop useless patch: - drop debian/patches/ftbfs-with-branding-dir - update debian/patches/series * Update diverged patches: - update debian/patches/ubuntu_no_app_updates.patch - update debian/patches/dont_depend_on_nspr_sources.patch - update and rename debian/patches/ubuntu_bookmarks.html => debian/patches/ubuntu_bookmarks.patch & d/p/series -- Fabien Tassin Fri, 23 Jan 2009 00:33:43 +0100 firefox-3.1 (3.1~b2+build1+nobinonly-0ubuntu1) jaunty; urgency=low New upstream release: 3.1 beta 2 from FIREFOX_3_1b2_BUILD1 (LP: #274187) [ Fabien Tassin ] * Change appname and use a dedicated profile so 3.1 could run along with 3.0 without locking/corrupting the profile. Initial 3.1 profile is cloned from 3.0 whenever possible. - update debian/firefox.sh.in - add debian/patches/firefox-profilename - add debian/patches/firefox-fsh * Use Shiretoko, codename for 3.1 instead of Granparadiso - rename debian/firefox-3.1-granparadiso.desktop => firefox-3.1-shiretoko.desktop - update debian/rules * Unset FORCE_OFFICIAL_BRANDING to return to minefield branding for intermediate snapshots and to Shiretoko branding for milestones - update debian/rules * Set MALLOC_OPTIONS=O before calling xulrunner during build. This is needed to avoid a dead-lock in jemalloc when running under fakeroot - update debian/rules * Drop system nspr/nss (until the soname work is stable) - update debian/rules * Update requirement for system sqlite3 to >= 3.6.0 - update debian/rules * Add libasound2-dev to Build-Depends for the new HTML5