Merge lp:~joe-nationnet-deactivatedaccount/seamonkey/seamonkey-dev into lp:~mozillateam/seamonkey/seamonkey-2.0.dev

Proposed by Joe Lesko
Status: Merged
Merged at revision: 247
Proposed branch: lp:~joe-nationnet-deactivatedaccount/seamonkey/seamonkey-dev
Merge into: lp:~mozillateam/seamonkey/seamonkey-2.0.dev
Diff against target: 11444 lines (+8409/-2047)
168 files modified
debian/MPL (+567/-0)
debian/README.Debian (+0/-70)
debian/README.source (+0/-27)
debian/base.js (+0/-12)
debian/build/create-tarball (+434/-0)
debian/build/dump-langpack-control-entries (+78/-0)
debian/build/extract-file (+129/-0)
debian/build/get-orig-source.mk (+14/-0)
debian/build/get-xpi-id (+22/-0)
debian/build/refresh-supported-locales (+168/-0)
debian/build/testsuite.mk (+57/-0)
debian/changelog (+55/-0)
debian/compare-locales/REV (+1/-0)
debian/compare-locales/lib/Mozilla/CompareLocales.py (+506/-0)
debian/compare-locales/lib/Mozilla/Jars.py (+85/-0)
debian/compare-locales/lib/Mozilla/Parser.py (+425/-0)
debian/compare-locales/lib/Mozilla/Paths.py (+409/-0)
debian/compare-locales/lib/Mozilla/Tests.py (+394/-0)
debian/compare-locales/lib/Mozilla/__init__.py (+1/-0)
debian/compare-locales/scripts/compare-dirs (+76/-0)
debian/compare-locales/scripts/compare-locales (+85/-0)
debian/compare-locales/scripts/compare-packs (+69/-0)
debian/compare-locales/scripts/test-locales (+245/-0)
debian/compare-locales/scripts/verify-rss-redirects (+105/-0)
debian/config/branch.mk (+8/-0)
debian/config/locales.all (+1/-0)
debian/config/locales.blacklist (+1/-0)
debian/config/locales.shipped (+1/-0)
debian/config/mozconfig.in (+116/-0)
debian/control (+65/-121)
debian/control.in (+87/-0)
debian/control.langpacks (+7/-0)
debian/control.langpacks.unavail (+9/-0)
debian/copyright (+39/-230)
debian/docs (+1/-0)
debian/menu_dir/seamonkey-addressbook.desktop (+0/-10)
debian/menu_dir/seamonkey-chatzilla.desktop (+0/-9)
debian/menu_dir/seamonkey-composer.desktop (+0/-10)
debian/menu_dir/seamonkey-mail-compose.desktop (+0/-12)
debian/menu_dir/seamonkey-mailnews.desktop (+0/-8)
debian/menu_dir/seamonkey-navigator.desktop (+0/-9)
debian/menu_dir/seamonkey.desktop (+0/-8)
debian/messagingmenu/build.sh (+128/-0)
debian/messagingmenu/chrome.manifest (+67/-0)
debian/messagingmenu/config_build.sh (+12/-0)
debian/messagingmenu/content/prefOverlay.xul (+51/-0)
debian/messagingmenu/content/prefs.js (+104/-0)
debian/messagingmenu/content/thunderbirdMenu.js (+42/-0)
debian/messagingmenu/content/thunderbirdOverlay.xul (+41/-0)
debian/messagingmenu/defaults/preferences/messagingmenu.js (+2/-0)
debian/messagingmenu/install.rdf (+25/-0)
debian/messagingmenu/locale/af/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ar/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ast/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/be/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/bg/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/bn/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/br/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/bs/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ca/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/cs/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/cy/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/da/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/de/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/el/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/en-GB/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/en-US/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/eo/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/es/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/et/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/eu/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/fi/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/fr/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/gd/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/gl/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/he/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/hi-IN/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/hr/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/hu/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/hy-AM/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/id/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/is/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/it/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ja/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/kk/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/kn/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ko/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ku/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/lt/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/lv/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/mk/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ml/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/mr/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/nb-NO/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/nl/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/nn-NO/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/pl/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/pt-BR/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/pt/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ro/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ru/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/si/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/sk/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/sl/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/sq/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/sr/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/sv/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/ta/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/te/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/th/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/tr/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/uk/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/zh-CN/messagingmenu.properties (+4/-0)
debian/messagingmenu/locale/zh-TW/messagingmenu.properties (+4/-0)
debian/messagingmenu/modules/LibDbusmenu.jsm (+163/-0)
debian/messagingmenu/modules/LibGObject.jsm (+160/-0)
debian/messagingmenu/modules/LibGdkWindow.jsm (+153/-0)
debian/messagingmenu/modules/LibIndicate.jsm (+230/-0)
debian/messagingmenu/modules/LibUnity.jsm (+289/-0)
debian/messagingmenu/modules/MessagingMenu.jsm (+1133/-0)
debian/messagingmenu/tests/test-messaging-menu.js (+157/-0)
debian/mozclient/compare.mk (+0/-76)
debian/mozclient/seamonkey-remove.binonly.sh (+0/-11)
debian/mozclient/seamonkey.conf (+0/-28)
debian/mozclient/seamonkey.mk (+0/-38)
debian/patches/cleaner_dist_clean.patch (+0/-119)
debian/patches/fix_installer.patch (+0/-93)
debian/patches/lp688675_arm_it_instruction.patch (+0/-25)
debian/patches/no_dynamic_nss_softokn.patch (+0/-27)
debian/patches/seamonkey-fsh.patch (+0/-37)
debian/patches/series (+0/-5)
debian/remove.nonfree (+0/-195)
debian/rules (+511/-163)
debian/seamonkey-browser.docs (+0/-1)
debian/seamonkey-browser.install (+0/-158)
debian/seamonkey-browser.manpages (+0/-1)
debian/seamonkey-browser.menu (+0/-10)
debian/seamonkey-browser.mime (+0/-5)
debian/seamonkey-browser.postinst (+0/-38)
debian/seamonkey-browser.prerm (+0/-13)
debian/seamonkey-chatzilla.install (+0/-3)
debian/seamonkey-chatzilla.menu (+0/-3)
debian/seamonkey-dev.install.in (+10/-0)
debian/seamonkey-dev.links.in (+15/-0)
debian/seamonkey-dom-inspector.install (+0/-1)
debian/seamonkey-gnome-support.install (+0/-2)
debian/seamonkey-gnome-support.install.in (+4/-0)
debian/seamonkey-mailnews.install (+0/-30)
debian/seamonkey-mailnews.menu (+0/-10)
debian/seamonkey-mailnews.postinst.in (+0/-23)
debian/seamonkey-mailnews.prerm.in (+0/-23)
debian/seamonkey-mozsymbols.install.in (+3/-0)
debian/seamonkey-runner (+0/-370)
debian/seamonkey.cfg (+0/-2)
debian/seamonkey.desktop.in (+267/-0)
debian/seamonkey.dirs.in (+5/-0)
debian/seamonkey.install.in (+44/-0)
debian/seamonkey.links.in (+4/-0)
debian/seamonkey.lintian-overrides.in (+10/-0)
debian/seamonkey.manpages.in (+1/-0)
debian/seamonkey.sgml (+121/-0)
debian/seamonkey.sh.in (+113/-0)
debian/seamonkey.xml.in (+22/-0)
debian/seamonkeyrc (+0/-4)
debian/shlibs.local (+0/-4)
debian/syspref.js (+4/-0)
debian/vendor.js (+6/-0)
debian/watch (+0/-3)
To merge this branch: bzr merge lp:~joe-nationnet-deactivatedaccount/seamonkey/seamonkey-dev
Reviewer Review Type Date Requested Status
Micah Gersten (community) Approve
Review via email: mp+75007@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Hi, thanks for working on this, it's a great help :)

I've not looked at it in detail yet, but just a few initial comments:

1) globalmenu-extension development happens at lp:globalmenu-extension, and we copy this in to the Firefox and Thunderbird source packages. Any changes to that code should go there first, so that we don't have multiple different versions of the extension around. In general, we shouldn't make local changes to this code on any branches

2) In any case, is adding Seamonkey to the install.rdf sufficient to make it work? Firefox and Thunderbird both need application-specific workarounds, and I'd be surprised if Seamonkey doesn't too (eg, do the bookmarks menus work correctly? Do the items in the Edit menu display the correct sensitivity? These are all broken in Firefox without the additional chrome overlay).

3) Adding globalmenu-extension at this stage would require a FFe (see https://wiki.ubuntu.com/FreezeExceptionProcess).

4) The same comments for the eds extension and messagingmenu extension (and development of those happens at lp:thunderbird-eds-extension and lp:messagingmenu-extension)

5) Also, we need approval from upstream to change the extensions that we ship by default (I think that's the case for seamonkey, anyway. But I'd rather take the cautious approach here).

6) We can drop the Apport blacklist file from Seamonkey for now (debian/apport/blacklist.in + the relevant bits in debian/rules). This is shipped in Firefox and Thunderbird because we use the upstream crash reporter. We don't do that for Seamonkey at the moment. That also means that we should ensure all Seamonkey builds build with --disable-crashreporter for now.

7) We probably don't need debian/apport/native-origins.in (in any case, those PPA's don't exist at the moment). We ship this file in Firefox to enable PPA users to report bugs with Apport.

I've not had a chance to look at anything else just yet, but I will add comments when I do.

For now, it's probably best to drop the 3 extensions, but I'd be more than happy to accept patches on lp:globalmenu-extension and lp:messagingmenu-extension to add Seamonkey support. I think we should work on those separately though. Mike Conley is the maintainer of the EDS contacts integration extension btw, so he'd probably be more familiar with what is necessary to make that work properly in Seamonkey.

Revision history for this message
Joe Lesko (joe-nationnet-deactivatedaccount) wrote :
Download full text (3.5 KiB)

Thanks for the feedback Chris. I have updated build files to reflect
your feedback.

I removed references to globalmenu, eds, and apport. I was glad you
suggested it as it was a little difficult to maintain as I didn't know
what they were supposed to do in Seamonkey.

I removed the debug packages as well since they were taking up so much
space in my ppa and I don't know that they are needed at this time.

The current rev on my branch ( 249 ) has been used to build the packages
for lucid, maverick, natty, and oneiric. I have installed them on all by
oneiric, but other people have. A few people have been helping me put
the suite through it's paces.

3 Items I think need to be fixed and I could use some help with are:

1) In natty, you cannot select Seamonkey as a Preferred Application for
Browsing or email.
2) I'm not sure how you clean up some of the packages from the previous
release. i.e. seamonkey-chatzilla, seamonkey-mailnews, seamonkey-browser.
3) How to get the l10n packages bundled.

Otherwise, the packages install without issues and they seem to function
properly.

Any help or pointers would be greatly appreciated.

Chris Coulson wrote:
> Hi, thanks for working on this, it's a great help :)
>
> I've not looked at it in detail yet, but just a few initial comments:
>
> 1) globalmenu-extension development happens at lp:globalmenu-extension, and we copy this in to the Firefox and Thunderbird source packages. Any changes to that code should go there first, so that we don't have multiple different versions of the extension around. In general, we shouldn't make local changes to this code on any branches
>
> 2) In any case, is adding Seamonkey to the install.rdf sufficient to make it work? Firefox and Thunderbird both need application-specific workarounds, and I'd be surprised if Seamonkey doesn't too (eg, do the bookmarks menus work correctly? Do the items in the Edit menu display the correct sensitivity? These are all broken in Firefox without the additional chrome overlay).
>
> 3) Adding globalmenu-extension at this stage would require a FFe (see https://wiki.ubuntu.com/FreezeExceptionProcess).
>
> 4) The same comments for the eds extension and messagingmenu extension (and development of those happens at lp:thunderbird-eds-extension and lp:messagingmenu-extension)
>
> 5) Also, we need approval from upstream to change the extensions that we ship by default (I think that's the case for seamonkey, anyway. But I'd rather take the cautious approach here).
>
> 6) We can drop the Apport blacklist file from Seamonkey for now (debian/apport/blacklist.in + the relevant bits in debian/rules). This is shipped in Firefox and Thunderbird because we use the upstream crash reporter. We don't do that for Seamonkey at the moment. That also means that we should ensure all Seamonkey builds build with --disable-crashreporter for now.
>
> 7) We probably don't need debian/apport/native-origins.in (in any case, those PPA's don't exist at the moment). We ship this file in Firefox to enable PPA users to report bugs with Apport.
>
> I've not had a chance to look at anything else just yet, but I will add comments when I do.
>
> For now, it's probably best to...

Read more...

247. By Joe Lesko

* New upstream release v2.4.1 (SEAMONKEY_2_4_1_RELEASE)
* Fixed seamonkey-gnome-support
* Not building debug package.
* New debian build environment for Seamonkey.
* Worked on fix that will allow Seamonkey to compile on lucid
  because of the old yasm and turbo jpeg library.
* Changed MOZ_BUILD_UNOFFICIAL to 0 so the Seamonkey name
  would show up in seamonkey.desktop.
* Commented out the patches in the series.

248. By Micah Gersten

* Clean up changelog and add bug numbers
(LP: #832791, #723830)

249. By Micah Gersten

* Add patches from Thunderbird to prevent FTBFS on armel/powerpc
  - add debian/patches/build-fix-for-no-ENABLE_YARR_JIT.patch
  - add debian/patches/compile-pldhash-as-C++.patch
  - add debian/patches/only-add-ENABLE_JIT-to-CXXFLAGS-if-jit-is-enabled.patch
  - add debian/patches/printf-fix.patch
  - update debian/patches/series

250. By Micah Gersten

* Add another note to the changelog

251. By Micah Gersten

* Add Conflicts on old Seamonkey packages so they are removed from the system
  - update debian/control{,in}

252. By Micah Gersten

* Add Vcs-Bzr
  - update debian/control{,in}
* Fix Vcs-Bzr location
  - update debian/control{,in}

253. By Micah Gersten

* Drop duplicate section in seamonkey binary package (already stated in source)

254. By Micah Gersten

* Only some of the lintian errors are addressed, update changelog

255. By Micah Gersten

* Add Homepage to control file
  - update debian/control{,in}

256. By Micah Gersten

releasing version 2.4.1-0ubuntu1

Revision history for this message
Micah Gersten (micahg) wrote :

* Normally we want to document every change to the debian/ dir. Due to the time constraints, I'm just listing this as revising the build system based on thunderbird. Each of these changes should be 1 bzr commit.
* I added Conflicts to remove the old Seamonkey packages from the system (you already had the replaces)
* I pulled in 4 patches from the Thunderbird branch to prevent build failures on other architectures (hopefully)
* I removed the messagingmenu directory as we're not using it yet

I merged this in and added some fixes on top of it while leaving your name for the changelog entry, thanks for your work on this and I look forward to more merges :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/MPL'
2--- debian/MPL 1970-01-01 00:00:00 +0000
3+++ debian/MPL 2011-09-30 12:49:23 +0000
4@@ -0,0 +1,567 @@
5+ MOZILLA PUBLIC LICENSE
6+ Version 1.1
7+
8+ ---------------
9+
10+1. Definitions.
11+
12+ 1.0.1. "Commercial Use" means distribution or otherwise making the
13+ Covered Code available to a third party.
14+
15+ 1.1. "Contributor" means each entity that creates or contributes to
16+ the creation of Modifications.
17+
18+ 1.2. "Contributor Version" means the combination of the Original
19+ Code, prior Modifications used by a Contributor, and the Modifications
20+ made by that particular Contributor.
21+
22+ 1.3. "Covered Code" means the Original Code or Modifications or the
23+ combination of the Original Code and Modifications, in each case
24+ including portions thereof.
25+
26+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
27+ accepted in the software development community for the electronic
28+ transfer of data.
29+
30+ 1.5. "Executable" means Covered Code in any form other than Source
31+ Code.
32+
33+ 1.6. "Initial Developer" means the individual or entity identified
34+ as the Initial Developer in the Source Code notice required by Exhibit
35+ A.
36+
37+ 1.7. "Larger Work" means a work which combines Covered Code or
38+ portions thereof with code not governed by the terms of this License.
39+
40+ 1.8. "License" means this document.
41+
42+ 1.8.1. "Licensable" means having the right to grant, to the maximum
43+ extent possible, whether at the time of the initial grant or
44+ subsequently acquired, any and all of the rights conveyed herein.
45+
46+ 1.9. "Modifications" means any addition to or deletion from the
47+ substance or structure of either the Original Code or any previous
48+ Modifications. When Covered Code is released as a series of files, a
49+ Modification is:
50+ A. Any addition to or deletion from the contents of a file
51+ containing Original Code or previous Modifications.
52+
53+ B. Any new file that contains any part of the Original Code or
54+ previous Modifications.
55+
56+ 1.10. "Original Code" means Source Code of computer software code
57+ which is described in the Source Code notice required by Exhibit A as
58+ Original Code, and which, at the time of its release under this
59+ License is not already Covered Code governed by this License.
60+
61+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
62+ hereafter acquired, including without limitation, method, process,
63+ and apparatus claims, in any patent Licensable by grantor.
64+
65+ 1.11. "Source Code" means the preferred form of the Covered Code for
66+ making modifications to it, including all modules it contains, plus
67+ any associated interface definition files, scripts used to control
68+ compilation and installation of an Executable, or source code
69+ differential comparisons against either the Original Code or another
70+ well known, available Covered Code of the Contributor's choice. The
71+ Source Code can be in a compressed or archival form, provided the
72+ appropriate decompression or de-archiving software is widely available
73+ for no charge.
74+
75+ 1.12. "You" (or "Your") means an individual or a legal entity
76+ exercising rights under, and complying with all of the terms of, this
77+ License or a future version of this License issued under Section 6.1.
78+ For legal entities, "You" includes any entity which controls, is
79+ controlled by, or is under common control with You. For purposes of
80+ this definition, "control" means (a) the power, direct or indirect,
81+ to cause the direction or management of such entity, whether by
82+ contract or otherwise, or (b) ownership of more than fifty percent
83+ (50%) of the outstanding shares or beneficial ownership of such
84+ entity.
85+
86+2. Source Code License.
87+
88+ 2.1. The Initial Developer Grant.
89+ The Initial Developer hereby grants You a world-wide, royalty-free,
90+ non-exclusive license, subject to third party intellectual property
91+ claims:
92+ (a) under intellectual property rights (other than patent or
93+ trademark) Licensable by Initial Developer to use, reproduce,
94+ modify, display, perform, sublicense and distribute the Original
95+ Code (or portions thereof) with or without Modifications, and/or
96+ as part of a Larger Work; and
97+
98+ (b) under Patents Claims infringed by the making, using or
99+ selling of Original Code, to make, have made, use, practice,
100+ sell, and offer for sale, and/or otherwise dispose of the
101+ Original Code (or portions thereof).
102+
103+ (c) the licenses granted in this Section 2.1(a) and (b) are
104+ effective on the date Initial Developer first distributes
105+ Original Code under the terms of this License.
106+
107+ (d) Notwithstanding Section 2.1(b) above, no patent license is
108+ granted: 1) for code that You delete from the Original Code; 2)
109+ separate from the Original Code; or 3) for infringements caused
110+ by: i) the modification of the Original Code or ii) the
111+ combination of the Original Code with other software or devices.
112+
113+ 2.2. Contributor Grant.
114+ Subject to third party intellectual property claims, each Contributor
115+ hereby grants You a world-wide, royalty-free, non-exclusive license
116+
117+ (a) under intellectual property rights (other than patent or
118+ trademark) Licensable by Contributor, to use, reproduce, modify,
119+ display, perform, sublicense and distribute the Modifications
120+ created by such Contributor (or portions thereof) either on an
121+ unmodified basis, with other Modifications, as Covered Code
122+ and/or as part of a Larger Work; and
123+
124+ (b) under Patent Claims infringed by the making, using, or
125+ selling of Modifications made by that Contributor either alone
126+ and/or in combination with its Contributor Version (or portions
127+ of such combination), to make, use, sell, offer for sale, have
128+ made, and/or otherwise dispose of: 1) Modifications made by that
129+ Contributor (or portions thereof); and 2) the combination of
130+ Modifications made by that Contributor with its Contributor
131+ Version (or portions of such combination).
132+
133+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
134+ effective on the date Contributor first makes Commercial Use of
135+ the Covered Code.
136+
137+ (d) Notwithstanding Section 2.2(b) above, no patent license is
138+ granted: 1) for any code that Contributor has deleted from the
139+ Contributor Version; 2) separate from the Contributor Version;
140+ 3) for infringements caused by: i) third party modifications of
141+ Contributor Version or ii) the combination of Modifications made
142+ by that Contributor with other software (except as part of the
143+ Contributor Version) or other devices; or 4) under Patent Claims
144+ infringed by Covered Code in the absence of Modifications made by
145+ that Contributor.
146+
147+3. Distribution Obligations.
148+
149+ 3.1. Application of License.
150+ The Modifications which You create or to which You contribute are
151+ governed by the terms of this License, including without limitation
152+ Section 2.2. The Source Code version of Covered Code may be
153+ distributed only under the terms of this License or a future version
154+ of this License released under Section 6.1, and You must include a
155+ copy of this License with every copy of the Source Code You
156+ distribute. You may not offer or impose any terms on any Source Code
157+ version that alters or restricts the applicable version of this
158+ License or the recipients' rights hereunder. However, You may include
159+ an additional document offering the additional rights described in
160+ Section 3.5.
161+
162+ 3.2. Availability of Source Code.
163+ Any Modification which You create or to which You contribute must be
164+ made available in Source Code form under the terms of this License
165+ either on the same media as an Executable version or via an accepted
166+ Electronic Distribution Mechanism to anyone to whom you made an
167+ Executable version available; and if made available via Electronic
168+ Distribution Mechanism, must remain available for at least twelve (12)
169+ months after the date it initially became available, or at least six
170+ (6) months after a subsequent version of that particular Modification
171+ has been made available to such recipients. You are responsible for
172+ ensuring that the Source Code version remains available even if the
173+ Electronic Distribution Mechanism is maintained by a third party.
174+
175+ 3.3. Description of Modifications.
176+ You must cause all Covered Code to which You contribute to contain a
177+ file documenting the changes You made to create that Covered Code and
178+ the date of any change. You must include a prominent statement that
179+ the Modification is derived, directly or indirectly, from Original
180+ Code provided by the Initial Developer and including the name of the
181+ Initial Developer in (a) the Source Code, and (b) in any notice in an
182+ Executable version or related documentation in which You describe the
183+ origin or ownership of the Covered Code.
184+
185+ 3.4. Intellectual Property Matters
186+ (a) Third Party Claims.
187+ If Contributor has knowledge that a license under a third party's
188+ intellectual property rights is required to exercise the rights
189+ granted by such Contributor under Sections 2.1 or 2.2,
190+ Contributor must include a text file with the Source Code
191+ distribution titled "LEGAL" which describes the claim and the
192+ party making the claim in sufficient detail that a recipient will
193+ know whom to contact. If Contributor obtains such knowledge after
194+ the Modification is made available as described in Section 3.2,
195+ Contributor shall promptly modify the LEGAL file in all copies
196+ Contributor makes available thereafter and shall take other steps
197+ (such as notifying appropriate mailing lists or newsgroups)
198+ reasonably calculated to inform those who received the Covered
199+ Code that new knowledge has been obtained.
200+
201+ (b) Contributor APIs.
202+ If Contributor's Modifications include an application programming
203+ interface and Contributor has knowledge of patent licenses which
204+ are reasonably necessary to implement that API, Contributor must
205+ also include this information in the LEGAL file.
206+
207+ (c) Representations.
208+ Contributor represents that, except as disclosed pursuant to
209+ Section 3.4(a) above, Contributor believes that Contributor's
210+ Modifications are Contributor's original creation(s) and/or
211+ Contributor has sufficient rights to grant the rights conveyed by
212+ this License.
213+
214+ 3.5. Required Notices.
215+ You must duplicate the notice in Exhibit A in each file of the Source
216+ Code. If it is not possible to put such notice in a particular Source
217+ Code file due to its structure, then You must include such notice in a
218+ location (such as a relevant directory) where a user would be likely
219+ to look for such a notice. If You created one or more Modification(s)
220+ You may add your name as a Contributor to the notice described in
221+ Exhibit A. You must also duplicate this License in any documentation
222+ for the Source Code where You describe recipients' rights or ownership
223+ rights relating to Covered Code. You may choose to offer, and to
224+ charge a fee for, warranty, support, indemnity or liability
225+ obligations to one or more recipients of Covered Code. However, You
226+ may do so only on Your own behalf, and not on behalf of the Initial
227+ Developer or any Contributor. You must make it absolutely clear than
228+ any such warranty, support, indemnity or liability obligation is
229+ offered by You alone, and You hereby agree to indemnify the Initial
230+ Developer and every Contributor for any liability incurred by the
231+ Initial Developer or such Contributor as a result of warranty,
232+ support, indemnity or liability terms You offer.
233+
234+ 3.6. Distribution of Executable Versions.
235+ You may distribute Covered Code in Executable form only if the
236+ requirements of Section 3.1-3.5 have been met for that Covered Code,
237+ and if You include a notice stating that the Source Code version of
238+ the Covered Code is available under the terms of this License,
239+ including a description of how and where You have fulfilled the
240+ obligations of Section 3.2. The notice must be conspicuously included
241+ in any notice in an Executable version, related documentation or
242+ collateral in which You describe recipients' rights relating to the
243+ Covered Code. You may distribute the Executable version of Covered
244+ Code or ownership rights under a license of Your choice, which may
245+ contain terms different from this License, provided that You are in
246+ compliance with the terms of this License and that the license for the
247+ Executable version does not attempt to limit or alter the recipient's
248+ rights in the Source Code version from the rights set forth in this
249+ License. If You distribute the Executable version under a different
250+ license You must make it absolutely clear that any terms which differ
251+ from this License are offered by You alone, not by the Initial
252+ Developer or any Contributor. You hereby agree to indemnify the
253+ Initial Developer and every Contributor for any liability incurred by
254+ the Initial Developer or such Contributor as a result of any such
255+ terms You offer.
256+
257+ 3.7. Larger Works.
258+ You may create a Larger Work by combining Covered Code with other code
259+ not governed by the terms of this License and distribute the Larger
260+ Work as a single product. In such a case, You must make sure the
261+ requirements of this License are fulfilled for the Covered Code.
262+
263+4. Inability to Comply Due to Statute or Regulation.
264+
265+ If it is impossible for You to comply with any of the terms of this
266+ License with respect to some or all of the Covered Code due to
267+ statute, judicial order, or regulation then You must: (a) comply with
268+ the terms of this License to the maximum extent possible; and (b)
269+ describe the limitations and the code they affect. Such description
270+ must be included in the LEGAL file described in Section 3.4 and must
271+ be included with all distributions of the Source Code. Except to the
272+ extent prohibited by statute or regulation, such description must be
273+ sufficiently detailed for a recipient of ordinary skill to be able to
274+ understand it.
275+
276+5. Application of this License.
277+
278+ This License applies to code to which the Initial Developer has
279+ attached the notice in Exhibit A and to related Covered Code.
280+
281+6. Versions of the License.
282+
283+ 6.1. New Versions.
284+ Netscape Communications Corporation ("Netscape") may publish revised
285+ and/or new versions of the License from time to time. Each version
286+ will be given a distinguishing version number.
287+
288+ 6.2. Effect of New Versions.
289+ Once Covered Code has been published under a particular version of the
290+ License, You may always continue to use it under the terms of that
291+ version. You may also choose to use such Covered Code under the terms
292+ of any subsequent version of the License published by Netscape. No one
293+ other than Netscape has the right to modify the terms applicable to
294+ Covered Code created under this License.
295+
296+ 6.3. Derivative Works.
297+ If You create or use a modified version of this License (which you may
298+ only do in order to apply it to code which is not already Covered Code
299+ governed by this License), You must (a) rename Your license so that
300+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
301+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
302+ license (except to note that your license differs from this License)
303+ and (b) otherwise make it clear that Your version of the license
304+ contains terms which differ from the Mozilla Public License and
305+ Netscape Public License. (Filling in the name of the Initial
306+ Developer, Original Code or Contributor in the notice described in
307+ Exhibit A shall not of themselves be deemed to be modifications of
308+ this License.)
309+
310+7. DISCLAIMER OF WARRANTY.
311+
312+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
313+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
314+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
315+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
316+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
317+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
318+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
319+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
320+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
321+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
322+
323+8. TERMINATION.
324+
325+ 8.1. This License and the rights granted hereunder will terminate
326+ automatically if You fail to comply with terms herein and fail to cure
327+ such breach within 30 days of becoming aware of the breach. All
328+ sublicenses to the Covered Code which are properly granted shall
329+ survive any termination of this License. Provisions which, by their
330+ nature, must remain in effect beyond the termination of this License
331+ shall survive.
332+
333+ 8.2. If You initiate litigation by asserting a patent infringement
334+ claim (excluding declatory judgment actions) against Initial Developer
335+ or a Contributor (the Initial Developer or Contributor against whom
336+ You file such action is referred to as "Participant") alleging that:
337+
338+ (a) such Participant's Contributor Version directly or indirectly
339+ infringes any patent, then any and all rights granted by such
340+ Participant to You under Sections 2.1 and/or 2.2 of this License
341+ shall, upon 60 days notice from Participant terminate prospectively,
342+ unless if within 60 days after receipt of notice You either: (i)
343+ agree in writing to pay Participant a mutually agreeable reasonable
344+ royalty for Your past and future use of Modifications made by such
345+ Participant, or (ii) withdraw Your litigation claim with respect to
346+ the Contributor Version against such Participant. If within 60 days
347+ of notice, a reasonable royalty and payment arrangement are not
348+ mutually agreed upon in writing by the parties or the litigation claim
349+ is not withdrawn, the rights granted by Participant to You under
350+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
351+ the 60 day notice period specified above.
352+
353+ (b) any software, hardware, or device, other than such Participant's
354+ Contributor Version, directly or indirectly infringes any patent, then
355+ any rights granted to You by such Participant under Sections 2.1(b)
356+ and 2.2(b) are revoked effective as of the date You first made, used,
357+ sold, distributed, or had made, Modifications made by that
358+ Participant.
359+
360+ 8.3. If You assert a patent infringement claim against Participant
361+ alleging that such Participant's Contributor Version directly or
362+ indirectly infringes any patent where such claim is resolved (such as
363+ by license or settlement) prior to the initiation of patent
364+ infringement litigation, then the reasonable value of the licenses
365+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
366+ into account in determining the amount or value of any payment or
367+ license.
368+
369+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
370+ all end user license agreements (excluding distributors and resellers)
371+ which have been validly granted by You or any distributor hereunder
372+ prior to termination shall survive termination.
373+
374+9. LIMITATION OF LIABILITY.
375+
376+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
377+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
378+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
379+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
380+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
381+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
382+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
383+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
384+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
385+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
386+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
387+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
388+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
389+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
390+
391+10. U.S. GOVERNMENT END USERS.
392+
393+ The Covered Code is a "commercial item," as that term is defined in
394+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
395+ software" and "commercial computer software documentation," as such
396+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
397+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
398+ all U.S. Government End Users acquire Covered Code with only those
399+ rights set forth herein.
400+
401+11. MISCELLANEOUS.
402+
403+ This License represents the complete agreement concerning subject
404+ matter hereof. If any provision of this License is held to be
405+ unenforceable, such provision shall be reformed only to the extent
406+ necessary to make it enforceable. This License shall be governed by
407+ California law provisions (except to the extent applicable law, if
408+ any, provides otherwise), excluding its conflict-of-law provisions.
409+ With respect to disputes in which at least one party is a citizen of,
410+ or an entity chartered or registered to do business in the United
411+ States of America, any litigation relating to this License shall be
412+ subject to the jurisdiction of the Federal Courts of the Northern
413+ District of California, with venue lying in Santa Clara County,
414+ California, with the losing party responsible for costs, including
415+ without limitation, court costs and reasonable attorneys' fees and
416+ expenses. The application of the United Nations Convention on
417+ Contracts for the International Sale of Goods is expressly excluded.
418+ Any law or regulation which provides that the language of a contract
419+ shall be construed against the drafter shall not apply to this
420+ License.
421+
422+12. RESPONSIBILITY FOR CLAIMS.
423+
424+ As between Initial Developer and the Contributors, each party is
425+ responsible for claims and damages arising, directly or indirectly,
426+ out of its utilization of rights under this License and You agree to
427+ work with Initial Developer and Contributors to distribute such
428+ responsibility on an equitable basis. Nothing herein is intended or
429+ shall be deemed to constitute any admission of liability.
430+
431+13. MULTIPLE-LICENSED CODE.
432+
433+ Initial Developer may designate portions of the Covered Code as
434+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
435+ Developer permits you to utilize portions of the Covered Code under
436+ Your choice of the NPL or the alternative licenses, if any, specified
437+ by the Initial Developer in the file described in Exhibit A.
438+
439+EXHIBIT A -Mozilla Public License.
440+
441+ ``The contents of this file are subject to the Mozilla Public License
442+ Version 1.1 (the "License"); you may not use this file except in
443+ compliance with the License. You may obtain a copy of the License at
444+ http://www.mozilla.org/MPL/
445+
446+ Software distributed under the License is distributed on an "AS IS"
447+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
448+ License for the specific language governing rights and limitations
449+ under the License.
450+
451+ The Original Code is ______________________________________.
452+
453+ The Initial Developer of the Original Code is ________________________.
454+ Portions created by ______________________ are Copyright (C) ______
455+ _______________________. All Rights Reserved.
456+
457+ Contributor(s): ______________________________________.
458+
459+ Alternatively, the contents of this file may be used under the terms
460+ of the _____ license (the "[___] License"), in which case the
461+ provisions of [______] License are applicable instead of those
462+ above. If you wish to allow use of your version of this file only
463+ under the terms of the [____] License and not to allow others to use
464+ your version of this file under the MPL, indicate your decision by
465+ deleting the provisions above and replace them with the notice and
466+ other provisions required by the [___] License. If you do not delete
467+ the provisions above, a recipient may use your version of this file
468+ under either the MPL or the [___] License."
469+
470+ [NOTE: The text of this Exhibit A may differ slightly from the text of
471+ the notices in the Source Code files of the Original Code. You should
472+ use the text of this Exhibit A rather than the text found in the
473+ Original Code Source Code for Your Modifications.]
474+
475+ ----------------------------------------------------------------------
476+
477+ AMENDMENTS
478+
479+ The Netscape Public License Version 1.1 ("NPL") consists of the
480+ Mozilla Public License Version 1.1 with the following Amendments,
481+ including Exhibit A-Netscape Public License. Files identified with
482+ "Exhibit A-Netscape Public License" are governed by the Netscape
483+ Public License Version 1.1.
484+
485+ Additional Terms applicable to the Netscape Public License.
486+ I. Effect.
487+ These additional terms described in this Netscape Public
488+ License -- Amendments shall apply to the Mozilla Communicator
489+ client code and to all Covered Code under this License.
490+
491+ II. "Netscape's Branded Code" means Covered Code that Netscape
492+ distributes and/or permits others to distribute under one or more
493+ trademark(s) which are controlled by Netscape but which are not
494+ licensed for use under this License.
495+
496+ III. Netscape and logo.
497+ This License does not grant any rights to use the trademarks
498+ "Netscape", the "Netscape N and horizon" logo or the "Netscape
499+ lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
500+ "Smart Browsing" even if such marks are included in the Original
501+ Code or Modifications.
502+
503+ IV. Inability to Comply Due to Contractual Obligation.
504+ Prior to licensing the Original Code under this License, Netscape
505+ has licensed third party code for use in Netscape's Branded Code.
506+ To the extent that Netscape is limited contractually from making
507+ such third party code available under this License, Netscape may
508+ choose to reintegrate such code into Covered Code without being
509+ required to distribute such code in Source Code form, even if
510+ such code would otherwise be considered "Modifications" under
511+ this License.
512+
513+ V. Use of Modifications and Covered Code by Initial Developer.
514+ V.1. In General.
515+ The obligations of Section 3 apply to Netscape, except to
516+ the extent specified in this Amendment, Section V.2 and V.3.
517+
518+ V.2. Other Products.
519+ Netscape may include Covered Code in products other than the
520+ Netscape's Branded Code which are released by Netscape
521+ during the two (2) years following the release date of the
522+ Original Code, without such additional products becoming
523+ subject to the terms of this License, and may license such
524+ additional products on different terms from those contained
525+ in this License.
526+
527+ V.3. Alternative Licensing.
528+ Netscape may license the Source Code of Netscape's Branded
529+ Code, including Modifications incorporated therein, without
530+ such Netscape Branded Code becoming subject to the terms of
531+ this License, and may license such Netscape Branded Code on
532+ different terms from those contained in this License.
533+
534+ VI. Litigation.
535+ Notwithstanding the limitations of Section 11 above, the
536+ provisions regarding litigation in Section 11(a), (b) and (c) of
537+ the License shall apply to all disputes relating to this License.
538+
539+ EXHIBIT A-Netscape Public License.
540+
541+ "The contents of this file are subject to the Netscape Public
542+ License Version 1.1 (the "License"); you may not use this file
543+ except in compliance with the License. You may obtain a copy of
544+ the License at http://www.mozilla.org/NPL/
545+
546+ Software distributed under the License is distributed on an "AS
547+ IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
548+ implied. See the License for the specific language governing
549+ rights and limitations under the License.
550+
551+ The Original Code is Mozilla Communicator client code, released
552+ March 31, 1998.
553+
554+ The Initial Developer of the Original Code is Netscape
555+ Communications Corporation. Portions created by Netscape are
556+ Copyright (C) 1998-1999 Netscape Communications Corporation. All
557+ Rights Reserved.
558+
559+ Contributor(s): ______________________________________.
560+
561+ Alternatively, the contents of this file may be used under the
562+ terms of the _____ license (the "[___] License"), in which case
563+ the provisions of [______] License are applicable instead of
564+ those above. If you wish to allow use of your version of this
565+ file only under the terms of the [____] License and not to allow
566+ others to use your version of this file under the NPL, indicate
567+ your decision by deleting the provisions above and replace them
568+ with the notice and other provisions required by the [___]
569+ License. If you do not delete the provisions above, a recipient
570+ may use your version of this file under either the NPL or the
571+ [___] License."
572
573=== removed file 'debian/README.Debian'
574--- debian/README.Debian 2007-10-27 17:27:15 +0000
575+++ debian/README.Debian 1970-01-01 00:00:00 +0000
576@@ -1,70 +0,0 @@
577-Seamonkey for Ubuntu
578-====================
579-
580-Application Update
581-------------------
582-
583-From version 1.0.7 onwards, the automatic application update has been
584-disabled through the update_notifications.enabled preference, which is
585-locked to 'false' by /usr/lib/seamonkey/greprefs/seamonkey.cfg.
586-
587-Sound
588------
589-
590-By default, seamonkey detects and runs the correct dsp wrapper for esd,
591-arts, or alsa. If this is not the desired behaviour, edit
592-/etc/seamonkey/seamonkeyrc or ~/.mozilla/seamonkeyrc and set the SEAMONKEY_DSP
593-variable to:
594-
595-"auto": The default, auto-detection.
596-
597-"esddsp": Use esd.
598-
599-"artsdsp": Use arts.
600-
601-"aoss": Use alsa.
602-
603-"none": Don't use any sound wrapper.
604-
605-using Java. (You should use plugin which compiled with gcc-3.2 or newer)
606-----------
607-
608-You can install one of the following packages:
609- - gcjwebplugin,
610- - java-gcj-compat-plugin,
611- - sun-java5-plugin.
612-
613-Alternatively, you can grab a binary Java distribution from
614-http://java.sun.com/, install the java-package package and do a make-jpkg
615-on the file.
616-
617-Buttons
618--------
619-
620-Some people have complained that the button order in dialogs is
621-non-intuitive (ie, they don't like it). To reverse the order, add the
622-following to your chrome/userChrome.css file, under the
623-~/.mozilla/ directory:
624-
625-.dialog-button-box { -moz-box-direction: reverse; -moz-box-pack: right; }
626-.dialog-button-box spacer { display: none ! important; }
627-
628-Emacs keybindings
629------------------
630-
631-Versions of Firefox before 1.0 supported Emacs style keybindings in
632-text entry boxes. Version 1.0 now merely follows the GTK keybindings
633-settings. To enable Emacs keybindings in GTK, follow the instructions
634-at http://kb.mozillazine.org/Emacs_Keybindings_(Firefox).
635-
636-Pango
637------
638-
639-Pango support is enabled by default. This is not the default for Mozilla.org
640-builds, so may have more problems, but it is the default because it supports
641-more languages out of the box. If you experience problems, you can disable
642-it by hand by setting MOZ_DISABLE_PANGO=1 either in /etc/seamonkey/seamonkeyrc,
643-${HOME}/.mozilla/seamonkeyrc or as an exported environment variable.
644-
645- -- Mike Hommey <glandium@debian.org> Sun, 31 Dec 2006 16:26:48 +0100
646- Updated by Fabien Tassin <fta@sofaraway.org> for SeamMonkey & Ubuntu
647
648=== removed file 'debian/README.source'
649--- debian/README.source 2010-07-14 12:31:13 +0000
650+++ debian/README.source 1970-01-01 00:00:00 +0000
651@@ -1,27 +0,0 @@
652-1) To create the fully patched source, just run "debian/rules apply-patches" in the source directory. The fully patched source will be available in build-tree/mozilla
653-
654-2) This package uses the quilt patch system. To create or edit patches which are applied at build time, you must first extract the source tarball. To do this, run "debian/rules pre-build". cd in to build-tree/mozilla and use quilt in the usual fashion (see "man quilt").
655-
656-Your life will be much easier if you add the following to ~/.quiltrc:
657-
658-for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
659- if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
660- export QUILT_PATCHES=${where}debian/patches
661- fi
662-done
663-
664-So, basically:
665-
666- a) debian/rules pre-build
667- b) cd build-tree/mozilla
668- c) quilt push <patchname>
669- .....or.....
670- quilt push
671- .....or.....
672- quilt push -a
673- .....or.....
674- quilt new
675-
676-You get the idea.....
677-
678-3) To remove any changes applied to the packaging, run "fakeroot debian/rules clean". This will remove all patches and delete auto-generated files
679
680=== removed file 'debian/base.js'
681--- debian/base.js 2007-10-23 23:38:02 +0000
682+++ debian/base.js 1970-01-01 00:00:00 +0000
683@@ -1,12 +0,0 @@
684-// This is the Debian specific preferences file for Seamonkey
685-// You can make any change in here, it is the purpose of this file.
686-// You can, with this file and all files present in the
687-// /etc/seamonkey/pref directory, override any preference that is
688-// present in /usr/lib/seamonkey/defaults/pref directory.
689-// While your changes will be kept on upgrade if you modify files in
690-// /etc/seamonkey/pref, please note that they won't be kept if you
691-// do them in /usr/lib/seamonkey/defaults/pref.
692-
693-// Use LANG environment variable to choose locale
694-pref("intl.locale.matchOS", true);
695-
696
697=== added directory 'debian/build'
698=== added file 'debian/build/create-tarball'
699--- debian/build/create-tarball 1970-01-01 00:00:00 +0000
700+++ debian/build/create-tarball 2011-09-30 12:49:23 +0000
701@@ -0,0 +1,434 @@
702+#!/usr/bin/python
703+
704+from optparse import OptionParser
705+import os
706+import os.path
707+import re
708+import shutil
709+import subprocess
710+import sys
711+import time
712+import urllib
713+import xml.dom.minidom
714+
715+ALL_LOCALES = 'suite/locales/all-locales'
716+SHIPPED_LOCALES = 'suite/locales/shipped-locales'
717+VERSION_FILE = 'suite/config/version.txt'
718+DEB_TAR_SRCDIR = 'mozilla'
719+NEED_POST_CHECKOUT = 1
720+
721+INCLUDE = [
722+ ''
723+]
724+
725+EXCLUDE = [
726+ 'l10n/*/browser',
727+ 'l10n/*/calendar',
728+ 'l10n/*/embedding',
729+ 'l10n/*/extensions',
730+ 'l10n/*/mobile',
731+ 'l10n/*/other-licenses/firefox',
732+ 'l10n/*/other-licenses/sunbird',
733+ 'l10n/*/services',
734+ 'l10n/*/suite',
735+ 'ldap/sdks/c-sdk/ldap/examples/macintosh',
736+ 'ldap/sdks/c-sdk/ldap/libraries/macintosh',
737+ 'mail/test/resources/mozmill/docs/_build/doctrees',
738+ 'mail/test/resources/virtualenv/virtualenv_support',
739+ 'mozilla/build/mobile/sutagent/android',
740+ 'mozilla/build/package/mac_osx/mozilla.dsstore',
741+ 'mozilla/config/*.exe',
742+ 'mozilla/config/*.pyc',
743+ 'mozilla/gfx/angle/samples/gles2_book',
744+ 'mozilla/intl/unicharutil/tools/data',
745+ 'mozilla/layout/doc/object_diagram_template.sda',
746+ 'mozilla/layout/doc/SpaceMgr_BlockReflSt_OD.sda',
747+ 'mozilla/netwerk/protocol/ftp/doc/rfc959.txt',
748+ 'mozilla/other-licenses/7zstub',
749+ 'mozilla/other-licenses/nsis',
750+ 'mozilla/security/nss/cmd/samples',
751+ 'mozilla/testing/extensions/community',
752+ 'mozilla/testing/mozmill/mozmill/docs/_build/doctrees',
753+ 'mozilla/testing/mozmill/virtualenv/virtualenv_support',
754+ 'mozilla/toolkit/crashreporter/client/macbuild/Contents/Resources/crashreporter.icns',
755+ 'mozilla/toolkit/crashreporter/client/macbuild/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib',
756+ 'mozilla/toolkit/crashreporter/client/macbuild/Contents/Resources/English.lproj/MainMenuRTL.nib/keyedobjects.nib',
757+ 'mozilla/toolkit/crashreporter/google-breakpad/src/client/mac',
758+ 'mozilla/toolkit/crashreporter/google-breakpad/src/tools/windows',
759+ 'mozilla/toolkit/crashreporter/tools/win32/*.exe',
760+ 'mozilla/toolkit/mozapps/update/test/unit/data/*.exe',
761+ 'mozilla/toolkit/mozapps/update/updater/macbuild/Contents/Resources/updater.icns',
762+ 'mozilla/toolkit/mozapps/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib',
763+ 'mozilla/widget/src/cocoa/resources/MainMenu.nib',
764+ 'mozilla/xpcom/tests/unit/data/presentation.key',
765+ 'mozilla/xpcom/tests/unit/data/SmallApp.app',
766+ 'other-licenses/7zstub',
767+ 'suite/app/apprunner-beos.rsrc'
768+]
769+
770+class DependencyNotFound(Exception):
771+ def __init__(self, depend):
772+ super(DependencyNotFound, self).__init__(depend)
773+ self.path = depend[0]
774+ self.package = depend[1]
775+
776+ def __str__(self):
777+ return 'Dependency not found: %s. Please install package %s' % (self.path, self.package)
778+
779+class MissingLocaleError(Exception):
780+ def __init__(self, locale):
781+ super(MissingLocaleError, self).__init__(locale)
782+ self.locale = locale
783+
784+ def __str__(self):
785+ return "Locale %s is missing from the source tarball" % self.locale
786+
787+class RevisionNotFound(Exception):
788+ def __init__(self, revision, repo):
789+ super(RevisionNotFound, self).__init__(revision, repo)
790+ self.revision = revision
791+ self.repo = repo
792+
793+ def __str__(self):
794+ return "Revision %s not found in %s" % (self.revision, self.repo)
795+
796+class InvalidTagError(Exception):
797+ def __init__(self, tag):
798+ super(InvalidTagError, self).__init__(tag)
799+ self.tag = tag
800+
801+ def __str__(self):
802+ return "Tag %s is invalid" % self.tag
803+
804+def do_exec(args, quiet=False, ignore_error=False, cwd=None):
805+ if quiet != True:
806+ arg_string = ''
807+ for arg in args:
808+ sep = ' ' if arg_string != '' else ''
809+ arg_string += '%s%s' % (sep, arg)
810+ print '\nRunning %s' % arg_string
811+
812+ p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cwd)
813+ out = ''
814+ while p.poll() == None:
815+ for line in p.stdout:
816+ out += line
817+ if quiet == False:
818+ print line.strip()
819+
820+ if p.returncode != 0 and ignore_error == False:
821+ raise subprocess.CalledProcessError(p.returncode, args[0])
822+
823+ return (p.returncode, out)
824+
825+def pack_orig_source(name, version, destdir):
826+ os.chdir('..')
827+ os.rename(name, '%s-%s' % (name, version))
828+ args = ['tar', '-zcf', os.path.join(destdir, '%s_%s.orig.tar.gz' % (name, version)), '%s-%s' % (name, version)]
829+
830+ do_exec(args)
831+
832+def pack_embedded_tar(version, name):
833+ args = ['tar', '-jvc', '--exclude-vcs']
834+ for exclude in EXCLUDE:
835+ args.append('--exclude')
836+ args.append(os.path.join(DEB_TAR_SRCDIR, exclude))
837+ args.append('-f')
838+ args.append('%s-%s-source.tar.bz2' % (name, version))
839+ for include in INCLUDE:
840+ args.append(os.path.join(DEB_TAR_SRCDIR, include))
841+
842+ do_exec(args)
843+
844+ # We need to manually clean up the files we packed now. We
845+ # can't pass --remove-files to tar, because it uses rmdir, which
846+ # fails because we exclude some files
847+ for include in INCLUDE:
848+ if os.path.exists(os.path.join(DEB_TAR_SRCDIR, include)):
849+ shutil.rmtree(os.path.join(DEB_TAR_SRCDIR, include))
850+
851+def determine_upstream_version(repo, tag):
852+ vf = open(os.path.join(os.getcwd(), DEB_TAR_SRCDIR, VERSION_FILE), 'r')
853+ upstream_version = re.sub(r'~$', '', re.sub(r'([0-9\.]*)(.*)', r'\1~\2', vf.read().strip()))
854+ vf.close()
855+
856+ if tag == None:
857+ (ret, out) = do_exec(['hg', 'tip'], cwd=os.path.join(os.getcwd(), DEB_TAR_SRCDIR), quiet=True)
858+ for line in out.split('\n'):
859+ if line.startswith('changeset:'):
860+ rev = line.split()[1].split(':')[0].strip()
861+ changeset = line.split()[1].split(':')[1].strip()
862+ break
863+
864+ u = urllib.urlopen('%s/pushlog?changeset=%s' % (repo, changeset))
865+ dom = xml.dom.minidom.parseString(u.read())
866+ t = time.strptime(dom.getElementsByTagName('updated')[0].firstChild.nodeValue.strip(), '%Y-%m-%dT%H:%M:%SZ')
867+ upstream_version += '~hg%s%s%sr%s' % ('%02d' % t.tm_year, '%02d' % t.tm_mon, '%02d' % t.tm_mday, rev)
868+ u.close()
869+
870+ if NEED_POST_CHECKOUT == 1:
871+ # Embed the moz revision in the version number too. Allows us to respin dailies for comm-central
872+ # even if the only changes landed in mozilla-central
873+ (ret, out) = do_exec(['hg', 'tip'], cwd=os.path.join(os.getcwd(), DEB_TAR_SRCDIR, 'mozilla'), quiet=True)
874+ for line in out.split('\n'):
875+ if line.startswith('changeset:'):
876+ upstream_version += '.%s' % line.split()[1].split(':')[0].strip()
877+ break
878+ else:
879+ parsed = False
880+ version_from_upstream = upstream_version
881+ upstream_version = ''
882+ build = None
883+ for comp in tag.split('_')[1:]:
884+ if parsed == True:
885+ raise InvalidTagError(tag)
886+
887+ if comp.startswith('BUILD'):
888+ build = re.sub(r'BUILD', '', comp)
889+ parsed = True
890+ elif comp.startswith('RELEASE'):
891+ parsed = True
892+ else:
893+ if upstream_version != '':
894+ upstream_version += '.'
895+ upstream_version += re.sub(r'~$', '', re.sub(r'([0-9]*)(.*)', r'\1~\2', comp))
896+
897+ if parsed == True and upstream_version == '':
898+ raise InvalidTagError(tag)
899+
900+ if upstream_version == '':
901+ raise InvalidTagError(tag)
902+
903+ if build != None:
904+ upstream_version += '+build%s' % build
905+
906+ if not upstream_version.startswith(version_from_upstream):
907+ raise InvalidTagError(tag)
908+
909+ print '\n\nUpstream version is %s\n' % upstream_version
910+ return upstream_version
911+
912+def ensure_cache(repo, cache):
913+ dest = os.path.join(cache, os.path.basename(repo))
914+ if os.path.isdir(dest):
915+ (ret, out) = do_exec(['hg', 'summary'], cwd=dest, quiet=True, ignore_error=True)
916+ if ret == 0:
917+ do_exec(['hg', 'pull', repo], cwd=dest)
918+ do_exec(['hg', 'update'], cwd=dest)
919+ return
920+
921+ if not os.path.isdir(cache):
922+ os.mkdir(cache)
923+
924+ do_exec(['hg', 'clone', repo, dest])
925+
926+def post_checkout(repo, cache, tag):
927+ moz_repo = os.path.join(os.path.dirname(repo), os.path.basename(repo).replace('comm', 'mozilla'))
928+ moz_local = None
929+ if cache != None:
930+ ensure_cache(moz_repo, cache)
931+ moz_local = os.path.join(cache, os.path.basename(moz_repo))
932+ args = ['python', 'client.py', 'checkout']
933+ if moz_local != None:
934+ args.append('--mozilla-repo=%s' % moz_local)
935+ if tag != None:
936+ args.append('--mozilla-rev=%s' % tag)
937+ do_exec(args, cwd=os.path.join(os.getcwd(), DEB_TAR_SRCDIR))
938+ args = ['hg', 'update', '-r', tag]
939+ do_exec(args, cwd=os.path.join(os.getcwd(), DEB_TAR_SRCDIR))
940+
941+def verify_all_locales(all_locales, blfile):
942+ # When we also use translations from Launchpad, there will be a file
943+ # containing the additional locales we want to ship (locales.extra??)
944+ print '\n\n***Checking that required locales are present***\n'
945+
946+ blacklist = {}
947+ bl = open(blfile, 'r')
948+ for line in bl:
949+ locale = line.strip()
950+ if locale.startswith('#'):
951+ continue
952+
953+ blacklist[locale] = 1
954+ bl.close()
955+
956+ sl = open(os.path.join(os.getcwd(), DEB_TAR_SRCDIR, SHIPPED_LOCALES), 'r')
957+ for line in sl:
958+ line = line.strip()
959+ if line.startswith('#'):
960+ continue
961+
962+ if line == 'en-US':
963+ print 'Ignoring en-US'
964+ continue
965+
966+ locale = line.split(' ')[0].strip()
967+ platforms = line.split(' ')[1:]
968+
969+ if blacklist.has_key(locale):
970+ print 'Ignoring blacklisted locale %s' % locale
971+ continue
972+
973+ if len(platforms) > 0:
974+ for_linux = False
975+ for platform in platforms:
976+ if platform == 'linux':
977+ for_linux = True
978+ break
979+ if not for_linux:
980+ print 'Ignoring %s (not for linux)' % locale
981+ continue
982+
983+ if not all_locales.has_key(locale):
984+ raise MissingLocaleError(locale)
985+
986+ print '%s - Yes' % locale
987+
988+ sl.close()
989+
990+def do_checkout(source, dest, tag):
991+ dest_parent = os.path.dirname(dest)
992+ if not os.path.isdir(dest_parent):
993+ os.makedirs(dest_parent)
994+
995+ do_exec(['hg', 'clone', source, dest])
996+
997+ try:
998+ args = ['hg', 'update']
999+ if tag != None:
1000+ args.append('-r')
1001+ args.append(tag)
1002+ do_exec(args, cwd=dest)
1003+ except:
1004+ if tag != None:
1005+ raise RevisionNotFound(tag, source)
1006+ raise
1007+
1008+def checkout_locale(base, cache, locale, tag, changesets):
1009+ local_source = None
1010+ remote_source = os.path.join(base, locale)
1011+ destdir = os.path.join(os.getcwd(), DEB_TAR_SRCDIR, 'l10n', locale)
1012+
1013+ if cache != None:
1014+ l10n_cache_top = os.path.join(cache, 'l10n')
1015+ ensure_cache(remote_source, l10n_cache_top)
1016+ local_source = os.path.join(l10n_cache_top, locale)
1017+ source = remote_source if local_source == None else local_source
1018+ do_checkout(source, destdir, tag)
1019+
1020+ (ret, out) = do_exec(['hg', 'tip'], cwd=destdir, quiet=True)
1021+ for line in out.split('\n'):
1022+ if line.startswith('changeset:'):
1023+ changesets.write('%s %s\n' % (locale, line.split()[1].strip()))
1024+ break
1025+
1026+def checkout_upstream_l10n(base, cache, tag, all_locales):
1027+ al = open(os.path.join(os.getcwd(), DEB_TAR_SRCDIR, ALL_LOCALES), 'r')
1028+ l10ndir = os.path.join(os.getcwd(), DEB_TAR_SRCDIR, 'l10n')
1029+ if not os.path.isdir(l10ndir):
1030+ os.makedirs(l10ndir)
1031+ changesets = open(os.path.join(l10ndir, 'changesets'), 'w')
1032+ try:
1033+ for line in al:
1034+ locale = line.strip()
1035+ if locale.startswith('#'):
1036+ continue
1037+
1038+ try:
1039+ checkout_locale(base, cache, locale, tag, changesets)
1040+ all_locales[locale] = 1
1041+ except Exception as e:
1042+ # checkout_locale will throw if the specified revision isn't found
1043+ # In this case, omit it from the tarball
1044+ localedir = os.path.join(l10ndir, locale)
1045+ if os.path.exists(localedir):
1046+ shutil.rmtree(localedir)
1047+ if type(e) != RevisionNotFound:
1048+ # Re-raise any unexpected exceptions
1049+ raise
1050+ finally:
1051+ al.close()
1052+ changesets.close()
1053+
1054+def checkout_source(repo, cache, tag):
1055+ local_source = None
1056+ if cache != None:
1057+ ensure_cache(repo, cache)
1058+ local_source = os.path.join(cache, os.path.basename(repo))
1059+ source = repo if local_source == None else local_source
1060+ do_checkout(source, os.path.join(os.getcwd(), DEB_TAR_SRCDIR), tag)
1061+
1062+def check_dependencies():
1063+ DEPENDENCIES = [
1064+ [ 'hg', 'mercurial' ],
1065+ [ 'tar', 'tar' ]
1066+ ]
1067+
1068+ for depend in DEPENDENCIES:
1069+ if os.path.isabs(depend[0]) and not os.access(depend[0], os.X_OK):
1070+ raise DependencyNotFound(depend)
1071+ else:
1072+ found = False
1073+ for path in os.environ['PATH'].split(os.pathsep):
1074+ if os.access(os.path.join(path, depend[0]), os.X_OK):
1075+ found = True
1076+ break
1077+ if found == False:
1078+ raise DependencyNotFound(depend)
1079+
1080+def cleanup_working_dir(origwd):
1081+ os.chdir(origwd)
1082+ shutil.rmtree('.mozsource')
1083+
1084+def setup_working_dir(name):
1085+ topwrkdir = os.path.abspath('.mozsource')
1086+ if os.path.exists(topwrkdir):
1087+ shutil.rmtree(topwrkdir)
1088+
1089+ working_dir = os.path.abspath('.mozsource/%s' % name)
1090+
1091+ os.makedirs(working_dir)
1092+ os.chdir(working_dir)
1093+
1094+if __name__ == '__main__':
1095+ usage = 'usage: %prog [options]'
1096+ parser = OptionParser(usage=usage)
1097+ parser.add_option('-r', '--repo', dest='repo', help='The remote repository from which to pull the main source')
1098+ parser.add_option('-c', '--cache', dest='cache', help='A local cache of the remote repositories')
1099+ parser.add_option('-l', '--l10n-base-repo', dest='l10nbase', help='The base directory of the remote repositories to pull l10n data from')
1100+ parser.add_option('-t', '--tag', dest='tag', help='Release tag to base the checkout on')
1101+ parser.add_option('-n', '--name', dest='name', help='The package name')
1102+ parser.add_option('-b', '--locale-blacklist', dest='blacklist', help='File with a list of blacklisted locales')
1103+
1104+ (options, args) = parser.parse_args()
1105+
1106+ if options.repo == None:
1107+ parser.error('Must specify a remote repository')
1108+
1109+ if options.name == None:
1110+ parser.error('Must specify a package name')
1111+
1112+ if not options.l10nbase and ALL_LOCALES != None:
1113+ parser.error('Must specify a base repository for l10n data')
1114+
1115+ saved_cwd = os.getcwd()
1116+ check_dependencies()
1117+ setup_working_dir(options.name)
1118+
1119+ if options.cache != None and not os.path.isabs(options.cache):
1120+ options.cache = os.path.join(os.getcwd(), options.cache)
1121+
1122+ checkout_source(options.repo, options.cache, options.tag)
1123+ if NEED_POST_CHECKOUT == 1:
1124+ post_checkout(options.repo, options.cache, options.tag)
1125+
1126+ # XXX: In the future we may have an additional l10n source from Launchpad
1127+ all_locales = {}
1128+ checkout_upstream_l10n(options.l10nbase, options.cache, options.tag, all_locales)
1129+ verify_all_locales(all_locales, options.blacklist)
1130+
1131+ version = determine_upstream_version(options.repo, options.tag)
1132+ pack_embedded_tar(version, os.path.basename(options.repo))
1133+ pack_orig_source(options.name, version, saved_cwd)
1134+
1135+ cleanup_working_dir(saved_cwd)
1136
1137=== added file 'debian/build/dump-langpack-control-entries'
1138--- debian/build/dump-langpack-control-entries 1970-01-01 00:00:00 +0000
1139+++ debian/build/dump-langpack-control-entries 2011-09-30 12:49:23 +0000
1140@@ -0,0 +1,78 @@
1141+#!/usr/bin/perl
1142+
1143+use strict;
1144+use warnings;
1145+
1146+my $ip_dir;
1147+my $template_dir;
1148+
1149+my $lp_avail_desc;
1150+my $lp_unavail_desc;
1151+
1152+my %all;
1153+my %shipped;
1154+
1155+while (@ARGV) {
1156+ my $arg = shift(@ARGV);
1157+ if ($arg eq '-i') {
1158+ $ip_dir = shift(@ARGV);
1159+ } elsif ($arg eq '-t') {
1160+ $template_dir = shift(@ARGV);
1161+ }
1162+}
1163+
1164+if (not defined($ip_dir) || not defined($template_dir)) { die "Need to specify a location for input and template data\n"; }
1165+
1166+{
1167+ my $file;
1168+ local $/=undef;
1169+ open($file, "$template_dir/control.langpacks") or die "Couldn't find control.langpacks";
1170+ $lp_avail_desc = <$file>;
1171+
1172+ open($file, "$template_dir/control.langpacks.unavail") or die "Couldn't find control.langpacks.unavail";
1173+ $lp_unavail_desc = <$file>;
1174+}
1175+
1176+my $all_file;
1177+my $shipped_file;
1178+
1179+open($all_file, "$ip_dir/locales.all") or die "Failed to open $ip_dir/locales.all";
1180+open($shipped_file, "$ip_dir/locales.shipped") or die "Failed to open $ip_dir/locales.shipped";
1181+while (<$all_file>) {
1182+ if ((not $_ =~ /^$/) && (not $_ =~ /^#.*/)) {
1183+ my $line = $_;
1184+ chomp($line);
1185+ my $pkgname = $line;
1186+ my $desc = $line;
1187+ $pkgname =~ s/([^:]*):*([^:]*)/$1/;
1188+ $desc =~ s/([^:]*):*([^:]*)/$2/;
1189+ if ($desc eq "") { die "Malformed locales.all"; }
1190+ $all{$pkgname} = $desc;
1191+ }
1192+}
1193+
1194+while (<$shipped_file>) {
1195+ if ((not $_ =~ /^$/) && (not $_ =~ /^#.*/)) {
1196+ my $line = $_;
1197+ chomp($line);
1198+ my $locale = $line;
1199+ my $pkgname = $line;
1200+ $locale =~ s/([^:]*):*([^:]*)/$1/;
1201+ $pkgname =~ s/([^:]*):*([^:]*)/$2/;
1202+ if ($pkgname eq "") { die "Malformed locales.shipped"; }
1203+ $shipped{$pkgname} = 1;
1204+ }
1205+}
1206+close($all_file);
1207+close($shipped_file);
1208+
1209+my @pkglist = keys(%all);
1210+@pkglist = sort(@pkglist);
1211+foreach my $pkg (@pkglist) {
1212+ my $desc = $all{$pkg};
1213+ my $entry;
1214+ $entry = exists $shipped{$pkg} ? $lp_avail_desc : $lp_unavail_desc;
1215+ $entry =~ s/\@LANGCODE\@/$pkg/g;
1216+ $entry =~ s/\@LANG\@/$desc/g;
1217+ print $entry;
1218+}
1219
1220=== added file 'debian/build/extract-file'
1221--- debian/build/extract-file 1970-01-01 00:00:00 +0000
1222+++ debian/build/extract-file 2011-09-30 12:49:23 +0000
1223@@ -0,0 +1,129 @@
1224+#!/usr/bin/python
1225+
1226+import os
1227+import sys
1228+import os.path
1229+import glob
1230+import shutil
1231+import tarfile
1232+import tempfile
1233+import getopt
1234+
1235+class FileExtractException(Exception):
1236+ def __init__(self, info):
1237+ self.info = info
1238+
1239+ def __str__(self):
1240+ return self.info
1241+
1242+def extract_file_from_archive(filename, dest, tar=None):
1243+ try:
1244+ if not os.path.isdir(dest):
1245+ os.makedirs(dest)
1246+
1247+ temp = tempfile.mkdtemp()
1248+
1249+ if tar == None:
1250+ tf = tarfile.open(glob.glob(os.path.join(os.getcwd(), '*.bz2'))[0], 'r')
1251+ else:
1252+ tf = tarfile.open(tar, 'r')
1253+ tf.extract(filename, temp)
1254+ shutil.copyfile(os.path.join(temp, filename), os.path.join(dest, os.path.basename(filename)))
1255+
1256+ except IndexError:
1257+ raise FileExtractException("No valid tar file found")
1258+
1259+ except KeyError:
1260+ errstr = "File " + filename + " not found in archive"
1261+ raise FileExtractException(errstr)
1262+
1263+ except IOError as e:
1264+ filename = ": '" + e.filename + "'" if e.filename != None else ""
1265+ errstr = "IOError occurred whilst extracting file from archive: [Errno: " + str(e.errno) + "] " + e.strerror + filename
1266+ raise FileExtractException(errstr)
1267+
1268+ except:
1269+ raise FileExtractException("Unexpected error")
1270+
1271+ finally:
1272+ if temp:
1273+ shutil.rmtree(temp)
1274+
1275+if __name__ == '__main__':
1276+ try:
1277+ opts, args = getopt.getopt(sys.argv[1:], 'd:o:')
1278+ except getopt.GetoptError, err:
1279+ print str(err)
1280+ exit(1)
1281+
1282+ cwd = os.getcwd()
1283+ dest = cwd
1284+ tarball = None
1285+
1286+ for o, a in opts:
1287+ if o == "-d":
1288+ dest = os.path.abspath(a)
1289+ elif o == "-o":
1290+ tarball = os.path.abspath(a)
1291+
1292+ if len(args) != 1:
1293+ print >> sys.stderr, "Need to specify one file"
1294+ exit(1)
1295+
1296+ filename = args[0]
1297+
1298+ if os.path.abspath(filename) == dest:
1299+ print >> sys.stderr, "Input and destination filenames shouldn't be the same"
1300+ exit(1)
1301+
1302+ if os.path.exists(os.path.abspath(filename)):
1303+ shutil.copyfile(os.path.abspath(filename), dest)
1304+ exit(0)
1305+
1306+ if tarball == None:
1307+ try:
1308+ extract_file_from_archive(filename, dest)
1309+
1310+ except FileExtractException as e:
1311+ print >> sys.stderr, str(e)
1312+ exit(1)
1313+
1314+ except:
1315+ print >> sys.stderr, "Unexpected error"
1316+ exit(1)
1317+ else:
1318+ try:
1319+ temp = tempfile.mkdtemp()
1320+
1321+ tb = tarfile.open(tarball, 'r')
1322+ names = tb.getnames()
1323+ bz2file = None
1324+ for name in names:
1325+ (root, ext) = os.path.splitext(name)
1326+ if ext == '.bz2':
1327+ bz2file = name
1328+ break
1329+ if bz2file:
1330+ tb.extract(bz2file, temp)
1331+ else:
1332+ print >> sys.stderr, "File not found and no valid embedded tar file found in source tarball"
1333+ exit(1)
1334+
1335+ extract_file_from_archive(filename, dest, os.path.join(temp, bz2file))
1336+
1337+ except FileExtractException as e:
1338+ print >> sys.stderr, str(e)
1339+ exit(1)
1340+
1341+ except IOError as e:
1342+ filename = ": '" + e.filename + "'" if e.filename != None else ""
1343+ print >> sys.stderr, "IOError: [Errno: " + str(e.errno) + "] " + e.strerror + filename
1344+ exit(1)
1345+
1346+ except:
1347+ print >> sys.stderr, "Unexpected error"
1348+ exit(1)
1349+
1350+ finally:
1351+ if temp:
1352+ shutil.rmtree(temp)
1353
1354=== added file 'debian/build/get-orig-source.mk'
1355--- debian/build/get-orig-source.mk 1970-01-01 00:00:00 +0000
1356+++ debian/build/get-orig-source.mk 2011-09-30 12:49:23 +0000
1357@@ -0,0 +1,14 @@
1358+#!/usr/bin/make -f
1359+
1360+ARGS = -r $(COMM_REPO) -l $(L10N_REPO) -n $(MOZ_APP_NAME) -b $(CURDIR)/debian/config/locales.blacklist
1361+
1362+ifdef DEBIAN_TAG
1363+ARGS += -t $(DEBIAN_TAG)
1364+endif
1365+
1366+ifdef LOCAL_BRANCH
1367+ARGS += -c $(LOCAL_BRANCH)
1368+endif
1369+
1370+get-orig-source:
1371+ python $(CURDIR)/debian/build/create-tarball $(ARGS)
1372
1373=== added file 'debian/build/get-xpi-id'
1374--- debian/build/get-xpi-id 1970-01-01 00:00:00 +0000
1375+++ debian/build/get-xpi-id 2011-09-30 12:49:23 +0000
1376@@ -0,0 +1,22 @@
1377+#!/usr/bin/python
1378+
1379+import sys
1380+import xml.dom.minidom
1381+import os
1382+import zipfile
1383+
1384+if __name__ == '__main__':
1385+ if not len(sys.argv) == 2:
1386+ print "Must specify an xpi"
1387+ exit(1)
1388+
1389+ dom_doc = xml.dom.minidom.parseString(zipfile.ZipFile(sys.argv[1]).open('install.rdf').read().strip())
1390+
1391+ try:
1392+ attr = dom_doc.getElementsByTagName('RDF:Description')[0].attributes['em:id']
1393+ except IndexError:
1394+ attr = dom_doc.getElementsByTagName('Description')[0].attributes['em:id']
1395+
1396+ assert attr.value
1397+ print "%s" % attr.value
1398+ exit(0)
1399
1400=== added file 'debian/build/refresh-supported-locales'
1401--- debian/build/refresh-supported-locales 1970-01-01 00:00:00 +0000
1402+++ debian/build/refresh-supported-locales 2011-09-30 12:49:23 +0000
1403@@ -0,0 +1,168 @@
1404+#!/usr/bin/perl
1405+
1406+use strict;
1407+use warnings;
1408+use Cwd;
1409+
1410+my $moz_supported_file;
1411+my $lpom_dir;
1412+my $op_dir;
1413+my $bl_file;
1414+
1415+my %blacklist;
1416+my %locale2pkgname;
1417+my %languages;
1418+
1419+my %pkglist;
1420+
1421+my $dir=getcwd;
1422+chomp($dir);
1423+
1424+my $file;
1425+
1426+while (@ARGV) {
1427+ my $arg = shift(@ARGV);
1428+ if ($arg eq '-s') {
1429+ $moz_supported_file = shift(@ARGV);
1430+ } elsif ($arg eq '-l') {
1431+ $lpom_dir = shift(@ARGV);
1432+ } elsif ($arg eq '-o') {
1433+ $op_dir = shift(@ARGV);
1434+ } elsif ($arg eq '-b') {
1435+ $bl_file = shift(@ARGV);
1436+ } else {
1437+ die "Unknown argument '$arg'";
1438+ }
1439+}
1440+
1441+(defined($moz_supported_file)) || die "Need to specify a supported language list";
1442+
1443+if (defined($lpom_dir)) {
1444+ my $lang_file = "$lpom_dir/maps/languages";
1445+ my $map_file = "$lpom_dir/maps/locale2pkgname";
1446+ my $variant_file = "$lpom_dir/maps/variants";
1447+
1448+ open($file, $lang_file) or die "Failed to open $lang_file";
1449+ while (<$file>) {
1450+ my $line = $_;
1451+ chomp($line);
1452+ my $langcode = $line;
1453+ my $lang = $line;
1454+ $langcode =~ s/([^:]*):*([^:]*)/$1/;
1455+ $lang =~ s/([^:]*):*([^:]*)/$2/;
1456+ if ($lang ne "") { $languages{$langcode} = $lang; }
1457+ }
1458+ close($file);
1459+
1460+ open($file, $map_file) or die "Failed to open $map_file";
1461+ while (<$file>) {
1462+ my $line = $_;
1463+ chomp($line);
1464+ my $langcode = $line;
1465+ my $pkgname = $line;
1466+ $langcode =~ s/([^:]*):*([^:]*)/$1/;
1467+ $pkgname =~ s/([^:]*):*([^:]*)/$2/;
1468+ if ($pkgname ne "") { $locale2pkgname{$langcode} = $pkgname; }
1469+ }
1470+ close($file);
1471+
1472+ open($file, $variant_file) or die "Failed to open $variant_file";
1473+ while (<$file>) {
1474+ my $line = $_;
1475+ chomp($line);
1476+ my $langcode = $line;
1477+ my $lang = $line;
1478+ $langcode =~ s/([^:]*):*([^:]*)/$1/;
1479+ $lang =~ s/([^:]*):*([^:]*)/$2/;
1480+ if ($lang ne "") { $languages{$langcode} = $lang; }
1481+ }
1482+ close($file);
1483+}
1484+
1485+if (-e "$op_dir/locales.all") {
1486+ open($file, "$op_dir/locales.all");
1487+ while (<$file>) {
1488+ if ((not $_ =~ /^$/) && (not $_ =~ /^#.*/)) {
1489+ my $line = $_;
1490+ chomp($line);
1491+ my $pkgname = $line;
1492+ my $lang = $line;
1493+ $pkgname =~ s/([^:]*):*([^:]*)/$1/;
1494+ $lang =~ s/([^:]*):*([^:]*)/$2/;
1495+ $pkglist{$pkgname} = 1;
1496+ if ($lang ne "") { $languages{$pkgname} = $lang; }
1497+ }
1498+ }
1499+}
1500+
1501+if (-e "$op_dir/locales.shipped") {
1502+ open($file, "$op_dir/locales.shipped");
1503+ while (<$file>) {
1504+ if ((not $_ =~ /^$/) && (not $_ =~ /^#.*/)) {
1505+ my $line = $_;
1506+ chomp($line);
1507+ my $langcode = $line;
1508+ my $pkgname = $line;
1509+ $langcode =~ s/([^:]*):*([^:]*)/$1/;
1510+ $pkgname =~ s/([^:]*):*([^:]*)/$2/;
1511+ if ($pkgname eq "") { die "Malformed locales.shipped file"; }
1512+ if (not exists $pkglist{$pkgname}) { die "WTF? Language in locales.shipped is not present in locales.all. Did we produce broken output last time?"; }
1513+ $locale2pkgname{lc($langcode)} = $pkgname;
1514+ }
1515+ }
1516+ close($file);
1517+}
1518+
1519+if (defined($bl_file)) {
1520+ open($file, "$bl_file") or die "Failed to open $bl_file";
1521+ while (<$file>) {
1522+ if ((not $_ =~ /^$/) && (not $_ =~ /^#.*/)) {
1523+ my $line = $_;
1524+ chomp($line);
1525+ $blacklist{$line} = 1;
1526+ }
1527+ }
1528+ close($file);
1529+}
1530+
1531+my $have_language = 0;
1532+
1533+open($file, $moz_supported_file) or die "Failed to open $moz_supported_file";
1534+open(my $outfile, ">$op_dir/locales.shipped");
1535+while (<$file>) {
1536+ my $line = $_;
1537+ chomp($line);
1538+ my $langcode = $line;
1539+ my $platforms = $line;
1540+ $langcode =~ s/^([[:alnum:]\-]*)[[:space:]]*(.*)/$1/;
1541+ $platforms =~ s/^([[:alnum:]\-]*)[[:space:]]*(.*)/$2/;
1542+ if (($langcode eq "en-US") || (($platforms ne "") && (rindex($platforms, "linux") eq -1)) || (exists $blacklist{$langcode})) { next; }
1543+ my $llangcode = lc($langcode);
1544+ my $pkgname = $llangcode;
1545+ if (exists $locale2pkgname{$llangcode}) { $pkgname = $locale2pkgname{$llangcode}; }
1546+ if (not exists $languages{$pkgname}) {
1547+ if ($pkgname eq $llangcode) { $pkgname =~ s/\-.*//; }
1548+ if (not exists $languages{$pkgname}) { die "No description for $pkgname"; }
1549+ }
1550+ if ($have_language eq 0) { print $outfile "# List of shipped locales. This list is automatically generated. Do not edit by hand\n"; }
1551+ $have_language = 1;
1552+ print $outfile "$langcode:$pkgname\n";
1553+ $pkglist{$pkgname} = 1;
1554+}
1555+
1556+if ($have_language eq 0) { print $outfile "# Placeholder file for the list of shipped languages. Do not delete"; }
1557+close($file);
1558+close($outfile);
1559+
1560+open($outfile, ">$op_dir/locales.all");
1561+my @completelist = keys(%pkglist);
1562+if (scalar(@completelist) gt 0) {
1563+ @completelist = sort(@completelist);
1564+ print $outfile "# List of all language packs, past and present. Please don't delete any entries from this file\n";
1565+ foreach my $lang (@completelist) {
1566+ if (not exists $languages{$lang}) { die "How on earth did we get here?"; }
1567+ my $desc = $languages{$lang};
1568+ print $outfile "$lang:$desc\n";
1569+ }
1570+} else { print $outfile "# Placeholder file for the list of all language packs. Do not delete"; }
1571+close($outfile);
1572
1573=== added file 'debian/build/testsuite.mk'
1574--- debian/build/testsuite.mk 1970-01-01 00:00:00 +0000
1575+++ debian/build/testsuite.mk 2011-09-30 12:49:23 +0000
1576@@ -0,0 +1,57 @@
1577+#!/usr/bin/make -f
1578+
1579+LOCALE := en_US.UTF-8
1580+LOCDIR = $(CURDIR)/$(MOZ_DISTDIR)/.locales
1581+
1582+TESTS := $(NULL)
1583+ifeq (1,$(MOZ_WANT_UNIT_TESTS))
1584+ TESTS += check xpcshell-tests jstestbrowser reftest crashtest mochitest
1585+endif
1586+
1587+debian/stamp-testsuite: $(addprefix debian/stamp-,$(TESTS))
1588+
1589+$(addprefix debian/stamp-,$(TESTS)): debian/stamp-makefile-build
1590+
1591+# Required for js/src/trace-tests/sunspider/check-date-format-tofte.js
1592+$(addprefix debian/stamp-,check jstestbrowser): export TZ = :/usr/share/zoneinfo/posix/US/Pacific
1593+
1594+$(LOCDIR)/%:
1595+ mkdir -p $(LOCDIR)
1596+ localedef -f $(shell echo $(notdir $@) | cut -d '.' -f 2) -i $(shell echo $(notdir $@) | cut -d '.' -f 1) $@
1597+
1598+# Setup locales for tests which need it
1599+$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest): $(LOCDIR)/$(LOCALE)
1600+$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest): export LOCPATH=$(LOCDIR)
1601+$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest): export LC_ALL=$(LOCALE)
1602+
1603+# Disable tests that are known to fail
1604+$(addprefix debian/stamp-,xpcshell-tests): debian/stamp-xpcshell-tests-disable
1605+
1606+# Tests that need a X server
1607+$(addprefix debian/stamp-,jstestbrowser reftest crashtest mochitest): WRAPPER = xvfb-run -s "-screen 0 1024x768x24"
1608+
1609+# Run the test!
1610+$(addprefix debian/stamp-,$(TESTS)):
1611+ HOME="$(CURDIR)/$(MOZ_DISTDIR)" \
1612+ $(WRAPPER) $(MAKE) -C $(CURDIR)/$(MOZ_OBJDIR) $(subst debian/stamp-,,$@) || true
1613+ touch $@
1614+
1615+debian/stamp-xpcshell-tests-disable: debian/stamp-makefile-build
1616+ # Hangs without network access
1617+ rm -f $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/toolkit/components/places/tests/unit/test_404630.js
1618+
1619+ # FIXME: IPC tests seem to hang in the buildd's
1620+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/chrome/test/unit_ipc
1621+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/ipc/testshell/tests
1622+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/toolkit/components/contentprefs/tests/unit_ipc
1623+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/ipc
1624+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/netwerk/cookie/test/unit_ipc
1625+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/netwerk/test/unit_ipc
1626+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/modules/libpref/test/unit_ipc
1627+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/extensions/cookie/test/unit_ipc
1628+ rm -rf $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/uriloader/exthandler/tests/unit_ipc
1629+
1630+ # Needs GConf to be running. I guess we need to start with dbus-launch to fix this
1631+ rm -f $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/browser/components/shell/test/unit/test_421977.js
1632+ rm -f $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/uriloader/exthandler/tests/unit/test_handlerService.js
1633+ touch $@
1634
1635=== modified file 'debian/changelog'
1636--- debian/changelog 2010-12-14 04:32:43 +0000
1637+++ debian/changelog 2011-09-30 12:49:23 +0000
1638@@ -1,3 +1,58 @@
1639+seamonkey (2.4.1-0ubuntu2) maverick; urgency=low
1640+
1641+ * New upstream release v2.4.1 (SEAMONKEY_2_4_1_RELEASE)
1642+
1643+ -- Joe <joe@nationnet.com> Thu, 29 Sep 2011 05:52:56 -0700
1644+
1645+seamonkey (2.4-0ubuntu1) maverick; urgency=low
1646+
1647+ * New upstream release v2.4 (SEAMONKEY_2_4_RELEASE)
1648+
1649+ -- Joe <joe@nationnet.com> Fri, 23 Sep 2011 06:03:54 -0700
1650+
1651+seamonkey (2.3.3-0ubuntu8) maverick; urgency=low
1652+
1653+ * Incorporate suggestions from Chris Coulson.
1654+ Removed Thunderbird extensions globalmenu and eds. Removed apport.
1655+ * Fixed seamonkey-gnome-support
1656+ * Not building debug package.
1657+
1658+ -- Joe <joe@nationnet.com> Mon, 12 Sep 2011 17:47:07 -0700
1659+
1660+seamonkey (2.3.3-0ubuntu6) natty; urgency=low
1661+
1662+ * New upstream release v2.3.3 (SEAMONKEY_2_3_3_RELEASE)
1663+ * New debian build environment for Seamonkey.
1664+ * Worked on fix that will allow Seamonkey to compile on lucid
1665+ because of the old yasm and turbo jpeg library.
1666+ * Added seamonkey to Unity global menu.
1667+ * Take the build1+binonly out of the name to match the source.
1668+ * Changed MOZ_BUILD_UNOFFICIAL to 0 so the Seamonkey name
1669+ would show up in seamonkey.desktop.
1670+ * Commented out the patches in the series.
1671+
1672+ -- Joe <joe@nationnet.com> Sat, 10 Sep 2011 11:52:23 -0700
1673+
1674+seamonkey (2.3.3-0ubuntu2) natty; urgency=low
1675+
1676+ * Worked on fix that will allow Seamonkey to compile on lucid
1677+ because of the old yasm and turbo jpeg library.
1678+ * Added seamonkey to Unity global menu.
1679+ * Take the build1+binonly out of the name to match the source.
1680+
1681+
1682+ -- Joe <joe@nationnet.com> Sat, 10 Sep 2011 09:37:46 -0700
1683+
1684+seamonkey (2.3.3+build1+nobinonly-0ubuntu1) natty; urgency=low
1685+
1686+ * New upstream release v2.3.3 (SEAMONKEY_2_3_3_RELEASE)
1687+
1688+ * New Build environment for Seamonkey.
1689+
1690+ * Initial test of new build scripts. They should match Thunderbird now.
1691+
1692+ -- Joe <joe@nationnet.com> Sat, 10 Sep 2011 00:24:07 -0700
1693+
1694 seamonkey (2.0.11+build1+nobinonly-0ubuntu2) natty; urgency=low
1695
1696 * fix LP: #688675 - Seamonkey FTBFS on armel; Add extra "IT" lines for
1697
1698=== added directory 'debian/compare-locales'
1699=== added file 'debian/compare-locales/REV'
1700--- debian/compare-locales/REV 1970-01-01 00:00:00 +0000
1701+++ debian/compare-locales/REV 2011-09-30 12:49:23 +0000
1702@@ -0,0 +1,1 @@
1703+TAG=FIREFOX_5_0b1_BUILD1
1704\ No newline at end of file
1705
1706=== added directory 'debian/compare-locales/lib'
1707=== added directory 'debian/compare-locales/lib/Mozilla'
1708=== added file 'debian/compare-locales/lib/Mozilla/CompareLocales.py'
1709--- debian/compare-locales/lib/Mozilla/CompareLocales.py 1970-01-01 00:00:00 +0000
1710+++ debian/compare-locales/lib/Mozilla/CompareLocales.py 2011-09-30 12:49:23 +0000
1711@@ -0,0 +1,506 @@
1712+# ***** BEGIN LICENSE BLOCK *****
1713+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
1714+#
1715+# The contents of this file are subject to the Mozilla Public License Version
1716+# 1.1 (the "License"); you may not use this file except in compliance with
1717+# the License. You may obtain a copy of the License at
1718+# http://www.mozilla.org/MPL/
1719+#
1720+# Software distributed under the License is distributed on an "AS IS" basis,
1721+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1722+# for the specific language governing rights and limitations under the
1723+# License.
1724+#
1725+# The Original Code is l10n test automation.
1726+#
1727+# The Initial Developer of the Original Code is
1728+# Mozilla Foundation
1729+# Portions created by the Initial Developer are Copyright (C) 2006
1730+# the Initial Developer. All Rights Reserved.
1731+#
1732+# Contributor(s):
1733+# Axel Hecht <l10n@mozilla.com>
1734+#
1735+# Alternatively, the contents of this file may be used under the terms of
1736+# either the GNU General Public License Version 2 or later (the "GPL"), or
1737+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1738+# in which case the provisions of the GPL or the LGPL are applicable instead
1739+# of those above. If you wish to allow use of your version of this file only
1740+# under the terms of either the GPL or the LGPL, and not to allow others to
1741+# use your version of this file under the terms of the MPL, indicate your
1742+# decision by deleting the provisions above and replace them with the notice
1743+# and other provisions required by the GPL or the LGPL. If you do not delete
1744+# the provisions above, a recipient may use your version of this file under
1745+# the terms of any one of the MPL, the GPL or the LGPL.
1746+#
1747+# ***** END LICENSE BLOCK *****
1748+
1749+'Mozilla l10n compare locales tool'
1750+
1751+import codecs
1752+import os
1753+import os.path
1754+import shutil
1755+import re
1756+import logging
1757+from difflib import SequenceMatcher
1758+try:
1759+ from collections import defaultdict
1760+except ImportError:
1761+ class defaultdict(dict):
1762+ def __init__(self, defaultclass):
1763+ dict.__init__(self)
1764+ self.__defaultclass = defaultclass
1765+ def __getitem__(self, k):
1766+ if not dict.__contains__(self, k):
1767+ self[k] = self.__defaultclass()
1768+ return dict.__getitem__(self, k)
1769+# backwards compat hack for any(), new in python 2.5
1770+try:
1771+ any([True])
1772+except NameError:
1773+ def any(sequence):
1774+ for item in sequence:
1775+ if item:
1776+ return True
1777+ return False
1778+
1779+
1780+import Parser
1781+import Paths
1782+
1783+class Tree(object):
1784+ def __init__(self, valuetype):
1785+ self.branches = dict()
1786+ self.valuetype = valuetype
1787+ self.value = None
1788+ def __getitem__(self, leaf):
1789+ parts = []
1790+ if isinstance(leaf, Paths.File):
1791+ parts = [p for p in [leaf.locale, leaf.module] if p] + \
1792+ leaf.file.split('/')
1793+ else:
1794+ parts = leaf.split('/')
1795+ return self.__get(parts)
1796+ def __get(self, parts):
1797+ common = None
1798+ old = None
1799+ new = tuple(parts)
1800+ t = self
1801+ for k, v in self.branches.iteritems():
1802+ for i, part in enumerate(zip(k, parts)):
1803+ if part[0] != part[1]:
1804+ i -= 1
1805+ break
1806+ if i < 0:
1807+ continue
1808+ i += 1
1809+ common = tuple(k[:i])
1810+ old = tuple(k[i:])
1811+ new = tuple(parts[i:])
1812+ break
1813+ if old:
1814+ self.branches.pop(k)
1815+ t = Tree(self.valuetype)
1816+ t.branches[old] = v
1817+ self.branches[common] = t
1818+ elif common:
1819+ t = self.branches[common]
1820+ if new:
1821+ if common:
1822+ return t.__get(new)
1823+ t2 = t
1824+ t = Tree(self.valuetype)
1825+ t2.branches[new] = t
1826+ if t.value is None:
1827+ t.value = t.valuetype()
1828+ return t.value
1829+ indent = ' '
1830+ def getContent(self, depth = 0):
1831+ '''
1832+ Returns iterator of (depth, flag, key_or_value) tuples.
1833+ If flag is 'value', key_or_value is a value object, otherwise
1834+ (flag is 'key') it's a key string.
1835+ '''
1836+ keys = self.branches.keys()
1837+ keys.sort()
1838+ if self.value is not None:
1839+ yield (depth, 'value', self.value)
1840+ for key in keys:
1841+ yield (depth, 'key', key)
1842+ for child in self.branches[key].getContent(depth + 1):
1843+ yield child
1844+ def toJSON(self):
1845+ '''
1846+ Returns this Tree as a JSON-able tree of hashes.
1847+ Only the values need to take care that they're JSON-able.
1848+ '''
1849+ json = {}
1850+ keys = self.branches.keys()
1851+ keys.sort()
1852+ if self.value is not None:
1853+ json['value'] = self.value
1854+ children = [('/'.join(key), self.branches[key].toJSON())
1855+ for key in keys]
1856+ if children:
1857+ json['children'] = children
1858+ return json
1859+ def getStrRows(self):
1860+ def tostr(t):
1861+ if t[1] == 'key':
1862+ return self.indent * t[0] + '/'.join(t[2])
1863+ return self.indent * (t[0] + 1) + str(t[2])
1864+ return map(tostr, self.getContent())
1865+ def __str__(self):
1866+ return '\n'.join(self.getStrRows())
1867+
1868+class AddRemove(SequenceMatcher):
1869+ def __init__(self):
1870+ SequenceMatcher.__init__(self, None, None, None)
1871+ def set_left(self, left):
1872+ if not isinstance(left, list):
1873+ left = [l for l in left]
1874+ self.set_seq1(left)
1875+ def set_right(self, right):
1876+ if not isinstance(right, list):
1877+ right = [l for l in right]
1878+ self.set_seq2(right)
1879+ def __iter__(self):
1880+ for tag, i1, i2, j1, j2 in self.get_opcodes():
1881+ if tag == 'equal':
1882+ for pair in zip(self.a[i1:i2], self.b[j1:j2]):
1883+ yield ('equal', pair)
1884+ elif tag == 'delete':
1885+ for item in self.a[i1:i2]:
1886+ yield ('delete', item)
1887+ elif tag == 'insert':
1888+ for item in self.b[j1:j2]:
1889+ yield ('add', item)
1890+ else:
1891+ # tag == 'replace'
1892+ for item in self.a[i1:i2]:
1893+ yield ('delete', item)
1894+ for item in self.b[j1:j2]:
1895+ yield ('add', item)
1896+
1897+class DirectoryCompare(SequenceMatcher):
1898+ def __init__(self, reference):
1899+ SequenceMatcher.__init__(self, None, [i for i in reference],
1900+ [])
1901+ self.watcher = None
1902+ def setWatcher(self, watcher):
1903+ self.watcher = watcher
1904+ def compareWith(self, other):
1905+ if not self.watcher:
1906+ return
1907+ self.set_seq2([i for i in other])
1908+ for tag, i1, i2, j1, j2 in self.get_opcodes():
1909+ if tag == 'equal':
1910+ for i, j in zip(xrange(i1,i2), xrange(j1,j2)):
1911+ self.watcher.compare(self.a[i], self.b[j])
1912+ elif tag == 'delete':
1913+ for i in xrange(i1,i2):
1914+ self.watcher.add(self.a[i], other.cloneFile(self.a[i]))
1915+ elif tag == 'insert':
1916+ for j in xrange(j1, j2):
1917+ self.watcher.remove(self.b[j])
1918+ else:
1919+ for j in xrange(j1, j2):
1920+ self.watcher.remove(self.b[j])
1921+ for i in xrange(i1,i2):
1922+ self.watcher.add(self.a[i], other.cloneFile(self.a[i]))
1923+
1924+class Observer(object):
1925+ stat_cats = ['missing', 'obsolete', 'missingInFiles', 'report',
1926+ 'changed', 'unchanged', 'keys']
1927+ def __init__(self):
1928+ class intdict(defaultdict):
1929+ def __init__(self):
1930+ defaultdict.__init__(self, int)
1931+ self.summary = defaultdict(intdict)
1932+ self.details = Tree(dict)
1933+ self.filter = None
1934+ # support pickling
1935+ def __getstate__(self):
1936+ return dict(summary = self.getSummary(), details = self.details)
1937+ def __setstate__(self, state):
1938+ class intdict(defaultdict):
1939+ def __init__(self):
1940+ defaultdict.__init__(self, int)
1941+ self.summary = defaultdict(intdict)
1942+ if 'summary' in state:
1943+ for loc, stats in state['summary'].iteritems():
1944+ self.summary[loc].update(stats)
1945+ self.details = state['details']
1946+ self.filter = None
1947+ def getSummary(self):
1948+ plaindict = {}
1949+ for k, v in self.summary.iteritems():
1950+ plaindict[k] = dict(v)
1951+ return plaindict
1952+ def toJSON(self):
1953+ return dict(summary = self.getSummary(), details = self.details.toJSON())
1954+ def notify(self, category, file, data):
1955+ rv = "error"
1956+ if category in self.stat_cats:
1957+ # these get called post reporting just for stats
1958+ # return "error" to forward them to other observers
1959+ self.summary[file.locale][category] += data
1960+ return "error"
1961+ if category in ['missingFile', 'obsoleteFile']:
1962+ if self.filter is not None:
1963+ rv = self.filter(file)
1964+ if rv != "ignore":
1965+ self.details[file][category] = rv
1966+ return rv
1967+ if category in ['missingEntity', 'obsoleteEntity']:
1968+ if self.filter is not None:
1969+ rv = self.filter(file, data)
1970+ if rv == "ignore":
1971+ return rv
1972+ v = self.details[file]
1973+ try:
1974+ v[category].append(data)
1975+ except KeyError:
1976+ v[category] = [data]
1977+ return rv
1978+ if category == 'error':
1979+ try:
1980+ self.details[file][category].append(data)
1981+ except KeyError:
1982+ self.details[file][category] = [data]
1983+ self.summary[file.locale]['errors'] += 1
1984+ return rv
1985+ def serialize(self, type="text/plain"):
1986+ def tostr(t):
1987+ if t[1] == 'key':
1988+ return ' ' * t[0] + '/'.join(t[2])
1989+ o = []
1990+ indent = ' ' * (t[0] + 1)
1991+ if 'error' in t[2]:
1992+ o += [indent + 'ERROR: ' + e for e in t[2]['error']]
1993+ if 'missingEntity' in t[2] or 'obsoleteEntity' in t[2]:
1994+ missingEntities = ('missingEntity' in t[2] and t[2]['missingEntity']) \
1995+ or []
1996+ obsoleteEntities = ('obsoleteEntity' in t[2] and
1997+ t[2]['obsoleteEntity']) or []
1998+ entities = missingEntities + obsoleteEntities
1999+ entities.sort()
2000+ for entity in entities:
2001+ op = '+'
2002+ if entity in obsoleteEntities:
2003+ op = '-'
2004+ o.append(indent + op + entity)
2005+ elif 'missingFile' in t[2]:
2006+ o.append(indent + '// add and localize this file')
2007+ elif 'obsoleteFile' in t[2]:
2008+ o.append(indent + '// remove this file')
2009+ return '\n'.join(o)
2010+ out = []
2011+ for locale, summary in self.summary.iteritems():
2012+ if locale is not None:
2013+ out.append(locale + ':')
2014+ out += [k + ': ' + str(v) for k,v in summary.iteritems()]
2015+ total = sum([summary[k] \
2016+ for k in ['changed','unchanged','report','missing',
2017+ 'missingInFiles'] \
2018+ if k in summary])
2019+ rate = (('changed' in summary and summary['changed'] * 100)
2020+ or 0) / total
2021+ out.append('%d%% of entries changed' % rate)
2022+ return '\n'.join(map(tostr, self.details.getContent()) + out)
2023+ def __str__(self):
2024+ return 'observer'
2025+
2026+class ContentComparer:
2027+ keyRE = re.compile('[kK]ey')
2028+ def __init__(self, filterObserver):
2029+ '''Create a ContentComparer.
2030+ filterObserver is usually a instance of Observer. The return values
2031+ of the notify method are used to control the handling of missing
2032+ entities.
2033+ '''
2034+ self.reference = dict()
2035+ self.filterObserver = filterObserver
2036+ self.observers = []
2037+ self.merge_stage = None
2038+ def add_observer(self, obs):
2039+ '''Add a non-filtering observer.
2040+ Results from the notify calls are ignored.
2041+ '''
2042+ self.observers.append(obs)
2043+ def set_merge_stage(self, merge_stage):
2044+ self.merge_stage = merge_stage
2045+ def merge(self, ref_entities, ref_map, ref_file, l10n_file, missing, p):
2046+ outfile = os.path.join(self.merge_stage, l10n_file.module, l10n_file.file)
2047+ outdir = os.path.dirname(outfile)
2048+ if not os.path.isdir(outdir):
2049+ os.makedirs(outdir)
2050+ if not p.canMerge:
2051+ shutil.copyfile(ref_file.fullpath, outfile)
2052+ print "copied reference to " + outfile
2053+ return
2054+ trailing = [ref_entities[ref_map[key]].all for key in missing]
2055+ shutil.copyfile(l10n_file.fullpath, outfile)
2056+ print "adding to " + outfile
2057+ f = codecs.open(outfile, 'ab', p.encoding)
2058+ f.write(''.join(trailing))
2059+ f.close()
2060+ def notify(self, category, file, data):
2061+ '''Check filterObserver for the found data, and if it's
2062+ not to ignore, notify observers.
2063+ '''
2064+ rv = self.filterObserver.notify(category, file, data)
2065+ if rv == 'ignore':
2066+ return rv
2067+ for obs in self.observers:
2068+ # non-filtering observers, ignore results
2069+ obs.notify(category, file, data)
2070+ return rv
2071+ def remove(self, obsolete):
2072+ self.notify('obsoleteFile', obsolete, None)
2073+ pass
2074+ def compare(self, ref_file, l10n):
2075+ try:
2076+ p = Parser.getParser(ref_file.file)
2077+ except UserWarning:
2078+ # no comparison, XXX report?
2079+ return
2080+ if ref_file not in self.reference:
2081+ # we didn't parse this before
2082+ try:
2083+ p.readContents(ref_file.getContents())
2084+ except Exception, e:
2085+ self.notify('error', ref_file, str(e))
2086+ return
2087+ self.reference[ref_file] = p.parse()
2088+ ref = self.reference[ref_file]
2089+ ref_list = ref[1].keys()
2090+ ref_list.sort()
2091+ try:
2092+ p.readContents(l10n.getContents())
2093+ l10n_entities, l10n_map = p.parse()
2094+ except Exception, e:
2095+ self.notify('error', l10n, str(e))
2096+ return
2097+ l10n_list = l10n_map.keys()
2098+ l10n_list.sort()
2099+ ar = AddRemove()
2100+ ar.set_left(ref_list)
2101+ ar.set_right(l10n_list)
2102+ report = missing = obsolete = changed = unchanged = keys = 0
2103+ missings = []
2104+ for action, item_or_pair in ar:
2105+ if action == 'delete':
2106+ # missing entity
2107+ _rv = self.notify('missingEntity', l10n, item_or_pair)
2108+ if _rv == "ignore":
2109+ continue
2110+ if _rv == "error":
2111+ # only add to missing entities for l10n-merge on error, not report
2112+ missings.append(item_or_pair)
2113+ missing += 1
2114+ else:
2115+ # just report
2116+ report += 1
2117+ elif action == 'add':
2118+ # obsolete entity or junk
2119+ if isinstance(l10n_entities[l10n_map[item_or_pair]], Parser.Junk):
2120+ junk = l10n_entities[l10n_map[item_or_pair]]
2121+ params = (junk.val,) + junk.span
2122+ self.notify('error', l10n, 'Unparsed content "%s" at %d-%d' % params)
2123+ elif self.notify('obsoleteEntity', l10n, item_or_pair) != 'ignore':
2124+ obsolete += 1
2125+ else:
2126+ # entity found in both ref and l10n, check for changed
2127+ entity = item_or_pair[0]
2128+ if self.keyRE.search(entity):
2129+ keys += 1
2130+ else:
2131+ refent = ref[0][ref[1][entity]]
2132+ l10nent = l10n_entities[l10n_map[entity]]
2133+ if refent.val == l10nent.val:
2134+ self.doUnchanged(l10nent)
2135+ unchanged += 1
2136+ else:
2137+ self.doChanged(ref_file, refent, l10nent)
2138+ changed += 1
2139+ pass
2140+ if missing:
2141+ self.notify('missing', l10n, missing)
2142+ if self.merge_stage is not None and missings:
2143+ self.merge(ref[0], ref[1], ref_file, l10n, missings, p)
2144+ if report:
2145+ self.notify('report', l10n, report)
2146+ if obsolete:
2147+ self.notify('obsolete', l10n, obsolete)
2148+ if changed:
2149+ self.notify('changed', l10n, changed)
2150+ if unchanged:
2151+ self.notify('unchanged', l10n, unchanged)
2152+ if keys:
2153+ self.notify('keys', l10n, keys)
2154+ pass
2155+ def add(self, orig, missing):
2156+ if self.notify('missingFile', missing, None) == "ignore":
2157+ # filter said that we don't need this file, don't count it
2158+ return
2159+ f = orig
2160+ try:
2161+ p = Parser.getParser(f.file)
2162+ except UserWarning:
2163+ return
2164+ try:
2165+ p.readContents(f.getContents())
2166+ entities, map = p.parse()
2167+ except Exception, e:
2168+ self.notify('error', f, str(e))
2169+ return
2170+ self.notify('missingInFiles', missing, len(map))
2171+ def doUnchanged(self, entity):
2172+ # overload this if needed
2173+ pass
2174+ def doChanged(self, file, ref_entity, l10n_entity):
2175+ # overload this if needed
2176+ pass
2177+
2178+def compareApp(app, otherObserver = None, merge_stage = None):
2179+ '''Compare locales set in app.
2180+
2181+ Optional arguments are:
2182+ - otherObserver. A object implementing
2183+ notify(category, _file, data)
2184+ The return values of that callback are ignored.
2185+ - merge_stage. A directory to be used for staging the output of
2186+ l10n-merge.
2187+ '''
2188+ o = Observer()
2189+ cc = ContentComparer(o)
2190+ if otherObserver is not None:
2191+ cc.add_observer(otherObserver)
2192+ cc.set_merge_stage(merge_stage)
2193+ o.filter = app.filter
2194+ for module, reference, locales in app:
2195+ dc = DirectoryCompare(reference)
2196+ dc.setWatcher(cc)
2197+ for locale, localization in locales:
2198+ dc.compareWith(localization)
2199+ return o
2200+
2201+def compareDirs(reference, locale, otherObserver = None, merge_stage = None):
2202+ '''Compare reference and locale dir.
2203+
2204+ Optional arguments are:
2205+ - otherObserver. A object implementing
2206+ notify(category, _file, data)
2207+ The return values of that callback are ignored.
2208+ '''
2209+ o = Observer()
2210+ cc = ContentComparer(o)
2211+ if otherObserver is not None:
2212+ cc.add_observer(otherObserver)
2213+ cc.set_merge_stage(merge_stage)
2214+ dc = DirectoryCompare(Paths.EnumerateDir(reference))
2215+ dc.setWatcher(cc)
2216+ dc.compareWith(Paths.EnumerateDir(locale))
2217+ return o
2218
2219=== added file 'debian/compare-locales/lib/Mozilla/Jars.py'
2220--- debian/compare-locales/lib/Mozilla/Jars.py 1970-01-01 00:00:00 +0000
2221+++ debian/compare-locales/lib/Mozilla/Jars.py 2011-09-30 12:49:23 +0000
2222@@ -0,0 +1,85 @@
2223+# ***** BEGIN LICENSE BLOCK *****
2224+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
2225+#
2226+# The contents of this file are subject to the Mozilla Public License Version
2227+# 1.1 (the "License"); you may not use this file except in compliance with
2228+# the License. You may obtain a copy of the License at
2229+# http://www.mozilla.org/MPL/
2230+#
2231+# Software distributed under the License is distributed on an "AS IS" basis,
2232+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2233+# for the specific language governing rights and limitations under the
2234+# License.
2235+#
2236+# The Original Code is l10n test automation.
2237+#
2238+# The Initial Developer of the Original Code is
2239+# Mozilla Foundation
2240+# Portions created by the Initial Developer are Copyright (C) 2007
2241+# the Initial Developer. All Rights Reserved.
2242+#
2243+# Contributor(s):
2244+# Axel Hecht <l10n@mozilla.com>
2245+#
2246+# Alternatively, the contents of this file may be used under the terms of
2247+# either the GNU General Public License Version 2 or later (the "GPL"), or
2248+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2249+# in which case the provisions of the GPL or the LGPL are applicable instead
2250+# of those above. If you wish to allow use of your version of this file only
2251+# under the terms of either the GPL or the LGPL, and not to allow others to
2252+# use your version of this file under the terms of the MPL, indicate your
2253+# decision by deleting the provisions above and replace them with the notice
2254+# and other provisions required by the GPL or the LGPL. If you do not delete
2255+# the provisions above, a recipient may use your version of this file under
2256+# the terms of any one of the MPL, the GPL or the LGPL.
2257+#
2258+# ***** END LICENSE BLOCK *****
2259+
2260+from zipfile import ZipFile
2261+from difflib import SequenceMatcher
2262+import os.path
2263+import re
2264+
2265+from Paths import File
2266+import CompareLocales
2267+
2268+class JarEntry(File):
2269+ def __init__(self, zf, file, fakefile):
2270+ File.__init__(self, None, fakefile)
2271+ self.realfile = file
2272+ self.zipfile = zf
2273+ def __str__(self):
2274+ return self.zipfile.filename + '!' + self.realfile
2275+ def getContents(self):
2276+ return self.zipfile.read(self.realfile)
2277+
2278+class EnumerateJar(object):
2279+ def __init__(self, basepath):
2280+ basepath = os.path.abspath(basepath)
2281+ if not basepath.endswith('.jar'):
2282+ raise RuntimeError("Only jar files supported")
2283+ self.basepath = basepath
2284+ # best guess we have on locale code
2285+ self.locale = os.path.split(basepath)[1].replace('.jar','')
2286+ self.zf = ZipFile(basepath, 'r')
2287+ def cloneFile(self, other):
2288+ return JarEntry(self.zf, other.realfile, other.file)
2289+ def __iter__(self):
2290+ # get all entries, drop those ending with '/', those are dirs.
2291+ files = [f for f in self.zf.namelist() if not f.endswith('/')]
2292+ files.sort()
2293+ # unfortunately, we have to fake file paths of the form
2294+ # locale/AB-CD/
2295+ # for comparison.
2296+ # For real, the corresponding manifest would tell us. Whichever.
2297+ localesub = re.compile('^locale/' + self.locale)
2298+ for f in files:
2299+ yield JarEntry(self.zf, f, localesub.sub('locale/@AB_CD@', f))
2300+
2301+def compareJars(ref, l10n):
2302+ o = CompareLocales.Observer()
2303+ cc = CompareLocales.ContentComparer(o)
2304+ dc = CompareLocales.DirectoryCompare(EnumerateJar(ref))
2305+ dc.setWatcher(cc)
2306+ dc.compareWith(EnumerateJar(l10n))
2307+ return o
2308
2309=== added file 'debian/compare-locales/lib/Mozilla/Parser.py'
2310--- debian/compare-locales/lib/Mozilla/Parser.py 1970-01-01 00:00:00 +0000
2311+++ debian/compare-locales/lib/Mozilla/Parser.py 2011-09-30 12:49:23 +0000
2312@@ -0,0 +1,425 @@
2313+# ***** BEGIN LICENSE BLOCK *****
2314+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
2315+#
2316+# The contents of this file are subject to the Mozilla Public License Version
2317+# 1.1 (the "License"); you may not use this file except in compliance with
2318+# the License. You may obtain a copy of the License at
2319+# http://www.mozilla.org/MPL/
2320+#
2321+# Software distributed under the License is distributed on an "AS IS" basis,
2322+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2323+# for the specific language governing rights and limitations under the
2324+# License.
2325+#
2326+# The Original Code is l10n test automation.
2327+#
2328+# The Initial Developer of the Original Code is
2329+# Mozilla Foundation
2330+# Portions created by the Initial Developer are Copyright (C) 2006
2331+# the Initial Developer. All Rights Reserved.
2332+#
2333+# Contributor(s):
2334+# Axel Hecht <l10n@mozilla.com>
2335+# Toshihiro Kura
2336+# Tomoya Asai (dynamis)
2337+# Clint Talbert <ctalbert@mozilla.com>
2338+#
2339+# Alternatively, the contents of this file may be used under the terms of
2340+# either the GNU General Public License Version 2 or later (the "GPL"), or
2341+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2342+# in which case the provisions of the GPL or the LGPL are applicable instead
2343+# of those above. If you wish to allow use of your version of this file only
2344+# under the terms of either the GPL or the LGPL, and not to allow others to
2345+# use your version of this file under the terms of the MPL, indicate your
2346+# decision by deleting the provisions above and replace them with the notice
2347+# and other provisions required by the GPL or the LGPL. If you do not delete
2348+# the provisions above, a recipient may use your version of this file under
2349+# the terms of any one of the MPL, the GPL or the LGPL.
2350+#
2351+# ***** END LICENSE BLOCK *****
2352+
2353+import re
2354+import codecs
2355+import logging
2356+from HTMLParser import HTMLParser
2357+
2358+__constructors = []
2359+
2360+class Entity(object):
2361+ '''
2362+ Abstraction layer for a localizable entity.
2363+ Currently supported are grammars of the form:
2364+
2365+ 1: pre white space
2366+ 2: pre comments
2367+ 3: entity definition
2368+ 4: entity key (name)
2369+ 5: entity value
2370+ 6: post comment (and white space) in the same line (dtd only)
2371+ <--[1]
2372+ <!-- pre comments --> <--[2]
2373+ <!ENTITY key "value"> <!-- comment -->
2374+
2375+ <-------[3]---------><------[6]------>
2376+ '''
2377+ def __init__(self, contents, pp,
2378+ span, pre_ws_span, pre_comment_span, def_span,
2379+ key_span, val_span, post_span):
2380+ self.contents = contents
2381+ self.span = span
2382+ self.pre_ws_span = pre_ws_span
2383+ self.pre_comment_span = pre_comment_span
2384+ self.def_span = def_span
2385+ self.key_span = key_span
2386+ self.val_span = val_span
2387+ self.post_span = post_span
2388+ self.pp = pp
2389+ pass
2390+
2391+ # getter helpers
2392+
2393+ def get_all(self):
2394+ return self.contents[self.span[0] : self.span[1]]
2395+ def get_pre_ws(self):
2396+ return self.contents[self.pre_ws_span[0] : self.pre_ws_span[1]]
2397+ def get_pre_comment(self):
2398+ return self.contents[self.pre_comment_span[0] : self.pre_comment_span[1]]
2399+ def get_def(self):
2400+ return self.contents[self.def_span[0] : self.def_span[1]]
2401+ def get_key(self):
2402+ return self.contents[self.key_span[0] : self.key_span[1]]
2403+ def get_val(self):
2404+ return self.pp(self.contents[self.val_span[0] : self.val_span[1]])
2405+ def get_post(self):
2406+ return self.contents[self.post_span[0] : self.post_span[1]]
2407+
2408+ # getters
2409+
2410+ all = property(get_all)
2411+ pre_ws = property(get_pre_ws)
2412+ pre_comment = property(get_pre_comment)
2413+ definition = property(get_def)
2414+ key = property(get_key)
2415+ val = property(get_val)
2416+ post = property(get_post)
2417+
2418+ def __repr__(self):
2419+ return self.key
2420+
2421+class Junk(object):
2422+ '''
2423+ An almost-Entity, representing junk data that we didn't parse.
2424+ This way, we can signal bad content as stuff we don't understand.
2425+ And the either fix that, or report real bugs in localizations.
2426+ '''
2427+ junkid = 0
2428+ def __init__(self, contents, span):
2429+ self.contents = contents
2430+ self.span = span
2431+ self.pre_ws = self.pre_comment = self.definition = self.post = ''
2432+ self.__class__.junkid += 1
2433+ self.key = '_junk_%d_%d-%d' % (self.__class__.junkid, span[0], span[1])
2434+
2435+ # getter helpers
2436+
2437+ def get_all(self):
2438+ return self.contents[self.span[0] : self.span[1]]
2439+
2440+ # getters
2441+
2442+ all = property(get_all)
2443+ val = property(get_all)
2444+ def __repr__(self):
2445+ return self.key
2446+
2447+
2448+class Parser:
2449+ canMerge = True
2450+ def __init__(self):
2451+ if not hasattr(self, 'encoding'):
2452+ self.encoding = 'utf-8';
2453+ pass
2454+ def readFile(self, file):
2455+ f = codecs.open(file, 'r', self.encoding)
2456+ try:
2457+ self.contents = f.read()
2458+ except UnicodeDecodeError, e:
2459+ logging.getLogger('locales').error("Can't read file: " + file + '; ' + str(e))
2460+ self.contents = u''
2461+ f.close()
2462+ def readContents(self, contents):
2463+ (self.contents, length) = codecs.getdecoder(self.encoding)(contents)
2464+ def parse(self):
2465+ l = []
2466+ m = {}
2467+ for e in self:
2468+ m[e.key] = len(l)
2469+ l.append(e)
2470+ return (l, m)
2471+ def postProcessValue(self, val):
2472+ return val
2473+ def __iter__(self):
2474+ contents = self.contents
2475+ offset = 0
2476+ self.header = ''
2477+ self.footer = ''
2478+ h = self.reHeader.match(contents)
2479+ if h:
2480+ self.header = h.group()
2481+ offset = h.end()
2482+ entity, offset = self.getEntity(contents, offset)
2483+ while entity:
2484+ yield entity
2485+ entity, offset = self.getEntity(contents, offset)
2486+ f = self.reFooter.match(contents, offset)
2487+ if f:
2488+ self.footer = f.group()
2489+ offset = f.end()
2490+ if len(contents) > offset:
2491+ yield Junk(contents, (offset, len(contents)))
2492+ pass
2493+ def getEntity(self, contents, offset):
2494+ m = self.reKey.match(contents, offset)
2495+ if m:
2496+ offset = m.end()
2497+ entity = Entity(contents, self.postProcessValue,
2498+ *[m.span(i) for i in xrange(7)])
2499+ return (entity, offset)
2500+ m = self.reKey.search(contents, offset)
2501+ if m:
2502+ # we didn't match, but search, so there's junk between offset
2503+ # and start. We'll match() on the next turn
2504+ junkend = m.start()
2505+ return (Junk(contents, (offset, junkend)), junkend)
2506+ return (None, offset)
2507+
2508+def getParser(path):
2509+ for item in __constructors:
2510+ if re.search(item[0], path):
2511+ return item[1]
2512+ raise UserWarning, "Cannot find Parser"
2513+
2514+
2515+# Subgroups of the match will:
2516+# 1: pre white space
2517+# 2: pre comments
2518+# 3: entity definition
2519+# 4: entity key (name)
2520+# 5: entity value
2521+# 6: post comment (and white space) in the same line (dtd only)
2522+# <--[1]
2523+# <!-- pre comments --> <--[2]
2524+# <!ENTITY key "value"> <!-- comment -->
2525+#
2526+# <-------[3]---------><------[6]------>
2527+
2528+
2529+class DTDParser(Parser):
2530+ def __init__(self):
2531+ # http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-NameStartChar
2532+ #":" | [A-Z] | "_" | [a-z] |
2533+ # [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF]
2534+ # | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
2535+ # [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] |
2536+ # [#x10000-#xEFFFF]
2537+ CharMinusDash = u'\x09\x0A\x0D\u0020-\u002C\u002E-\uD7FF\uE000-\uFFFD'
2538+ XmlComment = '<!--(?:-?[%s])*?-->' % CharMinusDash
2539+ NameStartChar = u':A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF' + \
2540+ u'\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF'+\
2541+ u'\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD'
2542+ # + \U00010000-\U000EFFFF seems to be unsupported in python
2543+
2544+ # NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 |
2545+ # [#x0300-#x036F] | [#x203F-#x2040]
2546+ NameChar = NameStartChar + ur'\-\.0-9' + u'\xB7\u0300-\u036F\u203F-\u2040'
2547+ Name = '[' + NameStartChar + '][' + NameChar + ']*'
2548+ self.reKey = re.compile('(?:(\s*)((?:' + XmlComment + '\s*)*)(<!ENTITY\s+(' + Name + ')\s+(\"[^\"]*\"|\'[^\']*\')\s*>)([ \t]*(?:' + XmlComment + '\s*)*\n?)?)')
2549+ # add BOM to DTDs, details in bug 435002
2550+ self.reHeader = re.compile(u'^\ufeff?(\s*<!--.*LICENSE BLOCK([^-]+-)*[^-]+-->)?')
2551+ self.reFooter = re.compile('\s*(<!--([^-]+-)*[^-]+-->\s*)*$')
2552+ self.rePE = re.compile('(?:(\s*)((?:' + XmlComment + '\s*)*)(<!ENTITY\s+%\s+(' + Name + ')\s+SYSTEM\s+(\"[^\"]*\"|\'[^\']*\')\s*>\s*%' + Name + ';)([ \t]*(?:' + XmlComment + '\s*)*\n?)?)')
2553+ Parser.__init__(self)
2554+ def getEntity(self, contents, offset):
2555+ '''
2556+ Overload Parser.getEntity to special-case ParsedEntities.
2557+ Just check for a parsed entity if that method claims junk.
2558+
2559+ <!ENTITY % foo SYSTEM "url">
2560+ %foo;
2561+ '''
2562+ entity, inneroffset = Parser.getEntity(self, contents, offset)
2563+ if (entity and isinstance(entity, Junk)) or entity is None:
2564+ m = self.rePE.match(contents, offset)
2565+ if m:
2566+ inneroffset = m.end()
2567+ entity = Entity(contents, self.postProcessValue,
2568+ *[m.span(i) for i in xrange(7)])
2569+ return (entity, inneroffset)
2570+
2571+class PropertiesParser(Parser):
2572+ def __init__(self):
2573+ self.reKey = re.compile('^(\s*)((?:[#!].*?\n\s*)*)(([^#!\s\n][^=:\n]*?)\s*[:=][ \t]*((?:[^\\\\]|\\\\.)*?))([ \t]*$\n?)',re.M|re.S)
2574+ self.reHeader = re.compile('^\s*([#!].*LICENSE BLOCK.*\s*)([#!].*\s*)*')
2575+ self.reFooter = re.compile('\s*([#!].*\s*)*$')
2576+ self._post = re.compile('\\\\u([0-9a-fA-F]{4})')
2577+ Parser.__init__(self)
2578+ _arg_re = re.compile('%(?:(?P<cn>[0-9]+)\$)?(?P<width>[0-9]+)?(?:.(?P<pres>[0-9]+))?(?P<size>[hL]|(?:ll?))?(?P<type>[dciouxXefgpCSsn])')
2579+ def postProcessValue(self, val):
2580+ m = self._post.search(val)
2581+ if not m:
2582+ return val
2583+ while m:
2584+ uChar = unichr(int(m.group(1), 16))
2585+ val = val.replace(m.group(), uChar)
2586+ m = self._post.search(val)
2587+ return val
2588+
2589+class DefinesParser(Parser):
2590+ # can't merge, #unfilter needs to be the last item, which we don't support
2591+ canMerge = False
2592+ def __init__(self):
2593+ self.reKey = re.compile('^(\s*)((?:^#(?!define\s).*\s*)*)(#define[ \t]+(\w+)[ \t]+(.*?))([ \t]*$\n?)',re.M)
2594+ self.reHeader = re.compile('^\s*(#(?!define\s).*\s*)*')
2595+ self.reFooter = re.compile('\s*(#(?!define\s).*\s*)*$',re.M)
2596+ Parser.__init__(self)
2597+
2598+class IniParser(Parser):
2599+ '''
2600+ Parse files of the form:
2601+ # initial comment
2602+ [cat]
2603+ whitespace*
2604+ #comment
2605+ string=value
2606+ ...
2607+ '''
2608+ def __init__(self):
2609+ self.reHeader = re.compile('^(\s*[;#].*\n)*\[.+?\]\n', re.M)
2610+ self.reKey = re.compile('(\s*)((?:[;#].*\n\s*)*)((.+?)=(.*))(\n?)')
2611+ self.reFooter = re.compile('\s*')
2612+ Parser.__init__(self)
2613+
2614+
2615+DECL, COMMENT, START, END, CONTENT = range(5)
2616+
2617+class BookmarksParserInner(HTMLParser):
2618+
2619+ class Token(object):
2620+ _type = None
2621+ content = ''
2622+ def __str__(self):
2623+ return self.content
2624+ class DeclToken(Token):
2625+ _type = DECL
2626+ def __init__(self, decl):
2627+ self.content = decl
2628+ pass
2629+ def __str__(self):
2630+ return '<!%s>' % self.content
2631+ pass
2632+ class CommentToken(Token):
2633+ _type = COMMENT
2634+ def __init__(self, comment):
2635+ self.content = comment
2636+ pass
2637+ def __str__(self):
2638+ return '<!--%s-->' % self.content
2639+ pass
2640+ class StartToken(Token):
2641+ _type = START
2642+ def __init__(self, tag, attrs, content):
2643+ self.tag = tag
2644+ self.attrs = dict(attrs)
2645+ self.content = content
2646+ pass
2647+ pass
2648+ class EndToken(Token):
2649+ _type = END
2650+ def __init__(self, tag):
2651+ self.tag = tag
2652+ pass
2653+ def __str__(self):
2654+ return '</%s>' % self.tag.upper()
2655+ pass
2656+ class ContentToken(Token):
2657+ _type = CONTENT
2658+ def __init__(self, content):
2659+ self.content = content
2660+ pass
2661+ pass
2662+
2663+ def __init__(self):
2664+ HTMLParser.__init__(self)
2665+ self.tokens = []
2666+
2667+ def parse(self, contents):
2668+ self.tokens = []
2669+ self.feed(contents)
2670+ self.close()
2671+ return self.tokens
2672+
2673+ # Called when we hit an end DL tag to reset the folder selections
2674+ def handle_decl(self, decl):
2675+ self.tokens.append(self.DeclToken(decl))
2676+
2677+ # Called when we hit an end DL tag to reset the folder selections
2678+ def handle_comment(self, comment):
2679+ self.tokens.append(self.CommentToken(comment))
2680+
2681+ def handle_starttag(self, tag, attrs):
2682+ self.tokens.append(self.StartToken(tag, attrs, self.get_starttag_text()))
2683+
2684+ # Called when text data is encountered
2685+ def handle_data(self, data):
2686+ if self.tokens[-1]._type == CONTENT:
2687+ self.tokens[-1].content += data
2688+ else:
2689+ self.tokens.append(self.ContentToken(data))
2690+
2691+ def handle_charref(self, data):
2692+ self.handle_data('&#%s;' % data)
2693+
2694+ def handle_entityref(self, data):
2695+ self.handle_data('&%s;' % data)
2696+
2697+ # Called when we hit an end DL tag to reset the folder selections
2698+ def handle_endtag(self, tag):
2699+ self.tokens.append(self.EndToken(tag))
2700+
2701+class BookmarksParser(Parser):
2702+ canMerge = False
2703+
2704+ class BMEntity(object):
2705+ def __init__(self, key, val):
2706+ self.key = key
2707+ self.val = val
2708+
2709+ def __iter__(self):
2710+ p = BookmarksParserInner()
2711+ tks = p.parse(self.contents)
2712+ i = 0
2713+ k = []
2714+ for i in xrange(len(tks)):
2715+ t = tks[i]
2716+ if t._type == START:
2717+ k.append(t.tag)
2718+ keys = t.attrs.keys()
2719+ keys.sort()
2720+ for attrname in keys:
2721+ yield self.BMEntity('.'.join(k) + '.@' + attrname,
2722+ t.attrs[attrname])
2723+ if i + 1 < len(tks) and tks[i+1]._type == CONTENT:
2724+ i += 1
2725+ t = tks[i]
2726+ v = t.content.strip()
2727+ if v:
2728+ yield self.BMEntity('.'.join(k), v)
2729+ elif t._type == END:
2730+ k.pop()
2731+
2732+
2733+__constructors = [('\\.dtd$', DTDParser()),
2734+ ('\\.properties$', PropertiesParser()),
2735+ ('\\.ini$', IniParser()),
2736+ ('\\.inc$', DefinesParser()),
2737+ ('bookmarks\\.html$', BookmarksParser())]
2738
2739=== added file 'debian/compare-locales/lib/Mozilla/Paths.py'
2740--- debian/compare-locales/lib/Mozilla/Paths.py 1970-01-01 00:00:00 +0000
2741+++ debian/compare-locales/lib/Mozilla/Paths.py 2011-09-30 12:49:23 +0000
2742@@ -0,0 +1,409 @@
2743+# ***** BEGIN LICENSE BLOCK *****
2744+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
2745+#
2746+# The contents of this file are subject to the Mozilla Public License Version
2747+# 1.1 (the "License"); you may not use this file except in compliance with
2748+# the License. You may obtain a copy of the License at
2749+# http://www.mozilla.org/MPL/
2750+#
2751+# Software distributed under the License is distributed on an "AS IS" basis,
2752+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2753+# for the specific language governing rights and limitations under the
2754+# License.
2755+#
2756+# The Original Code is l10n test automation.
2757+#
2758+# The Initial Developer of the Original Code is
2759+# Mozilla Foundation
2760+# Portions created by the Initial Developer are Copyright (C) 2006
2761+# the Initial Developer. All Rights Reserved.
2762+#
2763+# Contributor(s):
2764+# Axel Hecht <l10n@mozilla.com>
2765+#
2766+# Alternatively, the contents of this file may be used under the terms of
2767+# either the GNU General Public License Version 2 or later (the "GPL"), or
2768+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2769+# in which case the provisions of the GPL or the LGPL are applicable instead
2770+# of those above. If you wish to allow use of your version of this file only
2771+# under the terms of either the GPL or the LGPL, and not to allow others to
2772+# use your version of this file under the terms of the MPL, indicate your
2773+# decision by deleting the provisions above and replace them with the notice
2774+# and other provisions required by the GPL or the LGPL. If you do not delete
2775+# the provisions above, a recipient may use your version of this file under
2776+# the terms of any one of the MPL, the GPL or the LGPL.
2777+#
2778+# ***** END LICENSE BLOCK *****
2779+
2780+import os.path
2781+import os
2782+from ConfigParser import ConfigParser, NoSectionError, NoOptionError
2783+from urlparse import urlparse, urljoin
2784+from urllib import pathname2url, url2pathname
2785+from urllib2 import urlopen
2786+from Mozilla.CompareLocales import defaultdict
2787+
2788+class L10nConfigParser(object):
2789+ '''Helper class to gather application information from ini files.
2790+
2791+ This class is working on synchronous open to read files or web data.
2792+ Subclass this and overwrite loadConfigs and addChild if you need async.
2793+ '''
2794+ def __init__(self, inipath, **kwargs):
2795+ """Constructor for L10nConfigParsers
2796+
2797+ inipath -- l10n.ini path
2798+ Optional keyword arguments are fowarded to the inner ConfigParser as
2799+ defaults.
2800+ """
2801+ if os.path.isabs(inipath):
2802+ self.inipath = 'file:%s' % pathname2url(inipath)
2803+ else:
2804+ pwdurl = 'file:%s/' % pathname2url(os.getcwd())
2805+ self.inipath = urljoin(pwdurl, inipath)
2806+ # l10n.ini files can import other l10n.ini files, store the
2807+ # corresponding L10nConfigParsers
2808+ self.children = []
2809+ # we really only care about the l10n directories described in l10n.ini
2810+ self.dirs = []
2811+ # optional defaults to be passed to the inner ConfigParser (unused?)
2812+ self.defaults = kwargs
2813+
2814+ def getDepth(self, cp):
2815+ '''Get the depth for the comparison from the parsed l10n.ini.
2816+
2817+ Overloadable to get the source depth for fennec and friends.
2818+ '''
2819+ try:
2820+ depth = cp.get('general', 'depth')
2821+ except:
2822+ depth = '.'
2823+ return depth
2824+
2825+ def getFilters(self):
2826+ '''Get the test functions from this ConfigParser and all children.
2827+
2828+ Only works with synchronous loads, used by compare-locales, which
2829+ is local anyway.
2830+ '''
2831+ filterurl = urljoin(self.inipath, 'filter.py')
2832+ try:
2833+ l = {}
2834+ execfile(url2pathname(urlparse(filterurl).path), {}, l)
2835+ if 'test' in l and callable(l['test']):
2836+ filters = [l['test']]
2837+ else:
2838+ filters = []
2839+ except:
2840+ filters = []
2841+
2842+ for c in self.children:
2843+ filters += c.getFilters()
2844+
2845+ return filters
2846+
2847+
2848+ def loadConfigs(self):
2849+ """Entry point to load the l10n.ini file this Parser refers to.
2850+
2851+ This implementation uses synchronous loads, subclasses might overload
2852+ this behaviour. If you do, make sure to pass a file-like object
2853+ to onLoadConfig.
2854+ """
2855+ self.onLoadConfig(urlopen(self.inipath))
2856+
2857+ def onLoadConfig(self, inifile):
2858+ """Parse a file-like object for the loaded l10n.ini file."""
2859+ cp = ConfigParser(self.defaults)
2860+ cp.readfp(inifile)
2861+ depth = self.getDepth(cp)
2862+ self.baseurl = urljoin(self.inipath, depth)
2863+ # create child loaders for any other l10n.ini files to be included
2864+ try:
2865+ for title, path in cp.items('includes'):
2866+ # skip default items
2867+ if title in self.defaults:
2868+ continue
2869+ # add child config parser
2870+ self.addChild(title, path, cp)
2871+ except NoSectionError:
2872+ pass
2873+ # try to load the "dirs" defined in the "compare" section
2874+ try:
2875+ self.dirs.extend(cp.get('compare', 'dirs').split())
2876+ except (NoOptionError, NoSectionError):
2877+ pass
2878+ # try getting a top level compare dir, as used for fennec
2879+ try:
2880+ self.tld = cp.get('compare', 'tld')
2881+ # remove tld from comparison dirs
2882+ if self.tld in self.dirs:
2883+ self.dirs.remove(self.tld)
2884+ except (NoOptionError, NoSectionError):
2885+ self.tld = None
2886+ # try to set "all_path" and "all_url"
2887+ try:
2888+ self.all_path = cp.get('general', 'all')
2889+ self.all_url = urljoin(self.baseurl, self.all_path)
2890+ except (NoOptionError, NoSectionError):
2891+ self.all_path = None
2892+ self.all_url = None
2893+ return cp
2894+
2895+ def addChild(self, title, path, orig_cp):
2896+ """Create a child L10nConfigParser and load it.
2897+
2898+ title -- indicates the module's name
2899+ path -- indicates the path to the module's l10n.ini file
2900+ orig_cp -- the configuration parser of this l10n.ini
2901+ """
2902+ cp = L10nConfigParser(urljoin(self.baseurl, path), **self.defaults)
2903+ cp.loadConfigs()
2904+ self.children.append(cp)
2905+
2906+ def getTLDPathsTuple(self, basepath):
2907+ """Given the basepath, return the path fragments to be used for
2908+ self.tld. For build runs, this is (basepath, self.tld), for
2909+ source runs, just (basepath,).
2910+
2911+ @see overwritten method in SourceTreeConfigParser.
2912+ """
2913+ return (basepath, self.tld)
2914+
2915+ def dirsIter(self):
2916+ """Iterate over all dirs and our base path for this l10n.ini"""
2917+ url = urlparse(self.baseurl)
2918+ basepath = url2pathname(url.path)
2919+ if self.tld is not None:
2920+ yield self.tld, self.getTLDPathsTuple(basepath)
2921+ for dir in self.dirs:
2922+ yield dir, (basepath, dir)
2923+
2924+
2925+ def directories(self):
2926+ """Iterate over all dirs and base paths for this l10n.ini as well
2927+ as the included ones.
2928+ """
2929+ for t in self.dirsIter():
2930+ yield t
2931+ for child in self.children:
2932+ for t in child.directories():
2933+ yield t
2934+
2935+ def allLocales(self):
2936+ """Return a list of all the locales of this project"""
2937+ return urlopen(self.all_url).read().splitlines()
2938+
2939+
2940+class SourceTreeConfigParser(L10nConfigParser):
2941+ '''Subclassing L10nConfigParser to work with just the repos
2942+ checked out next to each other instead of intermingled like
2943+ we do for real builds.
2944+ '''
2945+
2946+ def __init__(self, inipath, basepath):
2947+ '''Add additional arguments basepath.
2948+
2949+ basepath is used to resolve local paths via branchnames.
2950+ '''
2951+ L10nConfigParser.__init__(self, inipath)
2952+ self.basepath = basepath
2953+ self.tld = None
2954+
2955+ def getDepth(self, cp):
2956+ '''Get the depth for the comparison from the parsed l10n.ini.
2957+
2958+ Overloaded to get the source depth for fennec and friends.
2959+ '''
2960+ try:
2961+ depth = cp.get('general', 'source-depth')
2962+ except:
2963+ try:
2964+ depth = cp.get('general', 'depth')
2965+ except:
2966+ depth = '.'
2967+ return depth
2968+
2969+ def addChild(self, title, path, orig_cp):
2970+ # check if there's a section with details for this include
2971+ # we might have to check a different repo, or even VCS
2972+ # for example, projects like "mail" indicate in
2973+ # an "include_" section where to find the l10n.ini for "toolkit"
2974+ details = 'include_' + title
2975+ if orig_cp.has_section(details):
2976+ branch = orig_cp.get(details, 'mozilla')
2977+ inipath = orig_cp.get(details, 'l10n.ini')
2978+ path = self.basepath + '/' + branch + '/' + inipath
2979+ else:
2980+ path = urljoin(self.baseurl, path)
2981+ cp = SourceTreeConfigParser(path, self.basepath, **self.defaults)
2982+ cp.loadConfigs()
2983+ self.children.append(cp)
2984+
2985+ def getTLDPathsTuple(self, basepath):
2986+ """Overwrite L10nConfigParser's getTLDPathsTuple to just return
2987+ the basepath.
2988+ """
2989+ return (basepath, )
2990+
2991+
2992+class File(object):
2993+ def __init__(self, fullpath, file, module = None, locale = None):
2994+ self.fullpath = fullpath
2995+ self.file = file
2996+ self.module = module
2997+ self.locale = locale
2998+ pass
2999+ def getContents(self):
3000+ # open with universal line ending support and read
3001+ return open(self.fullpath, 'rU').read()
3002+ def __hash__(self):
3003+ f = self.file
3004+ if self.module:
3005+ f = self.module + '/' + f
3006+ return hash(f)
3007+ def __str__(self):
3008+ return self.fullpath
3009+ def __cmp__(self, other):
3010+ if not isinstance(other, File):
3011+ raise NotImplementedError
3012+ rv = cmp(self.module, other.module)
3013+ if rv != 0:
3014+ return rv
3015+ return cmp(self.file, other.file)
3016+
3017+class EnumerateDir(object):
3018+ ignore_dirs = ['CVS', '.svn', '.hg']
3019+ def __init__(self, basepath, module = '', locale = None):
3020+ self.basepath = basepath
3021+ self.module = module
3022+ self.locale = locale
3023+ pass
3024+ def cloneFile(self, other):
3025+ '''
3026+ Return a File object that this enumerator would return, if it had it.
3027+ '''
3028+ return File(os.path.join(self.basepath, other.file), other.file,
3029+ self.module, self.locale)
3030+ def __iter__(self):
3031+ # our local dirs are given as a tuple of path segments, starting off
3032+ # with an empty sequence for the basepath.
3033+ dirs = [()]
3034+ while dirs:
3035+ dir = dirs.pop(0)
3036+ fulldir = os.path.join(self.basepath, *dir)
3037+ try:
3038+ entries = os.listdir(fulldir)
3039+ except OSError:
3040+ # we probably just started off in a non-existing dir, ignore
3041+ continue
3042+ entries.sort()
3043+ for entry in entries:
3044+ leaf = os.path.join(fulldir, entry)
3045+ if os.path.isdir(leaf):
3046+ if entry not in self.ignore_dirs:
3047+ dirs.append(dir + (entry,))
3048+ continue
3049+ yield File(leaf, '/'.join(dir + (entry,)),
3050+ self.module, self.locale)
3051+
3052+class LocalesWrap(object):
3053+ def __init__(self, base, module, locales):
3054+ self.base = base
3055+ self.module = module
3056+ self.locales = locales
3057+ def __iter__(self):
3058+ for locale in self.locales:
3059+ path = os.path.join(self.base, locale, self.module)
3060+ yield (locale, EnumerateDir(path, self.module, locale))
3061+
3062+class EnumerateApp(object):
3063+ reference = 'en-US'
3064+ def __init__(self, inipath, l10nbase, locales = None):
3065+ self.setupConfigParser(inipath)
3066+ self.modules = defaultdict(dict)
3067+ self.l10nbase = os.path.abspath(l10nbase)
3068+ self.filters = []
3069+ drive, tail = os.path.splitdrive(inipath)
3070+ filterpath = drive + url2pathname(urlparse(urljoin(tail,'filter.py'))[2])
3071+ self.addFilters(*self.config.getFilters())
3072+ self.locales = locales or self.config.allLocales()
3073+ self.locales.sort()
3074+ pass
3075+ def setupConfigParser(self, inipath):
3076+ self.config = L10nConfigParser(inipath)
3077+ self.config.loadConfigs()
3078+ def addFilters(self, *args):
3079+ self.filters += args
3080+
3081+ value_map = {None:None, 'error':0, 'ignore':1, 'report':2}
3082+ def filter(self, l10n_file, entity = None):
3083+ '''Go through all added filters, and,
3084+ - map "error" -> 0, "ignore" -> 1, "report" -> 2
3085+ - if filter.test returns a bool, map that to
3086+ False -> "ignore" (1), True -> "error" (0)
3087+ - take the max of all reported
3088+ '''
3089+ rv = 0
3090+ for f in reversed(self.filters):
3091+ try:
3092+ _r = f(l10n_file.module, l10n_file.file, entity)
3093+ except:
3094+ # XXX error handling
3095+ continue
3096+ if isinstance(_r, bool):
3097+ _r = [1, 0][_r]
3098+ else:
3099+ # map string return value to int, default to 'error', None is None
3100+ _r = self.value_map.get(_r, 0)
3101+ if _r is not None:
3102+ rv = max(rv, _r)
3103+ return ['error','ignore','report'][rv]
3104+
3105+ def __iter__(self):
3106+ '''
3107+ Iterate over all modules, return en-US directory enumerator, and an
3108+ iterator over all locales in each iteration. Per locale, the locale
3109+ code and an directory enumerator will be given.
3110+ '''
3111+ dirmap = dict(self.config.directories())
3112+ mods = dirmap.keys()
3113+ mods.sort()
3114+ for mod in mods:
3115+ if self.reference == 'en-US':
3116+ base = os.path.join(*(dirmap[mod] + ('locales', 'en-US')))
3117+ else:
3118+ base = os.path.join(self.l10nbase, self.reference, mod)
3119+ yield (mod, EnumerateDir(base, mod, self.reference),
3120+ LocalesWrap(self.l10nbase, mod, self.locales))
3121+
3122+
3123+class EnumerateSourceTreeApp(EnumerateApp):
3124+ '''Subclass EnumerateApp to work on side-by-side checked out
3125+ repos, and to no pay attention to how the source would actually
3126+ be checked out for building.
3127+
3128+ It's supporting applications like Fennec, too, which have
3129+ 'locales/en-US/...' in their root dir, but claim to be 'mobile'.
3130+ '''
3131+
3132+ def __init__(self, inipath, basepath, l10nbase, locales=None):
3133+ self.basepath = basepath
3134+ EnumerateApp.__init__(self, inipath, l10nbase, locales)
3135+
3136+ def setupConfigParser(self, inipath):
3137+ self.config = SourceTreeConfigParser(inipath, self.basepath)
3138+ self.config.loadConfigs()
3139+
3140+
3141+def get_base_path(mod, loc):
3142+ 'statics for path patterns and conversion'
3143+ __l10n = 'l10n/%(loc)s/%(mod)s'
3144+ __en_US = 'mozilla/%(mod)s/locales/en-US'
3145+ if loc == 'en-US':
3146+ return __en_US % {'mod': mod}
3147+ return __l10n % {'mod': mod, 'loc': loc}
3148+
3149+def get_path(mod, loc, leaf):
3150+ return get_base_path(mod, loc) + '/' + leaf
3151+
3152
3153=== added file 'debian/compare-locales/lib/Mozilla/Tests.py'
3154--- debian/compare-locales/lib/Mozilla/Tests.py 1970-01-01 00:00:00 +0000
3155+++ debian/compare-locales/lib/Mozilla/Tests.py 2011-09-30 12:49:23 +0000
3156@@ -0,0 +1,394 @@
3157+# ***** BEGIN LICENSE BLOCK *****
3158+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
3159+#
3160+# The contents of this file are subject to the Mozilla Public License Version
3161+# 1.1 (the "License"); you may not use this file except in compliance with
3162+# the License. You may obtain a copy of the License at
3163+# http://www.mozilla.org/MPL/
3164+#
3165+# Software distributed under the License is distributed on an "AS IS" basis,
3166+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3167+# for the specific language governing rights and limitations under the
3168+# License.
3169+#
3170+# The Original Code is l10n test automation.
3171+#
3172+# The Initial Developer of the Original Code is
3173+# Mozilla Foundation
3174+# Portions created by the Initial Developer are Copyright (C) 2006
3175+# the Initial Developer. All Rights Reserved.
3176+#
3177+# Contributor(s):
3178+# Axel Hecht <l10n@mozilla.com>
3179+#
3180+# Alternatively, the contents of this file may be used under the terms of
3181+# either the GNU General Public License Version 2 or later (the "GPL"), or
3182+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3183+# in which case the provisions of the GPL or the LGPL are applicable instead
3184+# of those above. If you wish to allow use of your version of this file only
3185+# under the terms of either the GPL or the LGPL, and not to allow others to
3186+# use your version of this file under the terms of the MPL, indicate your
3187+# decision by deleting the provisions above and replace them with the notice
3188+# and other provisions required by the GPL or the LGPL. If you do not delete
3189+# the provisions above, a recipient may use your version of this file under
3190+# the terms of any one of the MPL, the GPL or the LGPL.
3191+#
3192+# ***** END LICENSE BLOCK *****
3193+
3194+import logging
3195+import Paths
3196+import Parser
3197+
3198+def getRegionProperties(loc):
3199+ regprop = Paths.get_path('browser', loc,
3200+ 'chrome/browser-region/region.properties')
3201+ p = Parser.getParser(regprop)
3202+ f = Paths.File(regprop, 'chrome/browser-region/region.properties')
3203+ p.readContents(f.getContents())
3204+ return p
3205+
3206+class Base:
3207+ '''Base class for all tests'''
3208+ def __init__(self):
3209+ if not hasattr(self, 'leafName'):
3210+ self.leafName = 'TODO'
3211+ logging.warning(' ' + self + ' does not have leafName set, writing to TODO')
3212+ def run(self):
3213+ '''Run this test for all locales, returns a dictionary with results'''
3214+ pass
3215+ def serialize(self, result, saveHandler):
3216+ '''Serialize the previously generated result, writes the dictionary
3217+ by default'''
3218+ return saveHandler(result, self.leafName)
3219+ pass
3220+ def failureTest(self, myResult, failureResult):
3221+ pass
3222+
3223+import CompareLocales
3224+class CompareTest(Base):
3225+ '''Test class to compare locales'''
3226+ def __init__(self):
3227+ '''Initializes the test object'''
3228+ # nothing to be done here
3229+ self.apps = ['browser', 'mail']
3230+ pass
3231+ def run(self):
3232+ '''Runs CompareLocales.compareApp()'''
3233+ app = Paths.EnumerateApp()
3234+ for appname in self.apps:
3235+ app.addApplication(appname)
3236+ return CompareLocales.compareApp(app)
3237+ def serialize(self, result, saveHandler):
3238+ '''Serialize the CompareLocales result by locale into
3239+ cmp-details-ab-CD
3240+ and a compacted version into
3241+ cmp-data
3242+
3243+ '''
3244+ #for locale, stats in result.details:
3245+ # assert locale is not None
3246+ # saveHandler(foo, 'cmp-details-%s.json' % locale)
3247+ saveHandler(result.summary, 'cmp-data.json')
3248+
3249+ def failureTest(self, myResult, failureResult):
3250+ '''signal pass/warn/failure for each locale'''
3251+ def sumdata(data, part):
3252+ res = 0
3253+ for mod in [u'browser', u'toolkit']:
3254+ res += data[part][mod] + data[part + u'Files'][mod]
3255+ return res
3256+ def getState(data):
3257+ ret = 0
3258+ if sumdata(data, u'obsolete') > 0:
3259+ ret |= 1
3260+ if sumdata(data, u'missing') > 0:
3261+ ret |= 2
3262+ return ret
3263+ for loc, val in myResult.iteritems():
3264+ if not failureResult.has_key(loc):
3265+ failureResult[loc] = getState(val)
3266+ else:
3267+ failureResult |= getState(val)
3268+
3269+from xml import sax
3270+from types import DictType, FunctionType
3271+import md5
3272+from codecs import utf_8_encode
3273+import re
3274+import os
3275+
3276+class SearchTest(Base):
3277+ """Test class to collect information from search plugins and to
3278+ verify that they're doing something good.
3279+
3280+ """
3281+ def __init__(self):
3282+ '''Set up the test class with a good leaf name'''
3283+ self.leafName = 'search-results.json'
3284+ pass
3285+ def run(self):
3286+ '''Collect all data from the MozSearch plugins in both the /cvsroot
3287+ repository for en-US and the /l10n repository for locales
3288+
3289+ '''
3290+ class DummyHandler(sax.handler.ContentHandler):
3291+ def startDocument(self):
3292+ self.md5 = md5.new()
3293+ self.indent = ''
3294+ self.engine = {'urls':[]}
3295+ self.lNames = []
3296+ self.textField = None
3297+ self.content = ''
3298+ return
3299+ def endDocument(self):
3300+ self.engine['md5'] = self.md5.hexdigest()
3301+ return
3302+ def startElementNS(self, (ns, local), qname, attrs):
3303+ if self.textField:
3304+ logging.warning('Found Element, but expected CDATA.')
3305+ self.indent += ' '
3306+ if ns != u'http://www.mozilla.org/2006/browser/search/':
3307+ raise UserWarning, ('bad namespace: ' + ns)
3308+ self.lNames.append(local)
3309+ handler = self.getOpenHandler()
3310+ if handler:
3311+ handler(self, attrs)
3312+ self.update(ns+local)
3313+ for qna in attrs.getQNames():
3314+ self.update(qna[0] + qna[1] + attrs.getValueByQName(qna))
3315+ return
3316+ def endElementNS(self, (ns, local), qname):
3317+ if self.textField:
3318+ self.engine[self.textField] = self.content
3319+ self.textField = None
3320+ self.content = ''
3321+ self.lNames.pop()
3322+ self.indent = self.indent[0:-2]
3323+ def characters(self, content):
3324+ self.update(content)
3325+ if not self.textField:
3326+ return
3327+ self.content += content
3328+ def update(self, content):
3329+ self.md5.update(utf_8_encode(content)[0])
3330+ def openURL(self, attrs):
3331+ entry = {'params':{},
3332+ 'type': attrs.getValueByQName(u'type'),
3333+ 'template': attrs.getValueByQName(u'template')}
3334+ self.engine['urls'].append(entry)
3335+ def handleParam(self, attrs):
3336+ try:
3337+ self.engine['urls'][-1]['params'][attrs.getValueByQName(u'name')] = attrs.getValueByQName(u'value')
3338+ except KeyError:
3339+ raise UserWarning, 'bad param'
3340+ return
3341+ def handleMozParam(self, attrs):
3342+ mp = None
3343+ try:
3344+ mp = { 'name': attrs.getValueByQName(u'name'),
3345+ 'condition': attrs.getValueByQName(u'condition'),
3346+ 'trueValue': attrs.getValueByQName(u'trueValue'),
3347+ 'falseValue': attrs.getValueByQName(u'falseValue')}
3348+ except KeyError:
3349+ try:
3350+ mp = {'name': attrs.getValueByQName(u'name'),
3351+ 'condition': attrs.getValueByQName(u'condition'),
3352+ 'pref': attrs.getValueByQName(u'pref')}
3353+ except KeyError:
3354+ raise UserWarning, 'bad mozParam'
3355+ if self.engine['urls'][-1].has_key('MozParams'):
3356+ self.engine['urls'][-1]['MozParams'].append(mp)
3357+ else:
3358+ self.engine['urls'][-1]['MozParams'] = [mp]
3359+ return
3360+ def handleShortName(self, attrs):
3361+ self.textField = 'ShortName'
3362+ return
3363+ def handleImage(self, attrs):
3364+ self.textField = 'Image'
3365+ return
3366+ def getOpenHandler(self):
3367+ return self.getHandler(DummyHandler.openHandlers)
3368+ def getHandler(self, handlers):
3369+ for local in self.lNames:
3370+ if type(handlers) != DictType or not handlers.has_key(local):
3371+ return
3372+ handlers = handlers[local]
3373+ if handlers.has_key('_handler'):
3374+ return handlers['_handler']
3375+ return
3376+ openHandlers = {'SearchPlugin':
3377+ {'ShortName': {'_handler': handleShortName},
3378+ 'Image': {'_handler': handleImage},
3379+ 'Url':{'_handler': openURL,
3380+ 'Param': {'_handler':handleParam},
3381+ 'MozParam': {'_handler':handleMozParam}
3382+ }
3383+ }
3384+ }
3385+
3386+ handler = DummyHandler()
3387+ parser = sax.make_parser()
3388+ parser.setContentHandler(handler)
3389+ parser.setFeature(sax.handler.feature_namespaces, True)
3390+
3391+ locales = [loc.strip() for loc in open('mozilla/browser/locales/all-locales')]
3392+ locales.insert(0, 'en-US')
3393+ sets = {}
3394+ details = {}
3395+
3396+ for loc in locales:
3397+ l = logging.getLogger('locales.' + loc)
3398+ try:
3399+ lst = open(Paths.get_path('browser',loc,'searchplugins/list.txt'),'r')
3400+ except IOError:
3401+ l.error("Locale " + loc + " doesn't have search plugins")
3402+ details[Paths.get_path('browser',loc,'searchplugins/list.txt')] = {
3403+ 'error': 'not found'
3404+ }
3405+ continue
3406+ sets[loc] = {'list': []}
3407+ p = getRegionProperties(loc)
3408+ orders = {}
3409+ for entity in p:
3410+ m = re.match('browser.search.order.([1-9])', entity.key)
3411+ if m:
3412+ orders[entity.val.strip()] = int(m.group(1))
3413+ elif entity.key == 'browser.search.defaultenginename':
3414+ sets[loc]['default'] = entity.val.strip()
3415+ sets[loc]['orders'] = orders
3416+ for fn in lst:
3417+ name = fn.strip()
3418+ if len(name) == 0:
3419+ continue
3420+ leaf = 'searchplugins/' + name + '.xml'
3421+ _path = Paths.get_path('browser','en-US', leaf)
3422+ if not os.access(_path, os.R_OK):
3423+ _path = Paths.get_path('browser', loc, leaf)
3424+ l.debug('testing ' + _path)
3425+ sets[loc]['list'].append(_path)
3426+ try:
3427+ parser.parse(_path)
3428+ except IOError:
3429+ l.error("can't open " + _path)
3430+ details[_path] = {'_name': name, 'error': 'not found'}
3431+ continue
3432+ except UserWarning, ex:
3433+ l.error("error in searchplugin " + _path)
3434+ details[_path] = {'_name': name, 'error': ex.args[0]}
3435+ continue
3436+ except sax._exceptions.SAXParseException, ex:
3437+ l.error("error in searchplugin " + _path)
3438+ details[_path] = {'_name': name, 'error': ex.args[0]}
3439+ continue
3440+ details[_path] = handler.engine
3441+ details[_path]['_name'] = name
3442+
3443+ engines = {'locales': sets,
3444+ 'details': details}
3445+ return engines
3446+ def failureTest(self, myResult, failureResult):
3447+ '''signal pass/warn/failure for each locale
3448+ Just signaling errors in individual plugins for now.
3449+
3450+ '''
3451+ for loc, val in myResult['locales'].iteritems():
3452+ l = logging.getLogger('locales.' + loc)
3453+ # Verify that there are no errors in the engine parsing,
3454+ # and that there default engine is the first one.
3455+ if (not val['orders'].has_key(val['default'])) or val['orders'][val['default']] != 1:
3456+ l.error('Default engine is not first in order in locale ' + loc)
3457+ if not failureResult.has_key(loc):
3458+ failureResult[loc] = 2
3459+ else:
3460+ failureResult[loc] |= 2
3461+ for p in val['list']:
3462+ # no logging, that is already reported above
3463+ if myResult['details'][p].has_key('error'):
3464+ if not failureResult.has_key(loc):
3465+ failureResult[loc] = 2
3466+ else:
3467+ failureResult[loc] |= 2
3468+
3469+class RSSReaderTest(Base):
3470+ """Test class to collect information about RSS readers and to
3471+ verify that they might be working.
3472+
3473+ """
3474+ def __init__(self):
3475+ '''Set up the test class with a good leaf name'''
3476+ self.leafName = 'feed-reader-results.json'
3477+ pass
3478+ def run(self):
3479+ '''Collect the data from browsers region.properties for all locales
3480+
3481+ '''
3482+ locales = [loc.strip() for loc in open('mozilla/browser/locales/all-locales')]
3483+ uri = re.compile('browser\\.contentHandlers\\.types\\.([0-5])\\.uri')
3484+ title = re.compile('browser\\.contentHandlers\\.types\\.([0-5])\\.title')
3485+ res = {}
3486+ for loc in locales:
3487+ l = logging.getLogger('locales.' + loc)
3488+ p = getRegionProperties(loc)
3489+ uris = {}
3490+ titles = {}
3491+ for entity in p:
3492+ key = entity.key
3493+ val = entity.val
3494+ m = uri.match(key)
3495+ if m:
3496+ o = int(m.group(1))
3497+ if uris.has_key(o):
3498+ l.error('Double definition of RSS reader ' + o)
3499+ uris[o] = val.strip()
3500+ else:
3501+ m = title.match(key)
3502+ if m:
3503+ o = int(m.group(1))
3504+ if titles.has_key(o):
3505+ l.error('Double definition of RSS reader ' + o)
3506+ titles[o] = val.strip()
3507+ ind = sorted(uris.keys())
3508+ if ind != range(len(ind)) or ind != sorted(titles.keys()):
3509+ l.error('RSS Readers are badly set up')
3510+ res[loc] = [(titles[o], uris[o]) for o in ind]
3511+ return res
3512+
3513+class BookmarksTest(Base):
3514+ """Test class to collect information about bookmarks and check their
3515+ structure.
3516+
3517+ """
3518+ def __init__(self):
3519+ '''Set up the test class with a good leaf name'''
3520+ self.leafName = 'bookmarks-results.json'
3521+ pass
3522+ def run(self):
3523+ '''Collect the data from bookmarks.html for all locales
3524+
3525+ '''
3526+ locales = [loc.strip() for loc in open('mozilla/browser/locales/all-locales')]
3527+ bm = Parser.BookmarksParser()
3528+ res = {}
3529+ for loc in locales:
3530+ try:
3531+ bm.readFile('l10n/%s/browser/profile/bookmarks.html'%loc)
3532+ res[loc] = bm.getDetails()
3533+ except Exception, e:
3534+ logging.getLogger('locale.%s'%loc).error('Bookmarks are busted, %s'%e)
3535+ return res
3536+ def failureTest(self, myResult, failureResult):
3537+ '''signal pass/warn/failure for each locale
3538+ Just signaling errors for now.
3539+
3540+ '''
3541+ locales = [loc.strip() for loc in open('mozilla/browser/locales/all-locales')]
3542+ bm = Parser.BookmarksParser()
3543+ bm.read('mozilla/browser/locales/en-US/profile/bookmarks.html')
3544+ enUSDetails = bm.getDetails()
3545+ for loc in locales:
3546+ if not myResult.has_key(loc):
3547+ if not failureResult.has_key(loc):
3548+ failureResult[loc] = 2
3549+ else:
3550+ failureResult[loc] |= 2
3551
3552=== added file 'debian/compare-locales/lib/Mozilla/__init__.py'
3553--- debian/compare-locales/lib/Mozilla/__init__.py 1970-01-01 00:00:00 +0000
3554+++ debian/compare-locales/lib/Mozilla/__init__.py 2011-09-30 12:49:23 +0000
3555@@ -0,0 +1,1 @@
3556+version="0.8.2"
3557
3558=== added directory 'debian/compare-locales/scripts'
3559=== added file 'debian/compare-locales/scripts/compare-dirs'
3560--- debian/compare-locales/scripts/compare-dirs 1970-01-01 00:00:00 +0000
3561+++ debian/compare-locales/scripts/compare-dirs 2011-09-30 12:49:23 +0000
3562@@ -0,0 +1,76 @@
3563+#! python
3564+# ***** BEGIN LICENSE BLOCK *****
3565+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
3566+#
3567+# The contents of this file are subject to the Mozilla Public License Version
3568+# 1.1 (the "License"); you may not use this file except in compliance with
3569+# the License. You may obtain a copy of the License at
3570+# http://www.mozilla.org/MPL/
3571+#
3572+# Software distributed under the License is distributed on an "AS IS" basis,
3573+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3574+# for the specific language governing rights and limitations under the
3575+# License.
3576+#
3577+# The Original Code is l10n test automation.
3578+#
3579+# The Initial Developer of the Original Code is
3580+# Mozilla Foundation
3581+# Portions created by the Initial Developer are Copyright (C) 2006
3582+# the Initial Developer. All Rights Reserved.
3583+#
3584+# Contributor(s):
3585+# Axel Hecht <l10n@mozilla.com>
3586+#
3587+# Alternatively, the contents of this file may be used under the terms of
3588+# either the GNU General Public License Version 2 or later (the "GPL"), or
3589+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3590+# in which case the provisions of the GPL or the LGPL are applicable instead
3591+# of those above. If you wish to allow use of your version of this file only
3592+# under the terms of either the GPL or the LGPL, and not to allow others to
3593+# use your version of this file under the terms of the MPL, indicate your
3594+# decision by deleting the provisions above and replace them with the notice
3595+# and other provisions required by the GPL or the LGPL. If you do not delete
3596+# the provisions above, a recipient may use your version of this file under
3597+# the terms of any one of the MPL, the GPL or the LGPL.
3598+#
3599+# ***** END LICENSE BLOCK *****
3600+
3601+
3602+import logging
3603+from optparse import OptionParser
3604+import codecs
3605+
3606+from Mozilla.CompareLocales import compareDirs
3607+
3608+usage = 'usage: %prog [options] reference locale'
3609+parser = OptionParser(usage=usage)
3610+
3611+parser.add_option('-v', '--verbose', action='count', dest='v', default=0,
3612+ help='Make more noise')
3613+parser.add_option('-q', '--quiet', action='count', dest='q', default=0,
3614+ help='Make more noise')
3615+parser.add_option('-m', '--merge',
3616+ help='Use this directory to stage merged files')
3617+
3618+(options, args) = parser.parse_args()
3619+if len(args) != 2:
3620+ parser.error('Reference and language required')
3621+
3622+# log as verbose or quiet as we want, warn by default
3623+logging.basicConfig()
3624+logging.getLogger().setLevel(logging.WARNING - (options.v - options.q)*10)
3625+
3626+reference, locale = args
3627+o = compareDirs(reference, locale, merge_stage = options.merge)
3628+print codecs.utf_8_encode(o.serialize())[0]
3629+
3630+if not options.merge:
3631+ # if not merging, error on really missing strings
3632+ totalMissing = 0
3633+ for k in ('missing', 'missingInFiles'):
3634+ for summary in o.summary.values():
3635+ if k in summary:
3636+ totalMissing = summary[k]
3637+ if totalMissing:
3638+ parser.exit(1)
3639
3640=== added file 'debian/compare-locales/scripts/compare-locales'
3641--- debian/compare-locales/scripts/compare-locales 1970-01-01 00:00:00 +0000
3642+++ debian/compare-locales/scripts/compare-locales 2011-09-30 12:49:23 +0000
3643@@ -0,0 +1,85 @@
3644+#! /usr/bin/python
3645+# ***** BEGIN LICENSE BLOCK *****
3646+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
3647+#
3648+# The contents of this file are subject to the Mozilla Public License Version
3649+# 1.1 (the "License"); you may not use this file except in compliance with
3650+# the License. You may obtain a copy of the License at
3651+# http://www.mozilla.org/MPL/
3652+#
3653+# Software distributed under the License is distributed on an "AS IS" basis,
3654+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3655+# for the specific language governing rights and limitations under the
3656+# License.
3657+#
3658+# The Original Code is l10n test automation.
3659+#
3660+# The Initial Developer of the Original Code is
3661+# Mozilla Foundation
3662+# Portions created by the Initial Developer are Copyright (C) 2006
3663+# the Initial Developer. All Rights Reserved.
3664+#
3665+# Contributor(s):
3666+# Axel Hecht <l10n@mozilla.com>
3667+#
3668+# Alternatively, the contents of this file may be used under the terms of
3669+# either the GNU General Public License Version 2 or later (the "GPL"), or
3670+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3671+# in which case the provisions of the GPL or the LGPL are applicable instead
3672+# of those above. If you wish to allow use of your version of this file only
3673+# under the terms of either the GPL or the LGPL, and not to allow others to
3674+# use your version of this file under the terms of the MPL, indicate your
3675+# decision by deleting the provisions above and replace them with the notice
3676+# and other provisions required by the GPL or the LGPL. If you do not delete
3677+# the provisions above, a recipient may use your version of this file under
3678+# the terms of any one of the MPL, the GPL or the LGPL.
3679+#
3680+# ***** END LICENSE BLOCK *****
3681+
3682+
3683+import logging
3684+from optparse import OptionParser
3685+import codecs
3686+
3687+from Mozilla.Paths import EnumerateApp
3688+from Mozilla.CompareLocales import compareApp
3689+from Mozilla import version
3690+
3691+usage = 'usage: %prog [options] l10n.ini l10n_base_dir language1 [language2 ...]'
3692+parser = OptionParser(usage = usage, version = "%%prog %s" % version)
3693+
3694+parser.add_option('-v', '--verbose', action='count', dest='v', default=0,
3695+ help='Make more noise')
3696+parser.add_option('-q', '--quiet', action='count', dest='q', default=0,
3697+ help='Make more noise')
3698+parser.add_option('-r', '--reference', default='en-US', dest='reference',
3699+ help='Explicitly set the reference '+
3700+ 'localization. [default: en-US]')
3701+parser.add_option('-m', '--merge',
3702+ help='Use this directory to stage merged files')
3703+
3704+(options, args) = parser.parse_args()
3705+if len(args) < 3:
3706+ parser.error('At least one language required')
3707+inipath, l10nbase = args[:2]
3708+locales = args[2:]
3709+
3710+# log as verbose or quiet as we want, warn by default
3711+logging.basicConfig()
3712+logging.getLogger().setLevel(logging.WARNING - (options.v - options.q)*10)
3713+
3714+app = EnumerateApp(inipath, l10nbase, locales)
3715+app.reference = options.reference
3716+
3717+o = compareApp(app, merge_stage = options.merge)
3718+print codecs.utf_8_encode(o.serialize())[0]
3719+
3720+if not options.merge:
3721+ # if not merging, error on really missing strings
3722+ totalMissing = 0
3723+ for k in ('missing', 'missingInFiles'):
3724+ for summary in o.summary.values():
3725+ if k in summary:
3726+ totalMissing = summary[k]
3727+ if totalMissing:
3728+ parser.exit(1)
3729
3730=== added file 'debian/compare-locales/scripts/compare-packs'
3731--- debian/compare-locales/scripts/compare-packs 1970-01-01 00:00:00 +0000
3732+++ debian/compare-locales/scripts/compare-packs 2011-09-30 12:49:23 +0000
3733@@ -0,0 +1,69 @@
3734+#! python
3735+# ***** BEGIN LICENSE BLOCK *****
3736+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
3737+#
3738+# The contents of this file are subject to the Mozilla Public License Version
3739+# 1.1 (the "License"); you may not use this file except in compliance with
3740+# the License. You may obtain a copy of the License at
3741+# http://www.mozilla.org/MPL/
3742+#
3743+# Software distributed under the License is distributed on an "AS IS" basis,
3744+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3745+# for the specific language governing rights and limitations under the
3746+# License.
3747+#
3748+# The Original Code is l10n test automation.
3749+#
3750+# The Initial Developer of the Original Code is
3751+# Mozilla Foundation
3752+# Portions created by the Initial Developer are Copyright (C) 2007
3753+# the Initial Developer. All Rights Reserved.
3754+#
3755+# Contributor(s):
3756+# Axel Hecht <l10n@mozilla.com>
3757+#
3758+# Alternatively, the contents of this file may be used under the terms of
3759+# either the GNU General Public License Version 2 or later (the "GPL"), or
3760+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3761+# in which case the provisions of the GPL or the LGPL are applicable instead
3762+# of those above. If you wish to allow use of your version of this file only
3763+# under the terms of either the GPL or the LGPL, and not to allow others to
3764+# use your version of this file under the terms of the MPL, indicate your
3765+# decision by deleting the provisions above and replace them with the notice
3766+# and other provisions required by the GPL or the LGPL. If you do not delete
3767+# the provisions above, a recipient may use your version of this file under
3768+# the terms of any one of the MPL, the GPL or the LGPL.
3769+#
3770+# ***** END LICENSE BLOCK *****
3771+
3772+
3773+import logging
3774+import os.path
3775+import re
3776+from optparse import OptionParser
3777+from pprint import pprint
3778+from zipfile import ZipFile
3779+
3780+from Mozilla.Jars import compareJars
3781+
3782+usage = 'usage: %prog [options] language-pack reference-pack'
3783+parser = OptionParser(usage=usage)
3784+
3785+parser.add_option('-v', '--verbose', action='count', dest='v', default=0,
3786+ help='Report more detail')
3787+parser.add_option('-q', '--quiet', action='count', dest='q', default=0,
3788+ help='Report less detail')
3789+
3790+(options, args) = parser.parse_args()
3791+if len(args) != 2:
3792+ parser.error('language pack and reference pack required')
3793+
3794+# log as verbose or quiet as we want, warn by default
3795+logging.basicConfig(level=(logging.WARNING - (options.v - options.q)*10))
3796+
3797+# we expect two jar files
3798+if not (args[0].endswith('.jar') and args[1].endswith('.jar')):
3799+ parser.error('Please specify two jar files to compare')
3800+
3801+o = compareJars(*args)
3802+print o.serialize()
3803
3804=== added file 'debian/compare-locales/scripts/test-locales'
3805--- debian/compare-locales/scripts/test-locales 1970-01-01 00:00:00 +0000
3806+++ debian/compare-locales/scripts/test-locales 2011-09-30 12:49:23 +0000
3807@@ -0,0 +1,245 @@
3808+#! python
3809+# ***** BEGIN LICENSE BLOCK *****
3810+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
3811+#
3812+# The contents of this file are subject to the Mozilla Public License Version
3813+# 1.1 (the "License"); you may not use this file except in compliance with
3814+# the License. You may obtain a copy of the License at
3815+# http://www.mozilla.org/MPL/
3816+#
3817+# Software distributed under the License is distributed on an "AS IS" basis,
3818+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3819+# for the specific language governing rights and limitations under the
3820+# License.
3821+#
3822+# The Original Code is l10n test automation.
3823+#
3824+# The Initial Developer of the Original Code is
3825+# Mozilla Foundation
3826+# Portions created by the Initial Developer are Copyright (C) 2006
3827+# the Initial Developer. All Rights Reserved.
3828+#
3829+# Contributor(s):
3830+# Axel Hecht <l10n@mozilla.com>
3831+#
3832+# Alternatively, the contents of this file may be used under the terms of
3833+# either the GNU General Public License Version 2 or later (the "GPL"), or
3834+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3835+# in which case the provisions of the GPL or the LGPL are applicable instead
3836+# of those above. If you wish to allow use of your version of this file only
3837+# under the terms of either the GPL or the LGPL, and not to allow others to
3838+# use your version of this file under the terms of the MPL, indicate your
3839+# decision by deleting the provisions above and replace them with the notice
3840+# and other provisions required by the GPL or the LGPL. If you do not delete
3841+# the provisions above, a recipient may use your version of this file under
3842+# the terms of any one of the MPL, the GPL or the LGPL.
3843+#
3844+# ***** END LICENSE BLOCK *****
3845+
3846+
3847+import logging
3848+import sys
3849+import os
3850+import os.path
3851+from datetime import datetime
3852+import time
3853+from optparse import OptionParser
3854+import gzip
3855+import codecs
3856+
3857+from Mozilla import Parser, CompareLocales, Paths, Tests
3858+import simplejson
3859+
3860+#
3861+# Helper classes
3862+#
3863+
3864+#
3865+# Logging
3866+#
3867+class LogHandler(logging.Handler):
3868+ def __init__(self):
3869+ self.log = []
3870+ logging.Handler.__init__(self)
3871+ def emit(self, record):
3872+ self.log.append((record.name, record.levelname, record.getMessage().strip()))
3873+
3874+#
3875+# JSON with optional gzip
3876+#
3877+class Wrapper:
3878+ def __init__(self, path, name):
3879+ self.p = os.path.join(path, name)
3880+ self.n = name
3881+ self.f = None
3882+ if opts.gzip:
3883+ self.p += '.gz'
3884+ def open(self, mode):
3885+ if self.f:
3886+ self.f.close()
3887+ if opts.gzip:
3888+ mode += 'b'
3889+ self.f = open(self.p, mode)
3890+ if opts.gzip:
3891+ self.f = gzip.GzipFile(fileobj = self.f, filename = self.n)
3892+ self.w = codecs.getwriter('utf-8')(self.f)
3893+ self.r = codecs.getreader('utf-8')(self.f)
3894+ def write(self, str):
3895+ self.w.write(str)
3896+ def read(self, size = -1):
3897+ return self.r.read(size)
3898+ def rewind(self):
3899+ if opts.gzip:
3900+ self.f.rewind()
3901+ else:
3902+ self.f.seek(0,0)
3903+ def close(self):
3904+ if opts.gzip:
3905+ f = self.f.fileobj;
3906+ self.f.close()
3907+ if opts.gzip:
3908+ f.close()
3909+ self.w = self.r = self.f = None
3910+#
3911+# Helper function for JSON output with optional gzip
3912+#
3913+def saveJSON(dic, localName):
3914+ name = os.path.join(basePath, localName) ;
3915+ if opts.gzip:
3916+ f = open(name + '.gz', 'wb')
3917+ s = gzip.GzipFile(fileobj = f, filename = localName)
3918+ else:
3919+ f = open(name, 'w')
3920+ s = f
3921+ sw = codecs.getwriter('utf-8')(s)
3922+ sw.write(simplejson.dumps(dic, sort_keys=True))
3923+ sw.reset()
3924+ if opts.gzip:
3925+ s.close()
3926+ f.close()
3927+
3928+
3929+lvl = logging.WARNING
3930+date = datetime.utcnow().replace(second=0,microsecond=0).isoformat(' ')
3931+# parse commandline arguments
3932+cp = OptionParser(version='0.2')
3933+cp.add_option('-v', '--verbose', action='count', dest='v', default=0,
3934+ help='Make more noise')
3935+cp.add_option('-q', '--quiet', action='count', dest='q', default=0,
3936+ help='Make less noise')
3937+cp.add_option('-O', '--base-dir', type='string', dest='target',
3938+ default='results',
3939+ help='Destination base directory')
3940+cp.add_option('-c', '--checkout', action='store_true', dest='checkout',
3941+ default=False,
3942+ help='Run make -f client.mk l10n-checkout [Default: not]')
3943+cp.add_option('-d', '--date', type='string', dest='date',
3944+ help='Explicit start date or subdir [Default: now]')
3945+cp.add_option('-z',action="store_true", dest="gzip", default=False,
3946+ help='Use gzip compression for output')
3947+cp.add_option('-w','--enable-waterfall', action="store_true",
3948+ dest="waterfall", default=False,
3949+ help='Update waterfall data')
3950+cp.add_option('--end-date', type='string', dest='enddate',
3951+ help='Explicit (faked) end date')
3952+opts, optlist = cp.parse_args(sys.argv[1:])
3953+
3954+#
3955+# Set up Logging
3956+#
3957+logging.basicConfig(level=(logging.WARNING + 10*(opts.q - opts.v)))
3958+# Add a handler to store the output
3959+h = LogHandler()
3960+logging.getLogger('').addHandler(h)
3961+
3962+#
3963+# Check that we're in the right location and check out if requested
3964+#
3965+try:
3966+ os.chdir('mozilla')
3967+ if opts.checkout:
3968+ env = ''
3969+ l = logging.getLogger('cvsco')
3970+ if opts.date:
3971+ env = 'MOZ_CO_DATE="' + opts.date + ' +0" '
3972+ fh = os.popen(env + 'make -f client.mk l10n-checkout')
3973+ for ln in fh:
3974+ l.info(ln.strip())
3975+ if fh.close():
3976+ raise Exception('cvs checkout failed')
3977+ os.chdir('..')
3978+except Exception,e:
3979+ sys.exit(str(e))
3980+
3981+if not opts.date:
3982+ opts.date = date # use default set above
3983+
3984+logging.debug(' Ensure output directory')
3985+# replace : with -
3986+opts.date = opts.date.replace(':','-')
3987+if not os.path.isdir(opts.target):
3988+ sys.exit('error: ' + opts.target + ' is not a directory')
3989+if opts.waterfall:
3990+ startdate = time.mktime(time.strptime(opts.date, '%Y-%m-%d %H-%M-%S')) + time.altzone
3991+basePath = os.path.join(opts.target, opts.date)
3992+if not os.path.isdir(basePath):
3993+ os.mkdir(basePath)
3994+
3995+
3996+tests = [Tests.CompareTest(),
3997+ Tests.SearchTest(),
3998+ Tests.RSSReaderTest()]
3999+# disable bookmarks test, that's hard to fix. XXX
4000+# Tests.BookmarksTest()]
4001+drop = {}
4002+for test in tests:
4003+ res = test.run()
4004+ test.serialize(res, saveJSON)
4005+ if opts.waterfall:
4006+ test.failureTest(res, drop)
4007+
4008+if not opts.waterfall:
4009+ saveJSON(h.log, 'buildlog.json')
4010+ sys.exit()
4011+
4012+
4013+if opts.enddate:
4014+ endtime = time.mktime(time.strptime(opts.enddate, '%Y-%m-%d %H:%M:%S')) + time.altzone
4015+else:
4016+ endtime = time.mktime(datetime.now().timetuple())
4017+f = None
4018+w = Wrapper(opts.target, 'waterfall.json')
4019+if os.path.isfile(w.p):
4020+ w.open('r')
4021+ water = simplejson.load(w)
4022+else:
4023+ water = []
4024+
4025+water.append((opts.date, (startdate, endtime), drop))
4026+#
4027+# Check if we need to rotate the waterfall
4028+#
4029+rotateLen = 24
4030+if len(water) > rotateLen * 1.5:
4031+ # rotate, maximum of 16 logs
4032+ suffix = ''
4033+ if opts.gzip:
4034+ suffix = '.gz'
4035+ fnames = [os.path.join(opts.target, 'waterfall-%x.json'%i) + suffix for i in range(16)]
4036+ # remove oldest log
4037+ if os.path.isfile(fnames[15]):
4038+ os.remove(fnames[15])
4039+ for l in range(14, -1, -1):
4040+ if os.path.isfile(fnames[l]):
4041+ os.rename(fnames[l], fnames[l+1])
4042+ w0 = Wrapper('.', fnames[0])
4043+ w0.open('w')
4044+ simplejson.dump(water[:rotateLen], w0, sort_keys=True)
4045+ w0.close()
4046+ water = water[rotateLen:]
4047+
4048+w.open('w')
4049+simplejson.dump(water, w, sort_keys=True)
4050+w.close()
4051+
4052+saveJSON(h.log, 'buildlog.json')
4053
4054=== added file 'debian/compare-locales/scripts/verify-rss-redirects'
4055--- debian/compare-locales/scripts/verify-rss-redirects 1970-01-01 00:00:00 +0000
4056+++ debian/compare-locales/scripts/verify-rss-redirects 2011-09-30 12:49:23 +0000
4057@@ -0,0 +1,105 @@
4058+#!python
4059+# ***** BEGIN LICENSE BLOCK *****
4060+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
4061+#
4062+# The contents of this file are subject to the Mozilla Public License Version
4063+# 1.1 (the "License"); you may not use this file except in compliance with
4064+# the License. You may obtain a copy of the License at
4065+# http://www.mozilla.org/MPL/
4066+#
4067+# Software distributed under the License is distributed on an "AS IS" basis,
4068+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
4069+# for the specific language governing rights and limitations under the
4070+# License.
4071+#
4072+# The Original Code is l10n test automation.
4073+#
4074+# The Initial Developer of the Original Code is
4075+# Mozilla Foundation
4076+# Portions created by the Initial Developer are Copyright (C) 2006
4077+# the Initial Developer. All Rights Reserved.
4078+#
4079+# Contributor(s):
4080+# Axel Hecht <l10n@mozilla.com>
4081+#
4082+# Alternatively, the contents of this file may be used under the terms of
4083+# either the GNU General Public License Version 2 or later (the "GPL"), or
4084+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
4085+# in which case the provisions of the GPL or the LGPL are applicable instead
4086+# of those above. If you wish to allow use of your version of this file only
4087+# under the terms of either the GPL or the LGPL, and not to allow others to
4088+# use your version of this file under the terms of the MPL, indicate your
4089+# decision by deleting the provisions above and replace them with the notice
4090+# and other provisions required by the GPL or the LGPL. If you do not delete
4091+# the provisions above, a recipient may use your version of this file under
4092+# the terms of any one of the MPL, the GPL or the LGPL.
4093+#
4094+# ***** END LICENSE BLOCK *****
4095+
4096+import sys
4097+import logging
4098+from optparse import OptionParser
4099+from urlparse import urlparse
4100+import httplib
4101+from urllib2 import urlopen
4102+
4103+EN_US_FEED = 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml'
4104+FEEDSERVER = '%s.fxfeeds.mozilla.com'
4105+FEEDPATH = '/%s/firefox/headlines.xml'
4106+
4107+L10NFEEDS = 'https://wiki.mozilla.org/index.php?title=Firefox/L10n_Feed_Redirects&action=raw'
4108+
4109+op = OptionParser()
4110+op.add_option('--oldid', dest='oldid',
4111+ help='explicitly give a version number on the wiki')
4112+op.add_option('-v', dest='verbose', action='count', default=0,
4113+ help='increase verbosity')
4114+(options, args) = op.parse_args()
4115+
4116+if len(args) != 1:
4117+ sys.exit('all-locales or shipped-locales path expected')
4118+
4119+logging.basicConfig(level=(logging.WARNING - options.verbose*10))
4120+
4121+if options.oldid:
4122+ L10NFEEDS += '&oldid=' + options.oldid
4123+
4124+lFeeds = urlopen(L10NFEEDS)
4125+redirs = {}
4126+
4127+for row in lFeeds:
4128+ d, loc, url = row.split(' ', 2)
4129+ redirs[loc] = url.strip()
4130+
4131+# parse all-locales and shipped-locales, only take first bunch
4132+lFile = open(args[0])
4133+locales = [ln.split(' ', 1)[0].strip() for ln in lFile]
4134+# ignore ja-JP-mac, same bookmarks as ja
4135+def not_ja_JP_mac(loc): return loc != 'ja-JP-mac'
4136+locales = filter(not_ja_JP_mac, locales)
4137+
4138+for loc in locales:
4139+ logging.debug('testing ' + loc)
4140+ server = FEEDSERVER % loc
4141+ path = FEEDPATH % loc
4142+ while server.endswith('mozilla.com'):
4143+ url = None
4144+ conn = httplib.HTTPConnection(server)
4145+ conn.request('HEAD', path)
4146+ r = conn.getresponse()
4147+ if r.status != 302:
4148+ logging.error('mozilla.com loses feed for ' + loc)
4149+ server = ''
4150+ continue
4151+ url = r.getheader('location')
4152+ server, path = urlparse(url)[1:3]
4153+ conn.close()
4154+ refurl = EN_US_FEED
4155+ if redirs.has_key(loc):
4156+ refurl = redirs[loc]
4157+ if url != refurl:
4158+ print loc, "FAIL"
4159+ logging.info(str(url) + ' is not ' + refurl)
4160+ else:
4161+ logging.debug(loc + ' PASS')
4162+
4163
4164=== added directory 'debian/config'
4165=== added file 'debian/config/branch.mk'
4166--- debian/config/branch.mk 1970-01-01 00:00:00 +0000
4167+++ debian/config/branch.mk 2011-09-30 12:49:23 +0000
4168@@ -0,0 +1,8 @@
4169+CHANNEL = nightly
4170+NO_AUTO_REFRESH_LOCALES = 1
4171+
4172+DISTRIB_VERSION_MAJOR = $(shell lsb_release -s -r | cut -d '.' -f 1)
4173+DISTRIB_VERSION_MINOR = $(shell lsb_release -s -r | cut -d '.' -f 2)
4174+
4175+COMM_REPO = http://hg.mozilla.org/releases/comm-release
4176+L10N_REPO = http://hg.mozilla.org/releases/l10n/mozilla-release
4177
4178=== added file 'debian/config/locales.all'
4179--- debian/config/locales.all 1970-01-01 00:00:00 +0000
4180+++ debian/config/locales.all 2011-09-30 12:49:23 +0000
4181@@ -0,0 +1,1 @@
4182+# Placeholder file for the list of all language packs. Do not delete
4183
4184=== added file 'debian/config/locales.blacklist'
4185--- debian/config/locales.blacklist 1970-01-01 00:00:00 +0000
4186+++ debian/config/locales.blacklist 2011-09-30 12:49:23 +0000
4187@@ -0,0 +1,1 @@
4188+# List of upstream locales to blacklist
4189
4190=== added file 'debian/config/locales.shipped'
4191--- debian/config/locales.shipped 1970-01-01 00:00:00 +0000
4192+++ debian/config/locales.shipped 2011-09-30 12:49:23 +0000
4193@@ -0,0 +1,1 @@
4194+# Placeholder file for the list of shipped languages. Do not delete
4195\ No newline at end of file
4196
4197=== added file 'debian/config/mozconfig.in'
4198--- debian/config/mozconfig.in 1970-01-01 00:00:00 +0000
4199+++ debian/config/mozconfig.in 2011-09-30 12:49:23 +0000
4200@@ -0,0 +1,116 @@
4201+%%ifdef DEB_BUILD_GNU_TYPE
4202+ac_add_options --build=@DEB_BUILD_GNU_TYPE@
4203+%%endif
4204+ac_add_options --host=@DEB_HOST_GNU_TYPE@
4205+ac_add_options --prefix=@MOZ_PREFIX@
4206+ac_add_options --libexecdir=@MOZ_LIBDIR@
4207+ac_add_options --with-l10n-base=@TOPSRCDIR@/@DEB_BUILDDIR@/l10n
4208+ac_add_options --srcdir=@TOPSRCDIR@/@DEB_BUILDDIR@
4209+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/@MOZ_OBJDIR@
4210+ac_add_options --disable-install-strip
4211+ac_add_options --disable-updater
4212+ac_add_options --enable-application=suite
4213+ac_add_options --enable-startup-notification
4214+ac_add_options --with-distribution-id=com.ubuntu
4215+%%if MOZ_DISABLE_LIBJPEG == 1
4216+ac_add_options --disable-libjpeg-turbo
4217+%%endif
4218+%%ifdef DEB_ENABLE_THUMB2
4219+ac_add_options --enable-thumb2
4220+%%endif
4221+%%if MOZ_OVERRIDE_SHLIBS == system
4222+ac_add_options --with-system-jpeg=/usr
4223+ac_add_options --with-system-png=/usr
4224+ac_add_options --with-system-zlib=/usr
4225+ac_add_options --with-system-bz2=/usr
4226+ac_add_options --with-system-libevent=/usr
4227+ac_add_options --enable-system-pixman
4228+ac_add_options --disable-tree-freetype
4229+%%elif MOZ_OVERRIDE_SHLIBS == tree
4230+ac_add_options --without-system-jpeg
4231+ac_add_options --without-system-png
4232+ac_add_options --without-system-zlib
4233+ac_add_options --without-system-bz2
4234+ac_add_options --without-system-libevent
4235+ac_add_options --disable-system-pixman
4236+ac_add_options --enable-tree-freetype
4237+%%endif
4238+%%ifdef MOZ_NO_OPTIMIZE
4239+ac_add_options --disable-optimize
4240+%%else
4241+%%ifndef MOZ_VALGRIND
4242+ac_add_options --enable-optimize
4243+%%else
4244+ac_add_options --enable-optimize="-g -O -freorder-blocks"
4245+%%endif
4246+%%endif
4247+%%ifdef MOZ_VALGRIND
4248+ac_add_options --disable-jemalloc
4249+ac_add_options --enable-valgrind
4250+mk_add_options MOZ_MAKE_FLAGS=-j4
4251+%%endif
4252+%%ifdef MOZ_WANT_UNIT_TESTS
4253+ac_add_options --enable-tests
4254+ac_add_options --enable-ipdl-tests
4255+%%else
4256+ac_add_options --disable-tests
4257+ac_add_options --disable-ipdl-tests
4258+%%endif
4259+%%if MOZ_USE_CAIRO == system
4260+ac_add_options --enable-system-cairo
4261+%%elif MOZ_USE_CAIRO == tree
4262+ac_add_options --disable-system-cairo
4263+%%endif
4264+%%if MOZ_USE_NSPR == system
4265+ac_add_options --with-system-nspr
4266+%%elif MOZ_USE_NSPR == tree
4267+ac_add_options --without-system-nspr
4268+%%endif
4269+%%if MOZ_USE_NSS == system
4270+ac_add_options --with-system-nss
4271+%%elif MOZ_USE_NSS == tree
4272+ac_add_options --without-system-nss
4273+%%endif
4274+%%if MOZ_USE_SQLITE == tree
4275+ac_add_options --disable-system-sqlite
4276+%%elif MOZ_USE_SQLITE == system
4277+ac_add_options --enable-system-sqlite
4278+%%endif
4279+%%if MOZ_USE_HUNSPELL == tree
4280+ac_add_options --disable-system-hunspell
4281+%%elif MOZ_USE_HUNSPELL == system
4282+ac_add_options --enable-system-hunspell
4283+%%endif
4284+%%if MOZ_USE_VPX == tree
4285+ac_add_options --without-system-libvpx
4286+%%elif MOZ_USE_VPX == system
4287+ac_add_options --with-system-libvpx=/usr
4288+%%endif
4289+%%ifdef MOZ_ENABLE_BREAKPAD
4290+ac_add_options --enable-crashreporter
4291+%%else
4292+ac_add_options --disable-crashreporter
4293+%%endif
4294+ac_add_options @MOZ_BRANDING_OPTION@
4295+%%ifdef MOZ_BUILD_PGO
4296+mk_add_options PROFILE_GEN_SCRIPT='xvfb-run -a @MOZ_PYTHON@ @TOPSRCDIR@/@MOZ_OBJDIR@/_profile/pgo/profileserver.py'
4297+%%endif
4298+%%ifdef MOZ_DISABLE_GNOMEVFS
4299+ac_add_options --disable-gnomevfs
4300+ac_add_options --enable-gio
4301+%%endif
4302+%%ifdef MOZ_DISABLE_GCONF
4303+ac_add_options --disable-gconf
4304+%%endif
4305+%%ifdef MOZ_UPDATE_CHANNEL
4306+ac_add_options --enable-update-channel=@MOZ_UPDATE_CHANNEL@
4307+%%endif
4308+%%ifdef MOZ_DEBUG
4309+ac_add_options --enable-debug
4310+%%else
4311+ac_add_options --disable-debug
4312+%%endif
4313+ac_add_options --disable-elf-hack
4314+%%ifdef MOZ_ENABLE_GLOBALMENU
4315+ac_add_options --enable-extensions=default,globalmenu
4316+%%endif
4317
4318=== modified file 'debian/control'
4319--- debian/control 2010-07-14 22:49:03 +0000
4320+++ debian/control 2011-09-30 12:49:23 +0000
4321@@ -1,43 +1,57 @@
4322 Source: seamonkey
4323-Section: net
4324+Section: web
4325 Priority: optional
4326 Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
4327-Build-Depends: cdbs, debhelper (>= 5.0.0),
4328- mozilla-devscripts,
4329- dpkg-dev (>= 1.13.19),
4330- autoconf2.13, autotools-dev,
4331+Vcs-Bzr: https://code.launchpad.net/~mozillateam/seamonkey/seamonkey-trunk.head
4332+Build-Depends: cdbs (>= 0.4.27),
4333+ debhelper (>= 5),
4334+ m4,
4335+ autotools-dev,
4336+ autoconf2.13,
4337 quilt,
4338- libgtk2.0-dev (>= 2.12),
4339- libglib2.0-dev (>= 2.12),
4340+ zip,
4341+ libx11-dev,
4342+ libxt-dev,
4343+ libxext-dev,
4344+ libgtk2.0-dev (>= 2.10),
4345+ libglib2.0-dev,
4346+ libpango1.0-dev (>= 1.14.0),
4347+ libidl-dev (>= 0.8.0),
4348+ libfontconfig1-dev,
4349+ libgconf2-dev (>= 1.2.1),
4350+ libgnomeui-dev (>= 2.2.0),
4351 libstartup-notification0-dev,
4352- binutils (>= 2.17-1~),
4353- zip, libz-dev,
4354- libjpeg62-dev | libjpeg-dev,
4355- libpng12-dev (>= 1.2.0),
4356- libxft-dev (>= 2.1-6),
4357- libfontconfig1-dev (>= 2.1-13),
4358- libidl-dev (>= 0.8),
4359- libxt-dev,
4360- libxrender-dev,
4361- libxinerama-dev,
4362- libxau-dev,
4363- libcairo2-dev,
4364- libgnomevfs2-dev, libgnomeui-dev,
4365- libdbus-1-dev (>= 1.0.0),
4366+ libasound2-dev,
4367+ libcurl4-openssl-dev,
4368 libdbus-glib-1-dev (>= 0.60),
4369- libhal-dev (>= 0.5.8),
4370- libasound2-dev,
4371- libhunspell-dev (>= 1.1.5-2),
4372- libnspr4-dev, libnss3-dev (>= 3.12.0~cvs20071121)
4373-Standards-Version: 3.7.3
4374+ lsb-release,
4375+ libiw-dev,
4376+ mesa-common-dev,
4377+ libnotify-dev,
4378+ libxrender-dev,
4379+ libfreetype6-dev (>= 2.0.1),
4380+ libgnomevfs2-dev (>= 1:2.0),
4381+ yasm,
4382+ imagemagick,
4383+ libdbusmenu-gtk-dev,
4384+ docbook-to-man,
4385+ libkrb5-dev,
4386+ unzip
4387+Standards-Version: 3.9.1
4388
4389 Package: seamonkey
4390-Architecture: all
4391+Architecture: any
4392+Depends: debianutils (>= 1.16),
4393+ ${misc:Depends}
4394+Recommends: myspell-en-us | hunspell-dictionary | myspell-dictionary
4395+Suggests: seamonkey-gnome-support (= ${binary:Version}),
4396+ latex-xft-fonts,
4397+ libthai0
4398+Breaks: ${app:Breaks}
4399+Replaces: seamonkey-browser, seamonkey-chatzilla, seamonkey-mailnews,
4400+ ${app:Replaces}
4401+Conflicts: ${app:Conflicts}
4402 Section: web
4403-Depends: seamonkey-browser, seamonkey-mailnews, ${misc:Depends}
4404-Recommends: seamonkey-chatzilla
4405-Conflicts: mozilla (<< 2:1.8)
4406-Replaces: mozilla
4407 Description: The Seamonkey Internet Suite
4408 The Seamonkey Internet Suite is a set of Internet oriented applications.
4409 It is the continuity of the Mozilla Suite after it has been abandoned
4410@@ -48,96 +62,26 @@
4411 - an HTML WYSIWYG editor (Seamonkey Composer)
4412 - a Mail and News client (Seamonkey Mail & Newsgroups)
4413 - an Address Book (Seamonkey Address Book)
4414- - an IRC client (Chatzilla)
4415- .
4416- This is a meta package that depends on the main components of this suite.
4417- It is here to ease upgrades, installations, and provide a consistent upgrade
4418- path from previous versions.
4419- .
4420- It can safely be removed with no ill effects.
4421-
4422-Package: seamonkey-browser
4423-Architecture: any
4424-Section: web
4425-Depends: ${shlibs:Depends}, ${misc:Depends}
4426-Breaks: seamonkey-gnome-support (<< 2.0.4+nobinonly-0ubuntu1)
4427-Suggests: latex-xft-fonts, libkrb53, seamonkey-mailnews, seamonkey-dom-inspector
4428-Conflicts: mozilla-browser (<< 2:1.8), mozilla-psm (<< 2:1.8), mozilla-venkman (= 0.9.87-3)
4429-Replaces: mozilla-browser, mozilla-psm, seamonkey-gnome-support (<< 2.0.4+nobinonly-0ubuntu1)
4430-Provides: www-browser
4431-Description: Seamonkey Navigator (Internet browser) and Composer
4432- Seamonkey Navigator is a sophisticated graphical World-Wide-Web browser, with
4433- a large number of various browser features like support for HTML 4.0, CSS
4434- 2, JavaScript, etc. It also features tabbed browsing, popup blocking, and
4435- many others options.
4436- .
4437- Seamonkey Composer is a WYSIWIG HTML editor that lets you modify arbitrary
4438- HTML pages. It provides dynamic image and table resizing, quick insert
4439- and delete of table cells, and supports CSS and positioned layers.
4440- .
4441- See the 'seamonkey' package for more information on the Seamonkey Internet Suite.
4442+ .
4443+ This package contains the entire suite.
4444
4445 Package: seamonkey-gnome-support
4446 Architecture: any
4447-Section: web
4448-Depends: ${shlibs:Depends}, seamonkey-browser (= ${binary:Version}), ${misc:Depends}
4449-Description: Gnome Depends for the Seamonkey Internet Suite
4450- This is an empty package to pull in the Gnome Depends for Seamonkey.
4451- .
4452- See the 'seamonkey' package for more information on the Seamonkey Internet Suite.
4453-
4454-Package: seamonkey-dbg
4455-Architecture: any
4456-Priority: extra
4457-Section: devel
4458-Depends: seamonkey-browser (= ${binary:Version}), ${misc:Depends}
4459-Conflicts: seamonkey-mailnews (<< ${binary:Version}), seamonkey-mailnews (>> ${binary:Version}), seamonkey-calendar (<< ${binary:Version}), seamonkey-calendar (>> ${binary:Version}), seamonkey-dom-inspector (<< ${binary:Version}), seamonkey-dom-inspector (>> ${binary:Version})
4460-Description: Debugging symbols for the Seamonkey Internet Suite
4461- This package provides the debugging symbols for the Seamonkey Internet Suite
4462- programs. Install this package if you need to debug such a program or if
4463- you need a useful backtrace of a crash.
4464- .
4465- See the 'seamonkey' package for more information on the Seamonkey Internet Suite.
4466-
4467-Package: seamonkey-mailnews
4468-Architecture: any
4469-Section: mail
4470-Depends: ${shlibs:Depends}, seamonkey-browser (= ${binary:Version}), ${misc:Depends}
4471-Conflicts: mozilla-mailnews (<< 2:1.8), seamonkey-browser (<= 2.0.6+build1+nobinonly-0ubuntu1)
4472-Provides: mail-reader, imap-client, news-reader
4473-Replaces: mozilla-mailnews, seamonkey-browser (<= 2.0.6+build1+nobinonly-0ubuntu1)
4474-Description: Seamonkey Mail & Newsgroups and Address Book
4475- Seamonkey Mail & Newsgroups client supports NNTP Newsgroups and IMAP/POP Mail.
4476- It has a full variety of features such as multiple accounts, labels,
4477- adaptive junk mail control, S/MIME, digital signing.
4478- .
4479- Seamonkey Address Book adds address book management to the Seamonkey Mail &
4480- Newsgroups client. It supports LDAP, vCards...
4481- .
4482- See the 'seamonkey' package for more information on the Seamonkey Internet Suite.
4483-
4484-Package: seamonkey-chatzilla
4485-Architecture: all
4486-Section: net
4487-Depends: seamonkey-browser (>= ${source:Upstream-Version}), seamonkey-browser (<= ${source:Version}.1~), ${misc:Depends}
4488-Conflicts: mozilla-chatzilla (<< 2:1.8), mozilla-browser (<< 2:1.8)
4489-Replaces: mozilla-chatzilla
4490-Description: Seamonkey Chatzilla IRC client
4491- Chatzilla is a full featured IRC client integrated with the Seamonkey
4492- Internet Suite. It is scriptable, and supports what most people would
4493- expect from an IRC client.
4494- .
4495- See the 'seamonkey' package for more information on the Seamonkey Internet Suite.
4496-
4497-Package: seamonkey-dom-inspector
4498-Architecture: any
4499-Section: web
4500-Depends: ${shlibs:Depends}, seamonkey-browser (= ${binary:Version}), ${misc:Depends}
4501-Conflicts: mozilla-dom-inspector (<< 2:1.8)
4502-Replaces: mozilla-dom-inspector
4503-Description: DOM inspector for the Seamonkey Internet Suite
4504- This is a tool that allows you to inspect the DOM for web pages in the
4505- Seamonkey Navigator.
4506- .
4507- It also allows you to inspect the DOM for the Seamonkey User Interface itself
4508- and helps for extensions development.
4509+Section: gnome
4510+Depends: ${shlibs:Depends},
4511+ seamonkey (= ${binary:Version}),
4512+ ${misc:Depends},
4513+ ${unity:Depends}
4514+Breaks: ${gs:Breaks}
4515+Replaces: ${gs:Replaces}
4516+Conflicts: ${gs:Conflicts}
4517+Provides: ${gs:Provides}
4518+Description: Seamonkey client - GNOME support
4519+ The Seamonkey Internet Suite is a set of Internet oriented applications.
4520+ It is the continuity of the Mozilla Suite after it has been abandoned
4521+ in favor of Firefox and Thunderbird.
4522+ .
4523+ This package depends on the GNOME libraries which allow Thunderbird to take
4524+ advantage of technologies such as GConf, GIO and libnotify
4525+
4526+# Language packs below here
4527
4528=== added file 'debian/control.in'
4529--- debian/control.in 1970-01-01 00:00:00 +0000
4530+++ debian/control.in 2011-09-30 12:49:23 +0000
4531@@ -0,0 +1,87 @@
4532+Source: @MOZ_APP_NAME@
4533+Section: web
4534+Priority: optional
4535+Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
4536+Vcs-Bzr: https://code.launchpad.net/~mozillateam/seamonkey/seamonkey-trunk.head
4537+Build-Depends: cdbs (>= 0.4.27),
4538+ debhelper (>= 5),
4539+ m4,
4540+ autotools-dev,
4541+ autoconf2.13,
4542+ quilt,
4543+ zip,
4544+ libx11-dev,
4545+ libxt-dev,
4546+ libxext-dev,
4547+ libgtk2.0-dev (>= 2.10),
4548+ libglib2.0-dev,
4549+ libpango1.0-dev (>= 1.14.0),
4550+ libidl-dev (>= 0.8.0),
4551+ libfontconfig1-dev,
4552+ libgconf2-dev (>= 1.2.1),
4553+ libgnomeui-dev (>= 2.2.0),
4554+ libstartup-notification0-dev,
4555+ libasound2-dev,
4556+ libcurl4-openssl-dev,
4557+ libdbus-glib-1-dev (>= 0.60),
4558+ lsb-release,
4559+ libiw-dev,
4560+ mesa-common-dev,
4561+ libnotify-dev,
4562+ libxrender-dev,
4563+ libfreetype6-dev (>= 2.0.1),
4564+ libgnomevfs2-dev (>= 1:2.0),
4565+ yasm,
4566+ imagemagick,
4567+ libdbusmenu-gtk-dev,
4568+ docbook-to-man,
4569+ libkrb5-dev,
4570+ unzip
4571+Standards-Version: 3.9.1
4572+
4573+Package: @MOZ_APP_NAME@
4574+Architecture: any
4575+Depends: debianutils (>= 1.16),
4576+ ${misc:Depends}
4577+Recommends: myspell-en-us | hunspell-dictionary | myspell-dictionary
4578+Suggests: @MOZ_APP_NAME@-gnome-support (= ${binary:Version}),
4579+ latex-xft-fonts,
4580+ libthai0
4581+Breaks: ${app:Breaks}
4582+Replaces: seamonkey-browser, seamonkey-chatzilla, seamonkey-mailnews,
4583+ ${app:Replaces}
4584+Conflicts: ${app:Conflicts}
4585+Section: web
4586+Description: The Seamonkey Internet Suite
4587+ The Seamonkey Internet Suite is a set of Internet oriented applications.
4588+ It is the continuity of the Mozilla Suite after it has been abandoned
4589+ in favor of Firefox and Thunderbird.
4590+ .
4591+ The Seamonkey Internet Suite consists of:
4592+ - an Internet browser (Seamonkey Navigator)
4593+ - an HTML WYSIWYG editor (Seamonkey Composer)
4594+ - a Mail and News client (Seamonkey Mail & Newsgroups)
4595+ - an Address Book (Seamonkey Address Book)
4596+ .
4597+ This package contains the entire suite.
4598+
4599+Package: @MOZ_APP_NAME@-gnome-support
4600+Architecture: any
4601+Section: gnome
4602+Depends: ${shlibs:Depends},
4603+ @MOZ_APP_NAME@ (= ${binary:Version}),
4604+ ${misc:Depends},
4605+ ${unity:Depends}
4606+Breaks: ${gs:Breaks}
4607+Replaces: ${gs:Replaces}
4608+Conflicts: ${gs:Conflicts}
4609+Provides: ${gs:Provides}
4610+Description: Seamonkey client - GNOME support
4611+ The Seamonkey Internet Suite is a set of Internet oriented applications.
4612+ It is the continuity of the Mozilla Suite after it has been abandoned
4613+ in favor of Firefox and Thunderbird.
4614+ .
4615+ This package depends on the GNOME libraries which allow Thunderbird to take
4616+ advantage of technologies such as GConf, GIO and libnotify
4617+
4618+# Language packs below here
4619
4620=== added file 'debian/control.langpacks'
4621--- debian/control.langpacks 1970-01-01 00:00:00 +0000
4622+++ debian/control.langpacks 2011-09-30 12:49:23 +0000
4623@@ -0,0 +1,7 @@
4624+
4625+Package: @MOZ_APP_NAME@-locale-@LANGCODE@
4626+Architecture: all
4627+Depends: @MOZ_APP_NAME@ (>= ${source:Version}), @MOZ_APP_NAME@ (<< ${source:Version}.1~), ${misc:Depends}
4628+Description: @LANG@ language pack for Seamonkey
4629+ This package contains @LANG@ translations and search plugins
4630+ for Seamonkey
4631
4632=== added file 'debian/control.langpacks.unavail'
4633--- debian/control.langpacks.unavail 1970-01-01 00:00:00 +0000
4634+++ debian/control.langpacks.unavail 2011-09-30 12:49:23 +0000
4635@@ -0,0 +1,9 @@
4636+
4637+Package: @MOZ_APP_NAME@-locale-@LANGCODE@
4638+Architecture: all
4639+Depends: ${misc:Depends}
4640+Description: Transitional package for unavailable language
4641+ This language is unavailable for the current version of Seamonkey
4642+ .
4643+ This is an empty transitional package to ensure a clean upgrade
4644+ process. You can safely remove this package after installation.
4645
4646=== modified file 'debian/copyright'
4647--- debian/copyright 2007-10-23 23:38:02 +0000
4648+++ debian/copyright 2011-09-30 12:49:23 +0000
4649@@ -1,18 +1,15 @@
4650-This package was debianized by HJ Heins <hjheins@gmail.com> on
4651-Wed, 23 Aug 2006 18:55:11 +0100.
4652-
4653-It was downloaded from ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases
4654-
4655-Copyright Holder: Mozilla Corporation
4656+This package was debianized by Fabien Tassin <fta@sofaraway.org> on 2008-02-25
4657+
4658+The package was downloaded from http://ftp.mozilla.org/pub/mozilla.org/seamonkey/
4659+
4660+EDIT: downloaded from CVS (until 3.0 is released) using the following commands:
4661+ debian/rules get-orig-source (you need to install mozilla-devscripts >= 0.05)
4662
4663 The source tarball is an aggregate of several different works in which the
4664-main one, developed by the Mozilla Project, is Seamonkey.
4665+main one, developed by the Mozilla Project, is seamonkey.
4666
4667 The contents of the debian directory are licensed like the bulk of
4668-Seamonkey, tri-licensed under the GPL/LGPL/MPL.
4669-
4670-The SVG files in the debian directory are
4671-Copyright 2006-2007 Ricardo Fernández Fuentes
4672+seamonkey, tri-licensed under the GPL/LGPL/MPL.
4673
4674 Other works include gzip, bzip2, sqlite, libjpeg, libpng, cairo, and others.
4675 Please see the sections following the copyright statements for seamonkey for
4676@@ -39,7 +36,7 @@
4677
4678 Some of the files are also licensed (single, dual or tri) under the terms of
4679 the Netscape Public License (NPL) which can be found as amendments to the
4680-MPL at the end of the file.
4681+MPL at the end of the file. Please refer to http://www.mozilla.org/MPL/relicensing-faq.html
4682
4683 While the Mozilla Project is undergoing a global relicensing so that the
4684 aim is to have a full tree with these tri-license terms, there are at the
4685@@ -50,170 +47,37 @@
4686 information has been extracted automatically, thus maybe leaving some doubt.
4687 Again, if you find "bugs", please contact me by email or via the BTS.)
4688
4689-The following files are dual licensed under the terms of the MPL and of
4690-the GPL:
4691-
4692- all files in directory/c-sdk/config, except the autoconf sub-directory and
4693- the prmkdir.bat file.
4694- all files in security/nss/lib/ckfw/dbm
4695-
4696- directory/c-sdk/configure.in
4697- directory/c-sdk/gmakefile.win
4698- nsprpub/configure.in
4699- nsprpub/pr/include/md/_beos.cfg
4700- nsprpub/pr/include/md/_netbsd.h
4701- nsprpub/pr/src/linking/prlink.c
4702- nsprpub/pr/src/md/beos/bfile.c
4703- nsprpub/pr/src/md/beos/brng.c
4704- nsprpub/pr/src/md/os2/os2emx.s
4705- nsprpub/pr/src/md/os2/os2vaclegacy.s
4706- nsprpub/pr/src/md/unix/os_AIX.s
4707- nsprpub/pr/src/md/unix/os_BSD_386_2.s
4708- nsprpub/pr/src/md/unix/os_Darwin_ppc.s
4709- nsprpub/pr/src/md/unix/os_Darwin_x86.s
4710- nsprpub/pr/src/md/unix/os_HPUX.s
4711- nsprpub/pr/src/md/unix/os_Irix.s
4712- nsprpub/pr/src/md/unix/os_Linux_ia64.s
4713- nsprpub/pr/src/md/unix/os_Linux_x86.s
4714- nsprpub/pr/src/md/unix/os_Linux_x86_64.s
4715- nsprpub/pr/src/md/unix/os_ReliantUNIX.s
4716- nsprpub/pr/src/md/unix/os_SunOS.s
4717- nsprpub/pr/src/md/unix/os_SunOS_sparcv9.s
4718- nsprpub/pr/src/md/unix/os_SunOS_ultrasparc.s
4719- nsprpub/pr/src/md/unix/os_SunOS_x86.s
4720- nsprpub/pr/src/md/unix/os_SunOS_x86_64.s
4721- nsprpub/pr/src/md/unix/unix.c
4722- nsprpub/pr/tests/testfile.c
4723- nsprpub/pr/tests/tmocon.c
4724- security/nss/cmd/crlutil/crlgen.c
4725- security/nss/lib/freebl/mpi/hpma512.s
4726- security/nss/lib/freebl/mpi/hppa20.s
4727- security/nss/lib/freebl/mpi/montmulf.s
4728- security/nss/lib/freebl/mpi/montmulfv8.s
4729- security/nss/lib/freebl/mpi/montmulfv9.s
4730- security/nss/lib/freebl/mpi/mpi_i86pc.s
4731- security/nss/lib/freebl/mpi/mpi_mips.s
4732- security/nss/lib/freebl/mpi/mpi_x86.s
4733- security/nss/lib/freebl/mpi/mpv_sparcv8.s
4734- security/nss/lib/freebl/mpi/mpv_sparcv9.s
4735- security/nss/lib/util/ret_cr16.s
4736- security/nss/tests/pkcs11/netscape/trivial/configure.in
4737-
4738-The following files are licensed under the terms of the MPL only:
4739-
4740- configure.in
4741- directory/c-sdk/ldap/build/autoconf.mk.in
4742- directory/c-sdk/ldap/build/my_overrides.mk
4743- extensions/xmlterm/scripts/xmlterm.spec
4744- modules/libpr0n/decoders/jpeg/Makefile.in
4745- modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp
4746- modules/libpr0n/decoders/jpeg/nsJPEGDecoder.h
4747+The following files are not tri-licenced MPL/GPL/LGPL:
4748+
4749+- GPL only:
4750+ dom/tests/mochitest/ajax/jquery/dist/jquery.js
4751+ dom/tests/mochitest/ajax/jquery/src/jquery/jquery.js
4752+
4753+- MPL and GPL:
4754+ embedding/browser/activex/src/install/README.txt
4755+
4756+- MPL and LGPL:
4757+ gfx/cairo/cairo/*
4758+
4759+- GPL and LGP:
4760+ extensions/pref/system-pref/src/gconf/nsSystemPrefService.cpp
4761+ extensions/pref/system-pref/src/gconf/nsSystemPrefService.h
4762+ extensions/pref/system-pref/src/nsSystemPref.cpp
4763+ extensions/pref/system-pref/src/nsSystemPref.h
4764+ extensions/pref/system-pref/src/nsSystemPrefFactory.cpp
4765+ extensions/pref/system-pref/src/nsSystemPrefLog.h
4766+ netwerk/base/public/nsIIOService2.idl
4767+ netwerk/base/public/nsINetworkLinkService.idl
4768 netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
4769 netwerk/streamconv/converters/mozTXTToHTMLConv.h
4770 netwerk/streamconv/public/mozITXTToHTMLConv.idl
4771- security/nss/lib/freebl/mpi/doc/basecvt.pod
4772- security/nss/lib/freebl/mpi/doc/gcd.pod
4773- security/nss/lib/freebl/mpi/doc/invmod.pod
4774- security/nss/lib/freebl/mpi/doc/isprime.pod
4775- security/nss/lib/freebl/mpi/doc/lap.pod
4776- security/nss/lib/freebl/mpi/doc/mpi-test.pod
4777- security/nss/lib/freebl/mpi/doc/prime.txt
4778- security/nss/lib/freebl/mpi/doc/prng.pod
4779- security/nss/lib/freebl/mpi/tests/pi1k.txt
4780- security/nss/lib/freebl/mpi/tests/pi2k.txt
4781- security/nss/lib/freebl/mpi/tests/pi5k.txt
4782- security/nss/lib/freebl/mpi/utils/PRIMES
4783- toolkit/mozapps/preferences/fontscaling.xul
4784- widget/src/windows/nsFilePicker.cpp
4785- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
4786- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s
4787- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
4788- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.m4
4789- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparcv9_solaris.s
4790- xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
4791- xpcom/typelib/xpidl/xpidl_java.c
4792-
4793-The following files are tri licensed under the terms of the NPL, of the
4794-GPL, and the LGPL:
4795-
4796- all files in accessible/src/atk, except the following:
4797- accessible/src/atk/Makefile.in
4798- accessible/src/atk/nsAccessNodeWrap.cpp
4799- accessible/src/atk/nsAccessNodeWrap.h
4800- accessible/src/atk/nsXULMenuAccessibleWrap.h
4801- all files in extensions/pref, except autoconfig/resources/Makefile.in
4802- all files in modules/libpref, except the following:
4803- modules/libpref/Makefile.in
4804- modules/libpref/public/Makefile.in
4805- modules/libpref/src/Makefile.in
4806- all files in sun-java, except the following:
4807- sun-java/Makefile.in
4808- sun-java/stubs/Makefile.in
4809- sun-java/stubs/include/Makefile.in
4810- sun-java/stubs/include/jni_md.h
4811- sun-java/stubs/jri/Makefile.in
4812- all files in xpcom/typelib/xpidl, except Makefile.in
4813-
4814- accessible/src/mac/nsTextAccessibleWrap.h
4815- accessible/src/msaa/nsTextAccessibleWrap.cpp
4816- accessible/src/msaa/nsTextAccessibleWrap.h
4817- accessible/src/msaa/nsXULTreeAccessibleWrap.cpp
4818- accessible/src/msaa/nsXULTreeAccessibleWrap.h
4819- accessible/src/other/nsTextAccessibleWrap.h
4820- dbm/include/cdefs.h
4821- dbm/include/mcom_db.h
4822- dbm/tests/lots.c
4823- editor/ui/composer/content/editorInlineSpellCheck.js
4824- mailnews/mime/cthandlers/calendar/mimecal.cpp
4825- mailnews/mime/cthandlers/calendar/mimecal.h
4826- mailnews/mime/cthandlers/calendar/nsCalendarFactory.cpp
4827- toolkit/themes/qute/global/preferences.css
4828- toolkit/themes/winstripe/global/preferences.css
4829- widget/src/os2/nsAppShell.h
4830-
4831-The following files are dual licensed under the terms of the NPL and of
4832-the GPL:
4833-
4834- gc/boehm/xSYM/SymFiles.cpp
4835- gc/boehm/leaksoup/Addr2Line.java
4836- gc/boehm/leaksoup/BlameTable.java
4837- gc/boehm/leaksoup/CallTree.java
4838- gc/boehm/leaksoup/FileLocator.java
4839- gc/boehm/leaksoup/FileTable.java
4840- gc/boehm/leaksoup/Histogram.java
4841- gc/boehm/leaksoup/Reference.java
4842- gc/boehm/leaksoup/RevisionTable.java
4843- gc/boehm/leaksoup/StringTable.java
4844- gc/boehm/leaksoup/Type.java
4845- gc/boehm/leaksoup/bloatsoup.java
4846- gc/boehm/leaksoup/leaksoup.java
4847- gc/boehm/leaksoup/tracesoup.java
4848- gc/boehm/xSYM/SymFiles.h
4849- gc/boehm/xSYM/sym_file.h
4850- js/src/lock_SunOS.s
4851-
4852-The following files are licensed under the terms of the NPL only:
4853-
4854- all files in directory/c-sdk/ldap, except the following:
4855- directory/c-sdk/ldap/build/autoconf.mk.in
4856- directory/c-sdk/ldap/build/my_overrides.mk
4857- directory/c-sdk/ldap/examples/win32.mak
4858- directory/c-sdk/ldap/libraries/libssldap/errormap.c
4859-
4860- dbm/Makefile.in
4861- dbm/include/Makefile.in
4862- dbm/include/Makefile.win
4863- dbm/src/Makefile.in
4864- dbm/src/Makefile.win
4865- dbm/tests/Makefile.in
4866- directory/c-sdk/aclocal.m4
4867- directory/c-sdk/build.mk
4868- directory/c-sdk/component_versions.mk
4869- directory/c-sdk/config/prmkdir.bat
4870- directory/c-sdk/package.mk
4871- extensions/pref/autoconfig/resources/Makefile.in
4872- gc/boehm/Makefile.in
4873- gc/boehm/makefile.win
4874+ toolkit/system/dbus/nsDBusModule.cpp
4875+ toolkit/system/dbus/nsDBusService.cpp
4876+ toolkit/system/dbus/nsDBusService.h
4877+ toolkit/system/dbus/nsNetworkManagerListener.cpp
4878+ toolkit/system/dbus/nsNetworkManagerListener.h
4879+
4880+- NPL only (thus MPL): (EDIT: to investigate)
4881 intl/uconv/ucvibm/864i.uf
4882 intl/uconv/ucvibm/cp850.uf
4883 intl/uconv/ucvibm/cp852.uf
4884@@ -233,63 +97,8 @@
4885 intl/uconv/ucvmath/texcmmi-ttf.uf
4886 intl/uconv/ucvmath/texcmr-ttf.uf
4887 intl/uconv/ucvmath/texcmsy-t1.uf
4888- jpeg/Makefile.in
4889- jpeg/jerror.c
4890- jpeg/jmorecfg.h
4891- jpeg/netscape_mods.doc
4892- mailnews/mime/cthandlers/calendar/Makefile.in
4893- mailnews/mime/cthandlers/calendar/calendar.def
4894- mailnews/mime/cthandlers/calendar/mimect-cal.def
4895- modules/libimg/png/Makefile.in
4896- modules/libpref/Makefile.in
4897- modules/libpref/public/Makefile.in
4898- modules/libpref/src/Makefile.in
4899- modules/libpref/src/nsPref.cpp
4900- modules/zlib/Makefile.in
4901- modules/zlib/src/Makefile.in
4902- modules/zlib/src/objs.mk
4903- modules/zlib/standalone/Makefile.in
4904- sun-java/Makefile.in
4905- sun-java/stubs/Makefile.in
4906- sun-java/stubs/include/Makefile.in
4907- sun-java/stubs/include/jni_md.h
4908- sun-java/stubs/jri/Makefile.in
4909- toolkit/components/cookie/Makefile.in
4910- xpcom/reflect/xptcall/src/md/mac/xptcinvoke_mac.s
4911- xpcom/reflect/xptcall/src/md/mac/xptcstubs_mac.s
4912- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_openvms_alpha.s
4913- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_aix.s
4914- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s
4915- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_linux.s
4916- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
4917- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_rhapsody.s
4918- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_bsdos.s
4919- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_linux.s
4920- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_netbsd.s
4921- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris.s
4922- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_GCC.s
4923- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s
4924- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s
4925- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_openvms_alpha.s
4926- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_aix.s
4927- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_linux.s
4928- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s
4929- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc_netbsd.s
4930- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc_solaris.s
4931- xpcom/typelib/xpidl/Makefile.in
4932-
4933-The following files are licensed under the terms of the GPL only:
4934-
4935- build/autoconf/codeset.m4
4936- build/autoconf/config.guess
4937- build/autoconf/config.sub
4938- directory/c-sdk/config/autoconf/config.guess
4939- directory/c-sdk/config/autoconf/config.sub
4940- nsprpub/build/autoconf/config.guess
4941- nsprpub/build/autoconf/config.sub
4942-
4943-The following files are in the Public Domain:
4944-
4945+
4946+- Public Domain:
4947 aclocal.m4
4948 build/autoconf/freetype2.m4
4949 build/autoconf/gtk.m4
4950
4951=== added file 'debian/docs'
4952--- debian/docs 1970-01-01 00:00:00 +0000
4953+++ debian/docs 2011-09-30 12:49:23 +0000
4954@@ -0,0 +1,1 @@
4955+debian/MPL
4956
4957=== removed directory 'debian/menu_dir'
4958=== removed file 'debian/menu_dir/seamonkey-addressbook.desktop'
4959--- debian/menu_dir/seamonkey-addressbook.desktop 2010-04-19 03:36:29 +0000
4960+++ debian/menu_dir/seamonkey-addressbook.desktop 1970-01-01 00:00:00 +0000
4961@@ -1,10 +0,0 @@
4962-[Desktop Entry]
4963-Name=Seamonkey Address Book
4964-Comment=Seamonkey Address Book
4965-Exec=seamonkey -addressbook
4966-Icon=seamonkey-addressbook.xpm
4967-Terminal=false
4968-Type=Application
4969-Categories=GTK;Office;ContactManagement;
4970-StartupNotify=true
4971-NoDisplay=true
4972
4973=== removed file 'debian/menu_dir/seamonkey-chatzilla.desktop'
4974--- debian/menu_dir/seamonkey-chatzilla.desktop 2010-04-19 03:36:29 +0000
4975+++ debian/menu_dir/seamonkey-chatzilla.desktop 1970-01-01 00:00:00 +0000
4976@@ -1,9 +0,0 @@
4977-[Desktop Entry]
4978-Name=Chatzilla (SeaMonkey)
4979-GenericName=IRC Chat
4980-Exec=seamonkey -chat
4981-Terminal=false
4982-Type=Application
4983-Categories=GTK;Network;IRCClient;
4984-Icon=seamonkey-chatzilla.xpm
4985-NoDisplay=true
4986
4987=== removed file 'debian/menu_dir/seamonkey-composer.desktop'
4988--- debian/menu_dir/seamonkey-composer.desktop 2010-04-19 03:36:29 +0000
4989+++ debian/menu_dir/seamonkey-composer.desktop 1970-01-01 00:00:00 +0000
4990@@ -1,10 +0,0 @@
4991-[Desktop Entry]
4992-Name=Seamonkey Composer
4993-Comment=Seamonkey Composer
4994-Exec=seamonkey -edit
4995-Icon=seamonkey-composer.xpm
4996-Terminal=false
4997-Type=Application
4998-Categories=GTK;WebDevelopment;Development;
4999-StartupNotify=true
5000-NoDisplay=true
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: