diff options
author | hasufell <julian.ospald@googlemail.com> | 2012-05-13 00:43:14 +0200 |
---|---|---|
committer | hasufell <julian.ospald@googlemail.com> | 2012-05-13 00:43:14 +0200 |
commit | 518bd4a84bb75a47c3b515c1d1de8b0eb2bc1f56 (patch) | |
tree | 0da6d5d43ed405333e64c73d2bffdfc73d3a7657 /www-client | |
parent | imported into portage (diff) | |
download | sunrise-reviewed-518bd4a84bb75a47c3b515c1d1de8b0eb2bc1f56.tar.gz sunrise-reviewed-518bd4a84bb75a47c3b515c1d1de8b0eb2bc1f56.tar.bz2 sunrise-reviewed-518bd4a84bb75a47c3b515c1d1de8b0eb2bc1f56.zip |
imported into tree
Diffstat (limited to 'www-client')
47 files changed, 0 insertions, 4816 deletions
diff --git a/www-client/torbrowser/ChangeLog b/www-client/torbrowser/ChangeLog deleted file mode 100644 index dd6de00a8..000000000 --- a/www-client/torbrowser/ChangeLog +++ /dev/null @@ -1,106 +0,0 @@ -# ChangeLog for www-client/torbrowser -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - - 05 May 2012; Mike Gilbert <floppym@gentoo.org> torbrowser-10.0.1.ebuild, - torbrowser-11.0.ebuild, torbrowser-12.0.ebuild: - Use pkgconfig virtual. - -*torbrowser-12.0 (03 May 2012) - - 03 May 2012; Julian Ospald <hasufell@gentoo.org> - +files/12.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch, - +files/12.0/0002-Make-Permissions-Manager-memory-only.patch, - +files/12.0/0003-Make-Intermediate-Cert-Store-memory-only.patch, - +files/12.0/0004-Add-a-string-based-cacheKey.patch, - +files/12.0/0005-Block-all-plugins-except-flash.patch, - +files/12.0/0006-Make-content-pref-service-memory-only-clearable.patch, - +files/12.0/0008-Disable-SSL-Session-ID-tracking.patch, - +files/12.0/0009-Provide-an-observer-event-to-close-persistent-connec.patch, - +files/12.0/0010-Provide-client-values-only-to-CSS-Media-Queries.patch, - +files/12.0/0011-Limit-the-number-of-fonts-per-document.patch, - +files/12.0/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch, - +files/12.0/0013-Rebrand-Firefox-to-TorBrowser.patch, - +files/12.0/0014-Make-Download-manager-memory-only.patch, - +files/12.0/0015-Add-DDG-and-StartPage-to-Omnibox.patch, - +files/12.0/0016-Adapt-Steven-Michaud-s-Mac-crashfix-patch-for-FF12.patch, - +files/12.0/0017-Make-nsICacheService.EvictEntries-synchronous.patch, - +torbrowser-12.0.ebuild: - version bump - - 16 Apr 2012; Mike Gilbert <floppym@gentoo.org> torbrowser-10.0.1.ebuild: - Whitespace - - 28 Mar 2012; Nathan Phillip Brink <binki@gentoo.org> torbrowser-11.0.ebuild: - Update RDEPEND and DEPEND to better match that from - www-browser/firefox-11.0-r1. - -*torbrowser-11.0 (27 Mar 2012) - - 27 Mar 2012; hasufell <julian.ospald@googlemail.com> - +files/11.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch, - +files/11.0/0008-Make-content-pref-service-memory-only-clearable.patch, - +torbrowser-11.0.ebuild, - +files/11.0/0002-Make-Permissions-Manager-memory-only.patch, - +files/11.0/0003-Make-Intermediate-Cert-Store-memory-only.patch, - +files/11.0/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch, - +files/11.0/0005-Add-a-string-based-cacheKey.patch, - +files/11.0/0006-Randomize-HTTP-pipeline-order-and-depth.patch, - +files/11.0/0007-Block-all-plugins-except-flash.patch, - +files/11.0/0010-Disable-SSL-Session-ID-tracking.patch, - +files/11.0/0011-Provide-an-observer-event-to-close-persistent-connec.patch, - +files/11.0/0012-Provide-client-values-only-to-CSS-Media-Queries.patch, - +files/11.0/0013-Limit-the-number-of-fonts-per-document.patch: - Version bump - - 27 Mar 2012; hasufell <julian.ospald@googlemail.com> - +files/10.0.1/0001-Block-Components.interfaces-lookupMethod-from-conten.patch - , +files/10.0.1/0002-Make-Permissions-Manager-memory-only.patch, - +files/10.0.1/0003-Make-Intermediate-Cert-Store-memory-only.patch, - +files/10.0.1/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch - , +files/10.0.1/0005-Add-a-string-based-cacheKey.patch, - +files/10.0.1/0006-Randomize-HTTP-pipeline-order-and-depth.patch, - +files/10.0.1/0007-Block-all-plugins-except-flash.patch, - +files/10.0.1/0008-Make-content-pref-service-memory-only-clearable.patch, - +files/10.0.1/0011-Provide-an-observer-event-to-close-persistent-connec.patch - , torbrowser-10.0.1.ebuild, - +files/10.0.1/0010-Disable-SSL-Session-ID-tracking.patch, - +files/10.0.1/0012-Provide-client-values-only-to-CSS-Media-Queries.patch, - +files/10.0.1/0013-Limit-the-number-of-fonts-per-document.patch, - -files/0001-Block-Components.interfaces-lookupMethod-from-conten.patch, - -files/0002-Make-Permissions-Manager-memory-only.patch, - -files/0003-Make-Intermediate-Cert-Store-memory-only.patch, - -files/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch, - -files/0005-Add-a-string-based-cacheKey.patch, - -files/0006-Randomize-HTTP-pipeline-order-and-depth.patch, - -files/0007-Block-all-plugins-except-flash.patch, - -files/0008-Make-content-pref-service-memory-only-clearable.patch, - -files/0010-Disable-SSL-Session-ID-tracking.patch, - -files/0011-Provide-an-observer-event-to-close-persistent-connec.patch, - -files/0012-Provide-client-values-only-to-CSS-Media-Queries.patch, - -files/0013-Limit-the-number-of-fonts-per-document.patch: - patches into subdirs - - 03 Mar 2012; hasufell <julian.ospald@googlemail.com> - -torbrowser-10.0.1.ebuild: - elog clarified, wrapper changed - -*torbrowser-10.0.1 (29 Feb 2012) - - 29 Feb 2012; hasufell <julian.ospald@googlemail.com> - +files/0001-Block-Components.interfaces-lookupMethod-from-conten.patch, - +torbrowser-10.0.1.ebuild, - +files/0002-Make-Permissions-Manager-memory-only.patch, - +files/0003-Make-Intermediate-Cert-Store-memory-only.patch, - +files/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch, - +files/0005-Add-a-string-based-cacheKey.patch, - +files/0008-Make-content-pref-service-memory-only-clearable.patch, - +files/libvpx-1.0.0.patch, - +files/0006-Randomize-HTTP-pipeline-order-and-depth.patch, - +files/0007-Block-all-plugins-except-flash.patch, - +files/0010-Disable-SSL-Session-ID-tracking.patch, - +files/0011-Provide-an-observer-event-to-close-persistent-connec.patch, - +files/0012-Provide-client-values-only-to-CSS-Media-Queries.patch, - +files/0013-Limit-the-number-of-fonts-per-document.patch, +metadata.xml: - New Ebuild for bug 406361 thanks to Tommy[D] and floppym - diff --git a/www-client/torbrowser/Manifest b/www-client/torbrowser/Manifest deleted file mode 100644 index 1a379a6c4..000000000 --- a/www-client/torbrowser/Manifest +++ /dev/null @@ -1,59 +0,0 @@ -AUX 10.0.1/0001-Block-Components.interfaces-lookupMethod-from-conten.patch 2341 RMD160 fbc2fcfce6b4bd0c71e7047465b58d036940b121 SHA1 44e132cc77c83a34040e9443b1ac02753bdb460c SHA256 ba87ff0d71b2805a55ee81faa94c28495d1c32758cc7dca625587973a542c328 -AUX 10.0.1/0002-Make-Permissions-Manager-memory-only.patch 3527 RMD160 f7fd305b9839db035221ffb82b4e5d95e27e1300 SHA1 6ce5d7db03952ee8958f89f02393df64e9c2da35 SHA256 0e37c7613f8002d8c3c12dfb2751b690a499bc5dcd62efaaf6ef609cdd9f14f5 -AUX 10.0.1/0003-Make-Intermediate-Cert-Store-memory-only.patch 1759 RMD160 216e937a942d7ada8dead73a7adb2e8a4a64fa45 SHA1 38db3394757a93cbfebd904a1ff271ab157617ca SHA256 3ffdc4f243a7fca22fb10c01ecf60557f6106deb8f11593ed6414ee63447ab15 -AUX 10.0.1/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch 1809 RMD160 454d41069f4dd30beec764f9d97d685bcb2b0b9a SHA1 60b12a906417b73359499b4b021bc6c959feaa09 SHA256 5ea53134f9597d114045d2194e2bc095639a214f659fe5aa01522e0ca855c1d3 -AUX 10.0.1/0005-Add-a-string-based-cacheKey.patch 2944 RMD160 795329a18c9648b1a9e8772c9a824f03c2d6289d SHA1 66d15a7d5cfb367d48780acbef5d086e1172195f SHA256 df7ced575cd74eef0abf3c4df6a6f550768347ece1217d5902de40e870df7924 -AUX 10.0.1/0006-Randomize-HTTP-pipeline-order-and-depth.patch 5102 RMD160 dea65273fef40e0bcc40448a0ef7774a174a7589 SHA1 237d4e95546e0be5688d493261d33640d8c8b158 SHA256 4a3070b13c5fd7b3cfd49379ba6c694fac4801e691dd02c4c8ae810d4cd18898 -AUX 10.0.1/0007-Block-all-plugins-except-flash.patch 2976 RMD160 ca87d505cfe5c6c81500f1d45bc41045fea744c9 SHA1 d2928897d807462c24b6aee0808f74bcdec14df1 SHA256 6a4fe0d7f477fb973b0d1f31a1f2863ef5e989c660711b33c5aba67a797cccc2 -AUX 10.0.1/0008-Make-content-pref-service-memory-only-clearable.patch 1357 RMD160 9026ff8ac2b2084c16134241d890e329e25e9a4d SHA1 39cbb12229ee6c1b332255ca26df48b6aa77c35a SHA256 38622cfd79a01e2dc26ff21342a082ad5d8d3ecfbf9a507814ff32e8cf6e9137 -AUX 10.0.1/0010-Disable-SSL-Session-ID-tracking.patch 1165 RMD160 998f444b644f3e51f9cbe4d4825899f123ef3c8d SHA1 17ddc949e4bc418bb7aff2297a2309de9841a2b4 SHA256 4610d5774472d8cc70aeb5e13a536ab23913c941d930d8b81c8a60bab7c8085e -AUX 10.0.1/0011-Provide-an-observer-event-to-close-persistent-connec.patch 1448 RMD160 02b6e4b943c97e0c75878577aefd96e9e684226e SHA1 80de39474fd21408d56595b7204b20684e1cca8c SHA256 0e59e4e9599f1cb0a62f1a85534b77308b83ce583f4b8bec5422f7007cff9103 -AUX 10.0.1/0012-Provide-client-values-only-to-CSS-Media-Queries.patch 2042 RMD160 effddc0d7b4097c6b2d9a334146eae7ae315264d SHA1 2dcdfe22f9092ac797db689a7e19a802347fec70 SHA256 33172e4cce2136b9005ebde7c2f0f4388aecdc6c1702781fc7481e34ab00d558 -AUX 10.0.1/0013-Limit-the-number-of-fonts-per-document.patch 7318 RMD160 85178f067f3294f20c515cdb71e9b7ff24ba742d SHA1 34c887ff33549f5820479e3d86144114fc1c746e SHA256 91dcd13b99d5378c4966f305b4089a4f6ebee46957ac057f9c0dc42544469b84 -AUX 11.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch 2341 RMD160 023ab74db2f535bbf55362becdc55e67cad9069d SHA1 2c97d4a7fa43b3e5889ff42753fd52044b7522bb SHA256 a4d9802aa0d65f2b2c685549a085f5ae0c64c49ef3af3ca6fd5a7817e9f4ca02 -AUX 11.0/0002-Make-Permissions-Manager-memory-only.patch 3527 RMD160 ed85f6bd76088b32c0027773410a83d9e990204d SHA1 b3838dc63d82bd18bf1aeecf42d6b0786927d899 SHA256 d7e78336a58d581ccace9c2da364516a763023c1992322a18080a6b0365e9bf5 -AUX 11.0/0003-Make-Intermediate-Cert-Store-memory-only.patch 1759 RMD160 a83236654f985087573647d056b812b2ce4f3563 SHA1 8ec94aac2bb93b8c5bc44e0a89ac2319b444b2d3 SHA256 5c367b98d6031172c4d7d92f7a0f96e53954f4688823eb1438b5b828a9768e82 -AUX 11.0/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch 1809 RMD160 4ef3a55eb80abe465541dad435ca4ae73f300cf2 SHA1 aeae43daae6502a8de7ffa94e00937347f718a74 SHA256 c35a9e656ededbc610e9aed8f95c998e90801a1abb77af8634a977cc815419ff -AUX 11.0/0005-Add-a-string-based-cacheKey.patch 2944 RMD160 8d35b259eac439e6e2a6d9d1790acb33eed9c28d SHA1 187c826af3f6c45fb73fc769c24dcc774474849b SHA256 8dd039ba8608526f21892a77703c68d592fe2257d199c40fbe3e727422b21f7a -AUX 11.0/0006-Randomize-HTTP-pipeline-order-and-depth.patch 5054 RMD160 93242dd7cfd2293f19cb65d999c309ac149e42e3 SHA1 9c48bcb2f0cb627faba7727281522acbae76e2f8 SHA256 51f48ab44a6c3af186c0dd755f52722fae4363ac83e1759869ed2820cd3450e8 -AUX 11.0/0007-Block-all-plugins-except-flash.patch 2976 RMD160 989b5c04faaa89f1ac5fabae14c0d089bae6052a SHA1 6aeb56243795c66286cf0b393b3738560fb815cb SHA256 0ca6650f0272fb2e1be1bcb791e8b5290752f7cd55af0818e5cacf7c4dce8851 -AUX 11.0/0008-Make-content-pref-service-memory-only-clearable.patch 1357 RMD160 0fd92daca7533dc135b683bb05604eeb47c3e36b SHA1 22fe30b690207a05798480dd430aa5bbcb19cd1c SHA256 75542e213d1a7f51a07d71101223ca4ea1e0a91f7ccdf07505ef6b9409a85339 -AUX 11.0/0010-Disable-SSL-Session-ID-tracking.patch 1165 RMD160 f85c78862bd68def93b70b3feaddb3d3b84ae87a SHA1 8b62490d3f628a012637d8e3a1f9323dbee7e4c5 SHA256 d24f4361b14e9806d1691c125364544991b82debd80554c42d5c3c9d3386b10f -AUX 11.0/0011-Provide-an-observer-event-to-close-persistent-connec.patch 1448 RMD160 124e2e191b160f88ae46ce5a9e2ca7c1c1e9b13c SHA1 f2f2aa277a3a85b45f003493a521f8a3b48542bb SHA256 7aa62fd654b06610d993a1202a6e7f63ab40f9abf028ede79fa09f705622640c -AUX 11.0/0012-Provide-client-values-only-to-CSS-Media-Queries.patch 2042 RMD160 ed75f265023568f1cb0227d9f1adda5ecdea5b48 SHA1 babc05665020d78ca4ccc690075d550de7e8cb63 SHA256 b09c41add5d6ebf52117a7169cabcc87024bcee9049dbd1a5c79acc1e758f4cf -AUX 11.0/0013-Limit-the-number-of-fonts-per-document.patch 7318 RMD160 d8ccf3e0cb21b795dae2f2272020f0681c57d263 SHA1 8b50867268cc0fb6693e208040f9eaab74f8ec4f SHA256 67ff7d48d5faeebc2a7e9e982a40a79547671fbd7ad4dcf5f7e9f17e0558b467 -AUX 12.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch 2341 RMD160 ea4ac7514cf0ca108c39c74c3896e8ae77077778 SHA1 6b6040ee04f1e2bd9a40db004f430a85640c8aa4 SHA256 ed24e887fdd2eff2ab75b26845539c92d637a91134af9467358c6887ce73f071 -AUX 12.0/0002-Make-Permissions-Manager-memory-only.patch 3527 RMD160 253d26b7d9119276da139ba6a3149883ad1ce640 SHA1 b826ab180edcc46e443e6e7f078f65c9d06d8aed SHA256 97e5a0fb2ed54649c175179a419cb70e7b4f8852e58bf0f6f97a8f6bb34b3d80 -AUX 12.0/0003-Make-Intermediate-Cert-Store-memory-only.patch 1759 RMD160 33cdd2cd28492d69e29fbfa3bbcc223201f9b6d7 SHA1 0a0eb5ba2f7e47e1575140c013cdc3a184576ebd SHA256 b42004e0a69bbb15aaeccf9ac89dae64557a16b5920c469680d0eb0b490a96b9 -AUX 12.0/0004-Add-a-string-based-cacheKey.patch 2944 RMD160 9da41b30d9b004cda9b5bbb097f30eedcd3144ad SHA1 7200a289f462c266ec9309981fcde6b635255057 SHA256 ccaf8992020fb0329dc2136cfe699d2258671ab80837d8548b9c2ece79713535 -AUX 12.0/0005-Block-all-plugins-except-flash.patch 2976 RMD160 922f5052784525a5d2d39c5680895d75bc285aad SHA1 8c40d8b4832ff22f72ce29f1a3c6aeb495d7497a SHA256 e1b00f96900329d6e260bf93229a786c649723aa72e6c7e15041d3ac83582db6 -AUX 12.0/0006-Make-content-pref-service-memory-only-clearable.patch 1357 RMD160 795608796f94fb845a5970f592161371d6d1339a SHA1 7fdd734e8789ae95dabb549a248e0d3319abdd80 SHA256 ccdcbdcca90fa0ef16ff17d62df567bb47747fd2b9debd727bceeaa84ac5d8ac -AUX 12.0/0008-Disable-SSL-Session-ID-tracking.patch 1165 RMD160 69788fb83c4a35578a0d592a5de51ab6f984162a SHA1 271e7dca6d0edb740d6ba4038af5d6af04175a22 SHA256 523f0e05aeac80040bcebf7202955d582de6fb65c0af6ab321f99a477f0226e4 -AUX 12.0/0009-Provide-an-observer-event-to-close-persistent-connec.patch 1448 RMD160 47e28796fb105ab76aac971bf287e023c976f601 SHA1 f4b89d78dd195ec8bc6a04894d1d65398365c0e1 SHA256 0267aa836a302852527811b43f851937e06d9f19e736fc2b9e0a30ca3d303d2b -AUX 12.0/0010-Provide-client-values-only-to-CSS-Media-Queries.patch 2042 RMD160 54b96063c6f34c97fd79c2562d57aa18c9af8ffa SHA1 de961c7437360bcc04ed1968c3efc2a32268a4a4 SHA256 245a07deaf009900b27f2abab0277a90fcfd1582abc65bd4aba0a7fc4dca704d -AUX 12.0/0011-Limit-the-number-of-fonts-per-document.patch 7318 RMD160 498e22647d198d5502e8c9bebad273de8f72698e SHA1 fef97a6c7a062f7493e7bcf5899f7d78978ac551 SHA256 60233e27f38f7afee6d78522d91aa0d8e03c80cf7d8b61c5d2232f3a37bfda6c -AUX 12.0/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch 8638 RMD160 0d667fab249165c94135af2ebd0e0c57cd9fd46f SHA1 3a01f51a8b5df9be026a48685733145878d1318d SHA256 be56ff7e4591c62604a8ac414d71273ae68db77b2c4e15c5766717d7e9aad41b -AUX 12.0/0013-Rebrand-Firefox-to-TorBrowser.patch 2151 RMD160 313ef15c00eb506bf19899774567827cbc2c2d0f SHA1 d839a369350456d852c56cc81bcfb6c91d335c1d SHA256 fb59437bc3982cb5b3edda0f3c4e545d036b11428fc58ebfbc09734e562b9e7a -AUX 12.0/0014-Make-Download-manager-memory-only.patch 2296 RMD160 7c72742923725fb3c009f01497892decbaef71a7 SHA1 950d18d528eecaac14531962735d61dd65e7dd6f SHA256 1c8291eb33f7edd41e12042d83e67f0c97dd10d9f30afb2dbdc18ce167d03db0 -AUX 12.0/0015-Add-DDG-and-StartPage-to-Omnibox.patch 5597 RMD160 88de6a2de4a912f01c543b39b38d3a8d3b3350e0 SHA1 74398f5384109024ec9256542f417e1eb9954da1 SHA256 24f9d89b071e715de28bdf7cfde06e49980264cc2173c7248dccbfd2ed6d9d20 -AUX 12.0/0016-Adapt-Steven-Michaud-s-Mac-crashfix-patch-for-FF12.patch 20276 RMD160 e95c35d1fc508216cb214dc6a1735edde041a3ae SHA1 06a8a55d137a87ccd7e21259614b565b126ccdc7 SHA256 f3a66ef7ff7f1106bb4d7f124d4ba56e008fee8b1ec19713453d97c7fab17641 -AUX 12.0/0017-Make-nsICacheService.EvictEntries-synchronous.patch 1654 RMD160 508708c6f5e1727e50a840f9685bfd466e8f1136 SHA1 2171a53bc651cc9c458901bc32d07e0705db26d1 SHA256 c7f7c586bb623d943d00ea19c69f3d2b92980cafe0a5528b3e952c96202592e3 -AUX libvpx-1.0.0.patch 2137 RMD160 f5425c9694d8c668da6fbe4726907579e3e1e1ff SHA1 6ffca3b3672eb97f88b72f14e792c5d02633307a SHA256 49ce639966c6596aaf6f1de4ed77699aaa86d7d14c0fe4b64b99bf2c6450e184 -DIST firefox-10.0-patches-0.5.tar.xz 16708 RMD160 40ccd212e16d4e5dd389db95aa7be0fe68361073 SHA1 3ca7cb54cdc2b704fe468cc26e1818648635b514 SHA256 981f40b1f2f12439d1301a0f7f4171aee4b84b16fe6b926344b63750efb21158 -DIST firefox-10.0.1.source.tar.bz2 75537947 RMD160 853c76ee98b25664daee8ee3ad881f45010767e1 SHA1 8613957db84e6722ccf1ebf74fab927139614bfc SHA256 d06dc35607e354d4c1524ca3344cd316a6d7a38c8c0578a52caee6a3adb054f5 -DIST firefox-11.0-patches-0.4.tar.xz 16876 RMD160 2edf20116eee6c01153332cbcda2655860f53d9b SHA1 9a34c6e76b2590b1fa1791477b92cd054fa6bece SHA256 543cdba1fd9a75f41183b817b2fae44099bde52e503e34e130566d3ca51b3f49 -DIST firefox-11.0.source.tar.bz2 78548401 RMD160 13b7c7327063625904d00b58a6d6f15c04918e92 SHA1 0b05f91b81803010502cf89f54c3d0187fb63d7e SHA256 2fda6bcfe455c2449a8a69bc16bf13f6ea6006badb0657dae63107e52f051701 -DIST firefox-12.0-patches-0.1.tar.xz 12996 RMD160 cd0c534410b512ca13504106465712ae51b4e5f0 SHA1 7ce3f371f43e73deca289a354dd9155b6a9bc8ff SHA256 de8573ad0019fd9b09bd94aefb3519286a04252a9d761bbf96f4c77d3c135174 -DIST firefox-12.0.source.tar.bz2 78956707 RMD160 d83eb97543fc09f84b30a46ba8217c17f30bd572 SHA1 0177185e54b7d63dc36bd5bd5c80ba6afd52e199 SHA256 9a232a10e5803b0e4a85bd986e3e88b87ccde7bdc3363ea7022d5761944dbb1d -DIST tor-browser-gnu-linux-i686-2.2.35-10-dev-en-US.tar.gz 31599947 RMD160 bf9455174b4a8a93f221bdfbf11b3dd8ba520e5f SHA1 dde62f106d0936af142b6cacb6f828efe790f141 SHA256 463b4184bf016b6fcbec09376ef143ae6f75c00cec150a9c36cf66751d4c32db -DIST tor-browser-gnu-linux-i686-2.2.35-7.2-dev-en-US.tar.gz 30489710 RMD160 fca09ea9a5f7778a8179f274040561287f206da0 SHA1 b83c21d1f7965df69ec0a71cef22abc8f3024d14 SHA256 5b657ffa3724658c4225493c868fbe8938eec8f3db3017988857c416d075af10 -DIST tor-browser-gnu-linux-i686-2.2.35-9-dev-en-US.tar.gz 30969314 RMD160 9528c3294a9bad1fe1508938490c1f3adfc0bdfb SHA1 6af9a359319f96052d1b3f483408bac35c468c68 SHA256 35e335c2b1cbfae1dd13e9f000d19c2d165371fbe121f7029daae6bd48cfe4e6 -DIST tor-browser-gnu-linux-x86_64-2.2.35-10-dev-en-US.tar.gz 32685020 RMD160 8e81ba0edc9b2979e0d1209706f89317b4bca1c1 SHA1 d82e25510eab234f1dbbda5107b95b3f8aebc643 SHA256 e9e75b08a4d604f033b28fd06d458b661de1d0d082f8dd40fbffc7bcbb8eb0f8 -DIST tor-browser-gnu-linux-x86_64-2.2.35-7.2-dev-en-US.tar.gz 31430945 RMD160 fbc930b08509abac9f5d11d67bfa84dce16639d9 SHA1 18ce8a31287e712c3b34a175d4179ee479bb8cd9 SHA256 45cba289d2b97639bea7910e86684614d7defca377d6c0a41af3f20ad267a720 -DIST tor-browser-gnu-linux-x86_64-2.2.35-9-dev-en-US.tar.gz 31898894 RMD160 bc6014bfaf781c7efbd2526fff2421aa576b22ee SHA1 9ce091956c527a20197bd194042e1d3ec96f6709 SHA256 5b3424e396ca240cd284e02cc0fe9df13de6a3bcd7f7da72c48bb6f09c46362a -DIST torbrowser.png 1383 RMD160 fb32cdee9dfb09a5341c5f96aff540ac122ee46a SHA1 c5bc62339515de7c0ff0691db086eec8a7fe18a1 SHA256 36af7b3f72fab03d478f08416df7832bf146ebdb2fa1f2ed0ac398d75c7f9284 -EBUILD torbrowser-10.0.1.ebuild 9589 RMD160 46b09aed61ed438d927da09058ccda475b68e2e4 SHA1 e505765ff4a1527054c9dc2b2f82c116ec2bbb93 SHA256 3998c16a129ec8502d2a6326160e43570df73beb7d6f155c2c8521428f948d2c -EBUILD torbrowser-11.0.ebuild 9465 RMD160 025c3c77ff116e6353cf4a0b85b1b97a206971a2 SHA1 9dfc658da8881371a789ea261617727cfc098d62 SHA256 59f3d81995e5b21562d1786ec82f28e635aed0fd1dd09730f7d039535e6f3325 -EBUILD torbrowser-12.0.ebuild 9629 RMD160 ce3829b6fdab72f9348383753833a9799fb05a21 SHA1 9693163885c1c4a03844b8174146622f5dde395e SHA256 2fda322801b4c497595c060821c49d1c53348a8a0b22eafd6c36042c9d1bd819 -MISC ChangeLog 5466 RMD160 9b7e2fcf9787123b6c419a2b83f906265587b49c SHA1 c40eca81a142872e5502cfec00d231871b2e3ab4 SHA256 14b9582364eaa2fe49fe5c06cc43249cb76d240d88a464afa42dff64e98a6f68 -MISC metadata.xml 1479 RMD160 9be44a70554adc58388f1b4246ddafad36b993f5 SHA1 2f64542c16cbf163be8a0f6dccf82d4c4402a798 SHA256 8ccb5d4c7687f71250c54418f69bbdf1e84d1d81ea67472faf8964f4190427e0 diff --git a/www-client/torbrowser/files/10.0.1/0001-Block-Components.interfaces-lookupMethod-from-conten.patch b/www-client/torbrowser/files/10.0.1/0001-Block-Components.interfaces-lookupMethod-from-conten.patch deleted file mode 100644 index ba0da286a..000000000 --- a/www-client/torbrowser/files/10.0.1/0001-Block-Components.interfaces-lookupMethod-from-conten.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 67b86f0c22070cbf86112174ae1e2ce6d6a36dee Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:40:40 -0800 -Subject: [PATCH 01/13] Block Components.interfaces,lookupMethod from content - -This patch removes the ability of content script to access -Components.interfaces.* as well as call or access Components.lookupMethod. - -These two interfaces seem to be exposed to content script only to make our -lives difficult. Components.lookupMethod can undo our JS hooks, and -Components.interfaces is useful for fingerprinting the platform, OS, and -Firebox version. - -They appear to have no other legitimate use. See also: -https://bugzilla.mozilla.org/show_bug.cgi?id=429070 -https://trac.torproject.org/projects/tor/ticket/2873 -https://trac.torproject.org/projects/tor/ticket/2874 ---- - js/xpconnect/src/XPCComponents.cpp | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp -index 3bcbf91..d5c020a 100644 ---- a/js/xpconnect/src/XPCComponents.cpp -+++ b/js/xpconnect/src/XPCComponents.cpp -@@ -4456,7 +4456,9 @@ nsXPCComponents::CanCreateWrapper(const nsIID * iid, char **_retval) - NS_IMETHODIMP - nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, char **_retval) - { -- static const char* allowed[] = { "isSuccessCode", "lookupMethod", nsnull }; -+ // XXX: Pref observer? Also, is this what we want? Seems like a plan -+ //static const char* allowed[] = { "isSuccessCode", "lookupMethod", nsnull }; -+ static const char* allowed[] = { "isSuccessCode", nsnull }; - *_retval = xpc_CheckAccessList(methodName, allowed); - return NS_OK; - } -@@ -4465,7 +4467,9 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c - NS_IMETHODIMP - nsXPCComponents::CanGetProperty(const nsIID * iid, const PRUnichar *propertyName, char **_retval) - { -- static const char* allowed[] = { "interfaces", "interfacesByID", "results", nsnull}; -+ // XXX: Pref observer? Also, is this what we want? Seems like a plan -+ // static const char* allowed[] = { "interfaces", "interfacesByID", "results", nsnull}; -+ static const char* allowed[] = { "results", nsnull}; - *_retval = xpc_CheckAccessList(propertyName, allowed); - return NS_OK; - } --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0002-Make-Permissions-Manager-memory-only.patch b/www-client/torbrowser/files/10.0.1/0002-Make-Permissions-Manager-memory-only.patch deleted file mode 100644 index ecd1e3236..000000000 --- a/www-client/torbrowser/files/10.0.1/0002-Make-Permissions-Manager-memory-only.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 193c50c03aa61eef5415d0476467c22941022a11 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:45:16 -0800 -Subject: [PATCH 02/13] Make Permissions Manager memory-only - -This patch exposes a pref 'permissions.memory_only' that properly isolates the -permissions manager to memory, which is responsible for all user specified -site permissions, as well as stored STS policy. - -The pref does successfully clear the permissions manager memory if toggled. It -does not need to be set in prefs.js, and can be handled by Torbutton. - -https://trac.torproject.org/projects/tor/ticket/2950 ---- - extensions/cookie/nsPermissionManager.cpp | 34 ++++++++++++++++++++++++++-- - 1 files changed, 31 insertions(+), 3 deletions(-) - -diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp -index 67eb216..12cc7cf 100644 ---- a/extensions/cookie/nsPermissionManager.cpp -+++ b/extensions/cookie/nsPermissionManager.cpp -@@ -58,6 +58,10 @@ - #include "mozStorageHelper.h" - #include "mozStorageCID.h" - #include "nsXULAppAPI.h" -+#include "nsCOMPtr.h" -+#include "nsIPrefService.h" -+#include "nsIPrefBranch.h" -+#include "nsIPrefBranch2.h" - - static nsPermissionManager *gPermissionManager = nsnull; - -@@ -203,6 +207,11 @@ nsPermissionManager::Init() - mObserverService->AddObserver(this, "profile-do-change", true); - } - -+ nsCOMPtr<nsIPrefBranch2> pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (pbi) { -+ pbi->AddObserver("permissions.", this, PR_FALSE); -+ } -+ - if (IsChildProcess()) { - // Get the permissions from the parent process - InfallibleTArray<IPC::Permission> perms; -@@ -251,8 +260,18 @@ nsPermissionManager::InitDB(bool aRemoveFile) - if (!storage) - return NS_ERROR_UNEXPECTED; - -+ bool memory_db = false; -+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (prefs) { -+ prefs->GetBoolPref("permissions.memory_only", &memory_db); -+ } -+ - // cache a connection to the hosts database -- rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ if (memory_db) { -+ rv = storage->OpenSpecialDatabase("memory", getter_AddRefs(mDBConn)); -+ } else { -+ rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ } - NS_ENSURE_SUCCESS(rv, rv); - - bool ready; -@@ -262,7 +281,11 @@ nsPermissionManager::InitDB(bool aRemoveFile) - rv = permissionsFile->Remove(false); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ if (memory_db) { -+ rv = storage->OpenSpecialDatabase("memory", getter_AddRefs(mDBConn)); -+ } else { -+ rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ } - NS_ENSURE_SUCCESS(rv, rv); - - mDBConn->GetConnectionReady(&ready); -@@ -783,7 +806,12 @@ NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aT - { - ENSURE_NOT_CHILD_PROCESS; - -- if (!nsCRT::strcmp(aTopic, "profile-before-change")) { -+ if (nsCRT::strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) { -+ if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("permissions.memory_only").get())) { -+ // XXX: Should we remove the file? Probably not.. -+ InitDB(PR_FALSE); -+ } -+ } else if (!nsCRT::strcmp(aTopic, "profile-before-change")) { - // The profile is about to change, - // or is going away because the application is shutting down. - if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) { --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0003-Make-Intermediate-Cert-Store-memory-only.patch b/www-client/torbrowser/files/10.0.1/0003-Make-Intermediate-Cert-Store-memory-only.patch deleted file mode 100644 index ec575bcdd..000000000 --- a/www-client/torbrowser/files/10.0.1/0003-Make-Intermediate-Cert-Store-memory-only.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 5d72233faeba1745962f55fa09fe2f537eda93ec Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 19 Aug 2011 17:58:23 -0700 -Subject: [PATCH 03/13] Make Intermediate Cert Store memory-only. - -This patch makes the intermediate SSL cert store exist in memory only. - -The pref must be set before startup in prefs.js. -https://trac.torproject.org/projects/tor/ticket/2949 ---- - security/manager/ssl/src/nsNSSComponent.cpp | 15 ++++++++++++++- - 1 files changed, 14 insertions(+), 1 deletions(-) - -diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp -index a08c4ef..0ec3713 100644 ---- a/security/manager/ssl/src/nsNSSComponent.cpp -+++ b/security/manager/ssl/src/nsNSSComponent.cpp -@@ -1730,8 +1730,21 @@ nsNSSComponent::InitializeNSS(bool showWarningBox) - // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as - // "/usr/lib/nss/libnssckbi.so". - PRUint32 init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; -- SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "", -+ bool nocertdb = false; -+ mPrefBranch->GetBoolPref("security.nocertdb", &nocertdb); -+ -+ // XXX: We can also do the the following to only disable the certdb. -+ // Leaving this codepath in as a fallback in case InitNODB fails -+ if (nocertdb) -+ init_flags |= NSS_INIT_NOCERTDB; -+ -+ SECStatus init_rv; -+ if (nocertdb) { -+ init_rv = ::NSS_NoDB_Init(NULL); -+ } else { -+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", - SECMOD_DB, init_flags); -+ } - - if (init_rv != SECSuccess) { - PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get())); --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch b/www-client/torbrowser/files/10.0.1/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch deleted file mode 100644 index 44dfcccc8..000000000 --- a/www-client/torbrowser/files/10.0.1/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 6dc27a50e06bca139a07546f94a827f1fdb762b7 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 2 Sep 2011 15:33:20 -0700 -Subject: [PATCH 04/13] Add HTTP auth headers before the modify-request - observer. - -Otherwise, how are we supposed to modify them? - -Thanks to Georg Koppen for spotting both the problem and this fix. ---- - netwerk/protocol/http/nsHttpChannel.cpp | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp -index dec2a83..4c5e759 100644 ---- a/netwerk/protocol/http/nsHttpChannel.cpp -+++ b/netwerk/protocol/http/nsHttpChannel.cpp -@@ -316,9 +316,6 @@ nsHttpChannel::Connect(bool firstTime) - return NS_ERROR_DOCUMENT_NOT_CACHED; - } - -- // check to see if authorization headers should be included -- mAuthProvider->AddAuthorizationHeaders(); -- - if (mLoadFlags & LOAD_NO_NETWORK_IO) { - return NS_ERROR_DOCUMENT_NOT_CACHED; - } -@@ -3701,6 +3698,9 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context) - - AddCookiesToRequest(); - -+ // check to see if authorization headers should be included -+ mAuthProvider->AddAuthorizationHeaders(); -+ - // notify "http-on-modify-request" observers - gHttpHandler->OnModifyRequest(this); - -@@ -4795,7 +4795,10 @@ nsHttpChannel::DoAuthRetry(nsAHttpConnection *conn) - // this authentication attempt (bug 84794). - // TODO: save cookies from auth response and send them here (bug 572151). - AddCookiesToRequest(); -- -+ -+ // check to see if authorization headers should be included -+ mAuthProvider->AddAuthorizationHeaders(); -+ - // notify "http-on-modify-request" observers - gHttpHandler->OnModifyRequest(this); - --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0005-Add-a-string-based-cacheKey.patch b/www-client/torbrowser/files/10.0.1/0005-Add-a-string-based-cacheKey.patch deleted file mode 100644 index 822033abc..000000000 --- a/www-client/torbrowser/files/10.0.1/0005-Add-a-string-based-cacheKey.patch +++ /dev/null @@ -1,85 +0,0 @@ -From a06818f3a358e6c4502b944ecd264fd2ccaff5bf Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 2 Sep 2011 20:47:02 -0700 -Subject: [PATCH 05/13] Add a string-based cacheKey. - -Used for isolating cache according to same-origin policy. ---- - netwerk/base/public/nsICachingChannel.idl | 7 +++++++ - netwerk/protocol/http/nsHttpChannel.cpp | 22 ++++++++++++++++++++++ - netwerk/protocol/http/nsHttpChannel.h | 1 + - 3 files changed, 30 insertions(+), 0 deletions(-) - -diff --git a/netwerk/base/public/nsICachingChannel.idl b/netwerk/base/public/nsICachingChannel.idl -index 2da46d6..4ee5774 100644 ---- a/netwerk/base/public/nsICachingChannel.idl -+++ b/netwerk/base/public/nsICachingChannel.idl -@@ -98,6 +98,13 @@ interface nsICachingChannel : nsICacheInfoChannel - attribute nsISupports cacheKey; - - /** -+ * Set/get the cache domain... uniquely identifies the data in the cache -+ * for this channel. Holding a reference to this key does NOT prevent -+ * the cached data from being removed. -+ */ -+ attribute AUTF8String cacheDomain; -+ -+ /** - * Specifies whether or not the data should be cached to a file. This - * may fail if the disk cache is not present. The value of this attribute - * is usually only settable during the processing of a channel's -diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp -index 4c5e759..6205d62 100644 ---- a/netwerk/protocol/http/nsHttpChannel.cpp -+++ b/netwerk/protocol/http/nsHttpChannel.cpp -@@ -2389,6 +2389,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID, - cacheKey.Append(buf); - } - -+ if (strlen(mCacheDomain.get()) > 0) { -+ cacheKey.AppendLiteral("domain="); -+ cacheKey.Append(mCacheDomain.get()); -+ cacheKey.AppendLiteral("&"); -+ } -+ - if (!cacheKey.IsEmpty()) { - cacheKey.AppendLiteral("uri="); - } -@@ -4695,6 +4701,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value) - } - - NS_IMETHODIMP -+nsHttpChannel::GetCacheDomain(nsACString &value) -+{ -+ value = mCacheDomain; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsHttpChannel::SetCacheDomain(const nsACString &value) -+{ -+ mCacheDomain = value; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP - nsHttpChannel::GetOfflineCacheClientID(nsACString &value) - { - value = mOfflineCacheClientID; -diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h -index 88ce469..53538cf 100644 ---- a/netwerk/protocol/http/nsHttpChannel.h -+++ b/netwerk/protocol/http/nsHttpChannel.h -@@ -303,6 +303,7 @@ private: - nsCOMPtr<nsICacheEntryDescriptor> mOfflineCacheEntry; - nsCacheAccessMode mOfflineCacheAccess; - nsCString mOfflineCacheClientID; -+ nsCString mCacheDomain; - - // auth specific data - nsCOMPtr<nsIHttpChannelAuthProvider> mAuthProvider; --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0006-Randomize-HTTP-pipeline-order-and-depth.patch b/www-client/torbrowser/files/10.0.1/0006-Randomize-HTTP-pipeline-order-and-depth.patch deleted file mode 100644 index de40bfec5..000000000 --- a/www-client/torbrowser/files/10.0.1/0006-Randomize-HTTP-pipeline-order-and-depth.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 755f71320538b0a813807cc3f4076dd20cbe9849 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 16:05:22 -0800 -Subject: [PATCH 06/13] Randomize HTTP pipeline order and depth. - -This is an experimental defense against -http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf - -See also: -https://blog.torproject.org/blog/experimental-defense-website-traffic-fingerprinting ---- - netwerk/protocol/http/nsHttpConnectionMgr.cpp | 78 ++++++++++++++++++++++++- - netwerk/protocol/http/nsHttpConnectionMgr.h | 4 + - 2 files changed, 81 insertions(+), 1 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp -index 23ef893..bba456d 100644 ---- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp -+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp -@@ -94,6 +94,11 @@ nsHttpConnectionMgr::nsHttpConnectionMgr() - { - LOG(("Creating nsHttpConnectionMgr @%x\n", this)); - mCT.Init(); -+ nsresult rv; -+ mRandomGenerator = do_GetService("@mozilla.org/security/random-generator;1", &rv); -+ if (NS_FAILED(rv)) { -+ mRandomGenerator = nsnull; -+ } - } - - nsHttpConnectionMgr::~nsHttpConnectionMgr() -@@ -865,7 +870,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent, - nsHttpPipeline *pipeline = nsnull; - if (conn->SupportsPipelining() && (caps & NS_HTTP_ALLOW_PIPELINING)) { - LOG((" looking to build pipeline...\n")); -- if (BuildPipeline(ent, trans, &pipeline)) -+ if (BuildRandomizedPipeline(ent, trans, &pipeline)) - trans = pipeline; - } - -@@ -938,6 +943,77 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent, - return true; - } - -+bool -+nsHttpConnectionMgr::BuildRandomizedPipeline(nsConnectionEntry *ent, -+ nsAHttpTransaction *firstTrans, -+ nsHttpPipeline **result) -+{ -+ if (mRandomGenerator == nsnull) -+ return BuildPipeline(ent, firstTrans, result); -+ if (mMaxPipelinedRequests < 2) -+ return PR_FALSE; -+ -+ nsresult rv; -+ PRUint8 *bytes = nsnull; -+ -+ nsHttpPipeline *pipeline = nsnull; -+ nsHttpTransaction *trans; -+ -+ PRUint32 i = 0, numAdded = 0, numAllowed = 0; -+ PRUint32 max = 0; -+ -+ while (i < ent->mPendingQ.Length()) { -+ if (ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING) -+ numAllowed++; -+ i++; -+ } -+ -+ rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ // 4...12 -+ max = 4 + (bytes[0] % (mMaxPipelinedRequests + 1)); -+ NS_Free(bytes); -+ -+ while (numAllowed > 0) { -+ rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ i = bytes[0] % ent->mPendingQ.Length(); -+ NS_Free(bytes); -+ -+ trans = ent->mPendingQ[i]; -+ -+ if (!(ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING)) -+ continue; -+ -+ if (numAdded == 0) { -+ pipeline = new nsHttpPipeline; -+ if (!pipeline) -+ return PR_FALSE; -+ pipeline->AddTransaction(firstTrans); -+ numAdded = 1; -+ } -+ pipeline->AddTransaction(trans); -+ -+ // remove transaction from pending queue -+ ent->mPendingQ.RemoveElementAt(i); -+ NS_RELEASE(trans); -+ -+ numAllowed--; -+ -+ if (++numAdded == max) -+ break; -+ } -+ -+ //fprintf(stderr, "Yay!!! pipelined %u/%u transactions\n", numAdded, max); -+ LOG((" pipelined %u/%u transactions\n", numAdded, max)); -+ -+ if (numAdded == 0) -+ return PR_FALSE; -+ -+ NS_ADDREF(*result = pipeline); -+ return PR_TRUE; -+} -+ - nsresult - nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans) - { -diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h -index cdf21a9..9647225 100644 ---- a/netwerk/protocol/http/nsHttpConnectionMgr.h -+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h -@@ -48,6 +48,7 @@ - #include "nsAutoPtr.h" - #include "mozilla/ReentrantMonitor.h" - #include "nsISocketTransportService.h" -+#include "nsIRandomGenerator.h" - - #include "nsIObserver.h" - #include "nsITimer.h" -@@ -276,6 +277,7 @@ private: - nsresult DispatchTransaction(nsConnectionEntry *, nsAHttpTransaction *, - PRUint8 caps, nsHttpConnection *); - bool BuildPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **); -+ bool BuildRandomizedPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **); - nsresult ProcessNewTransaction(nsHttpTransaction *); - nsresult EnsureSocketThreadTargetIfOnline(); - void ClosePersistentConnections(nsConnectionEntry *ent); -@@ -353,6 +355,8 @@ private: - PRUint64 mTimeOfNextWakeUp; - // Timer for next pruning of dead connections. - nsCOMPtr<nsITimer> mTimer; -+ // Random number generator for reordering HTTP pipeline -+ nsCOMPtr<nsIRandomGenerator> mRandomGenerator; - - // - // the connection table --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0007-Block-all-plugins-except-flash.patch b/www-client/torbrowser/files/10.0.1/0007-Block-all-plugins-except-flash.patch deleted file mode 100644 index ef8318507..000000000 --- a/www-client/torbrowser/files/10.0.1/0007-Block-all-plugins-except-flash.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 7d6e270e1a05e1fe57d069b9859c9b51904db33e Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:50:15 -0800 -Subject: [PATCH 07/13] Block all plugins except flash. - -We cannot use the @mozilla.org/extensions/blocklist;1 service, because we -actually want to stop plugins from ever entering the browser's process space -and/or executing code (for example, AV plugins that collect statistics/analyse -urls, magical toolbars that phone home or "help" the user, skype buttons that -ruin our day, and censorship filters). Hence we rolled our own. - -See https://trac.torproject.org/projects/tor/ticket/3547#comment:6 for musings -on a better way. Until then, it is delta-darwinism for us. ---- - dom/plugins/base/nsPluginHost.cpp | 33 +++++++++++++++++++++++++++++++++ - dom/plugins/base/nsPluginHost.h | 2 ++ - 2 files changed, 35 insertions(+), 0 deletions(-) - -diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp -index 729c9ef..1f4652d 100644 ---- a/dom/plugins/base/nsPluginHost.cpp -+++ b/dom/plugins/base/nsPluginHost.cpp -@@ -1965,6 +1965,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag) - return false; - } - -+PRBool nsPluginHost::GhettoBlacklist(nsIFile *pluginFile) -+{ -+ nsCString leaf; -+ const char *leafStr; -+ nsresult rv; -+ -+ rv = pluginFile->GetNativeLeafName(leaf); -+ if (NS_FAILED(rv)) { -+ return PR_TRUE; // fuck 'em. blacklist. -+ } -+ -+ leafStr = leaf.get(); -+ -+ if (!leafStr) { -+ return PR_TRUE; // fuck 'em. blacklist. -+ } -+ -+ // libgnashplugin.so, libflashplayer.so, Flash Player-10.4-10.5.plugin, -+ // NPSWF32.dll, NPSWF64.dll -+ if (strstr(leafStr, "libgnashplugin") == leafStr || -+ strstr(leafStr, "libflashplayer") == leafStr || -+ strstr(leafStr, "Flash Player") == leafStr || -+ strstr(leafStr, "NPSWF") == leafStr) { -+ return PR_FALSE; -+ } -+ -+ return PR_TRUE; // fuck 'em. blacklist. -+} -+ - typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void); - - nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, -@@ -2086,6 +2115,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, - continue; - } - -+ if (GhettoBlacklist(localfile)) { -+ continue; -+ } -+ - // if it is not found in cache info list or has been changed, create a new one - if (!pluginTag) { - nsPluginFile pluginFile(localfile); -diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h -index 39a8891..c262abf 100644 ---- a/dom/plugins/base/nsPluginHost.h -+++ b/dom/plugins/base/nsPluginHost.h -@@ -278,6 +278,8 @@ private: - // Loads all cached plugins info into mCachedPlugins - nsresult ReadPluginInfo(); - -+ PRBool GhettoBlacklist(nsIFile *pluginFile); -+ - // Given a file path, returns the plugins info from our cache - // and removes it from the cache. - void RemoveCachedPluginsInfo(const char *filePath, --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0008-Make-content-pref-service-memory-only-clearable.patch b/www-client/torbrowser/files/10.0.1/0008-Make-content-pref-service-memory-only-clearable.patch deleted file mode 100644 index ac911702f..000000000 --- a/www-client/torbrowser/files/10.0.1/0008-Make-content-pref-service-memory-only-clearable.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 23a09d0a6def1e2f7190177a875ab5a85c5da7b7 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Thu, 8 Sep 2011 08:40:17 -0700 -Subject: [PATCH 08/13] Make content pref service memory-only + clearable - -This prevents random urls from being inserted into content-prefs.sqllite in -the profile directory as content prefs change (includes site-zoom and perhaps -other site prefs?). ---- - .../contentprefs/nsContentPrefService.js | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js -index adfb650..1619d5f 100644 ---- a/toolkit/components/contentprefs/nsContentPrefService.js -+++ b/toolkit/components/contentprefs/nsContentPrefService.js -@@ -1240,7 +1240,7 @@ ContentPrefService.prototype = { - - var dbConnection; - -- if (!dbFile.exists()) -+ if (true || !dbFile.exists()) - dbConnection = this._dbCreate(dbService, dbFile); - else { - try { -@@ -1288,7 +1288,7 @@ ContentPrefService.prototype = { - }, - - _dbCreate: function ContentPrefService__dbCreate(aDBService, aDBFile) { -- var dbConnection = aDBService.openDatabase(aDBFile); -+ var dbConnection = aDBService.openSpecialDatabase("memory"); - - try { - this._dbCreateSchema(dbConnection); --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0010-Disable-SSL-Session-ID-tracking.patch b/www-client/torbrowser/files/10.0.1/0010-Disable-SSL-Session-ID-tracking.patch deleted file mode 100644 index 8722540ae..000000000 --- a/www-client/torbrowser/files/10.0.1/0010-Disable-SSL-Session-ID-tracking.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8bfcf12fe59b7b9940830446bf331729f5c86b3d Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Wed, 7 Dec 2011 19:36:38 -0800 -Subject: [PATCH 10/13] Disable SSL Session ID tracking. - -We can't easily bind SSL Session ID tracking to url bar domain, -so we have to disable them to satisfy -https://www.torproject.org/projects/torbrowser/design/#identifier-linkability. ---- - security/nss/lib/ssl/sslsock.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c -index 2e6f9ed..c8a993b 100644 ---- a/security/nss/lib/ssl/sslsock.c -+++ b/security/nss/lib/ssl/sslsock.c -@@ -172,7 +172,7 @@ static sslOptions ssl_defaults = { - PR_FALSE, /* enableSSL2 */ /* now defaults to off in NSS 3.13 */ - PR_TRUE, /* enableSSL3 */ - PR_TRUE, /* enableTLS */ /* now defaults to on in NSS 3.0 */ -- PR_FALSE, /* noCache */ -+ PR_TRUE, /* noCache */ - PR_FALSE, /* fdx */ - PR_FALSE, /* v2CompatibleHello */ /* now defaults to off in NSS 3.13 */ - PR_TRUE, /* detectRollBack */ --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0011-Provide-an-observer-event-to-close-persistent-connec.patch b/www-client/torbrowser/files/10.0.1/0011-Provide-an-observer-event-to-close-persistent-connec.patch deleted file mode 100644 index 7d91c66b1..000000000 --- a/www-client/torbrowser/files/10.0.1/0011-Provide-an-observer-event-to-close-persistent-connec.patch +++ /dev/null @@ -1,40 +0,0 @@ -From befcfaff647b1e09722d100fbf2dadcc22cfdc2b Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:53:28 -0800 -Subject: [PATCH 11/13] Provide an observer event to close persistent - connections - -We need to prevent linkability across "New Identity", which includes closing -keep-alive connections. ---- - netwerk/protocol/http/nsHttpHandler.cpp | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp -index f21598e..f3bf6af 100644 ---- a/netwerk/protocol/http/nsHttpHandler.cpp -+++ b/netwerk/protocol/http/nsHttpHandler.cpp -@@ -321,6 +321,7 @@ nsHttpHandler::Init() - mObserverService->AddObserver(this, "net:clear-active-logins", true); - mObserverService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, true); - mObserverService->AddObserver(this, "net:prune-dead-connections", true); -+ mObserverService->AddObserver(this, "net:prune-all-connections", PR_TRUE); - } - - return NS_OK; -@@ -1481,6 +1482,12 @@ nsHttpHandler::Observe(nsISupports *subject, - mConnMgr->PruneDeadConnections(); - } - } -+ else if (strcmp(topic, "net:prune-all-connections") == 0) { -+ if (mConnMgr) { -+ mConnMgr->ClosePersistentConnections(); -+ mConnMgr->PruneDeadConnections(); -+ } -+ } - - return NS_OK; - } --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0012-Provide-client-values-only-to-CSS-Media-Queries.patch b/www-client/torbrowser/files/10.0.1/0012-Provide-client-values-only-to-CSS-Media-Queries.patch deleted file mode 100644 index d3e636bf7..000000000 --- a/www-client/torbrowser/files/10.0.1/0012-Provide-client-values-only-to-CSS-Media-Queries.patch +++ /dev/null @@ -1,72 +0,0 @@ -From b5c42aa7668ac12b034cc1806ae1dc48732fa9b5 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Tue, 20 Dec 2011 21:02:49 -0800 -Subject: [PATCH 12/13] Provide client values only to CSS Media Queries - -Also disable a bunch of Mozilla extensions that smell like they are -fingerprintable. - -This is done to address -https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability ---- - layout/style/nsMediaFeatures.cpp | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp -index 6eca06e..c68f191 100644 ---- a/layout/style/nsMediaFeatures.cpp -+++ b/layout/style/nsMediaFeatures.cpp -@@ -383,14 +383,14 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eLength, - { nsnull }, -- GetDeviceWidth -+ GetWidth - }, - { - &nsGkAtoms::deviceHeight, - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eLength, - { nsnull }, -- GetDeviceHeight -+ GetHeight - }, - { - &nsGkAtoms::orientation, -@@ -411,7 +411,7 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eIntRatio, - { nsnull }, -- GetDeviceAspectRatio -+ GetAspectRatio - }, - { - &nsGkAtoms::color, -@@ -457,6 +457,7 @@ nsMediaFeatures::features[] = { - }, - - // Mozilla extensions -+/* - { - &nsGkAtoms::_moz_device_pixel_ratio, - nsMediaFeature::eMinMaxAllowed, -@@ -469,7 +470,7 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxNotAllowed, - nsMediaFeature::eEnumerated, - { kOrientationKeywords }, -- GetDeviceOrientation -+ GetOrientation - }, - { - &nsGkAtoms::_moz_is_resource_document, -@@ -590,6 +591,7 @@ nsMediaFeatures::features[] = { - { nsnull }, - GetWindowsTheme - }, -+*/ - // Null-mName terminator: - { - nsnull, --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/10.0.1/0013-Limit-the-number-of-fonts-per-document.patch b/www-client/torbrowser/files/10.0.1/0013-Limit-the-number-of-fonts-per-document.patch deleted file mode 100644 index 4ae2487d8..000000000 --- a/www-client/torbrowser/files/10.0.1/0013-Limit-the-number-of-fonts-per-document.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 4ed1e1c2372216cfcf377b369a9d44bb9f60ee14 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 16:01:21 -0800 -Subject: [PATCH 13/13] Limit the number of fonts per document. - -We create two prefs: -browser.display.max_font_count and browser.display.max_font_attempts. -max_font_count sets a limit on the number of fonts actually used in the -document, and max_font_attempts sets a limit on the total number of CSS -queries that a document is allowed to perform. - -Once either limit is reached, the browser behaves as if -browser.display.use_document_fonts was set to 0 for subsequent font queries. - -If a pref is not set or is negative, that limit does not apply. - -This is done to address: -https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability ---- - layout/base/nsPresContext.cpp | 100 +++++++++++++++++++++++++++++++++++++++++ - layout/base/nsPresContext.h | 9 ++++ - layout/style/nsRuleNode.cpp | 13 ++++- - 3 files changed, 119 insertions(+), 3 deletions(-) - -diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp -index e1587db..9690d9c 100644 ---- a/layout/base/nsPresContext.cpp -+++ b/layout/base/nsPresContext.cpp -@@ -98,6 +98,8 @@ - #include "FrameLayerBuilder.h" - #include "nsDOMMediaQueryList.h" - #include "nsSMILAnimationController.h" -+#include "nsString.h" -+#include "nsUnicharUtils.h" - - #ifdef IBMBIDI - #include "nsBidiPresUtils.h" -@@ -706,6 +708,10 @@ nsPresContext::GetUserPreferences() - // * use fonts? - mUseDocumentFonts = - Preferences::GetInt("browser.display.use_document_fonts") != 0; -+ mMaxFonts = -+ Preferences::GetInt("browser.display.max_font_count", -1); -+ mMaxFontAttempts = -+ Preferences::GetInt("browser.display.max_font_attempts", -1); - - // * replace backslashes with Yen signs? (bug 245770) - mEnableJapaneseTransform = -@@ -1300,6 +1306,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID) const - return font; - } - -+PRBool -+nsPresContext::FontUseCountReached(const nsFont &font) { -+ if (mMaxFonts < 0) { -+ return PR_FALSE; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsUsed.Length(); i++) { -+ if (mFontsUsed[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsUsed[i].style == font.style*/) { -+ // seen it before: OK -+ return PR_FALSE; -+ } -+ } -+ -+ if (mFontsUsed.Length() >= mMaxFonts) { -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+PRBool -+nsPresContext::FontAttemptCountReached(const nsFont &font) { -+ if (mMaxFontAttempts < 0) { -+ return PR_FALSE; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsTried.Length(); i++) { -+ if (mFontsTried[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsTried[i].style == font.style*/) { -+ // seen it before: OK -+ return PR_FALSE; -+ } -+ } -+ -+ if (mFontsTried.Length() >= mMaxFontAttempts) { -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+void -+nsPresContext::AddFontUse(const nsFont &font) { -+ if (mMaxFonts < 0) { -+ return; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsUsed.Length(); i++) { -+ if (mFontsUsed[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsUsed[i].style == font.style*/) { -+ // seen it before: OK -+ return; -+ } -+ } -+ -+ if (mFontsUsed.Length() >= mMaxFonts) { -+ return; -+ } -+ -+ mFontsUsed.AppendElement(font); -+ return; -+} -+ -+void -+nsPresContext::AddFontAttempt(const nsFont &font) { -+ if (mMaxFontAttempts < 0) { -+ return; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsTried.Length(); i++) { -+ if (mFontsTried[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsTried[i].style == font.style*/) { -+ // seen it before: OK -+ return; -+ } -+ } -+ -+ if (mFontsTried.Length() >= mMaxFontAttempts) { -+ return; -+ } -+ -+ mFontsTried.AppendElement(font); -+ return; -+} -+ - void - nsPresContext::SetFullZoom(float aZoom) - { -diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h -index ecd01d8..552a69a 100644 ---- a/layout/base/nsPresContext.h -+++ b/layout/base/nsPresContext.h -@@ -548,6 +548,13 @@ public: - } - } - -+ nsTArray<nsFont> mFontsUsed; // currently for font-count limiting only -+ nsTArray<nsFont> mFontsTried; // currently for font-count limiting only -+ void AddFontUse(const nsFont &font); -+ void AddFontAttempt(const nsFont &font); -+ PRBool FontUseCountReached(const nsFont &font); -+ PRBool FontAttemptCountReached(const nsFont &font); -+ - PRInt32 MinFontSize() const { - return NS_MAX(mMinFontSize, mMinimumFontSizePref); - } -@@ -1117,6 +1124,8 @@ protected: - PRUint32 mInterruptChecksToSkip; - - mozilla::TimeStamp mReflowStartTime; -+ PRInt32 mMaxFontAttempts; -+ PRInt32 mMaxFonts; - - unsigned mHasPendingInterrupt : 1; - unsigned mInterruptsEnabled : 1; -diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp -index 27336bf..827585a 100644 ---- a/layout/style/nsRuleNode.cpp -+++ b/layout/style/nsRuleNode.cpp -@@ -3091,6 +3091,7 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - - // See if there is a minimum font-size constraint to honor - nscoord minimumFontSize = mPresContext->MinFontSize(); -+ PRBool isXUL = PR_FALSE; - - if (minimumFontSize < 0) - minimumFontSize = 0; -@@ -3102,10 +3103,10 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - // We only need to know this to determine if we have to use the - // document fonts (overriding the useDocumentFonts flag), or to - // determine if we have to override the minimum font-size constraint. -- if ((!useDocumentFonts || minimumFontSize > 0) && mPresContext->IsChrome()) { -+ if (mPresContext->IsChrome()) { - // if we are not using document fonts, but this is a XUL document, - // then we use the document fonts anyway -- useDocumentFonts = true; -+ isXUL = PR_TRUE; - minimumFontSize = 0; - } - -@@ -3120,9 +3121,13 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - // generic? - nsFont::GetGenericID(font->mFont.name, &generic); - -+ mPresContext->AddFontAttempt(font->mFont); -+ - // If we aren't allowed to use document fonts, then we are only entitled - // to use the user's default variable-width font and fixed-width font -- if (!useDocumentFonts) { -+ if (!isXUL && (!useDocumentFonts || -+ mPresContext->FontAttemptCountReached(font->mFont) || -+ mPresContext->FontUseCountReached(font->mFont))) { - // Extract the generic from the specified font family... - nsAutoString genericName; - if (!font->mFont.EnumerateFamilies(ExtractGeneric, &genericName)) { -@@ -3158,6 +3163,8 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - minimumFontSize, font); - } - -+ if (font->mGenericID == kGenericFont_NONE) -+ mPresContext->AddFontUse(font->mFont); - COMPUTE_END_INHERITED(Font, font) - } - --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch b/www-client/torbrowser/files/11.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch deleted file mode 100644 index bdc2f8d86..000000000 --- a/www-client/torbrowser/files/11.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 7b56d6e4ae963f13bb7469d803be823e366ec00c Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:40:40 -0800 -Subject: [PATCH 01/13] Block Components.interfaces,lookupMethod from content - -This patch removes the ability of content script to access -Components.interfaces.* as well as call or access Components.lookupMethod. - -These two interfaces seem to be exposed to content script only to make our -lives difficult. Components.lookupMethod can undo our JS hooks, and -Components.interfaces is useful for fingerprinting the platform, OS, and -Firebox version. - -They appear to have no other legitimate use. See also: -https://bugzilla.mozilla.org/show_bug.cgi?id=429070 -https://trac.torproject.org/projects/tor/ticket/2873 -https://trac.torproject.org/projects/tor/ticket/2874 ---- - js/xpconnect/src/XPCComponents.cpp | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp -index ef3e5ac..e986db4 100644 ---- a/js/xpconnect/src/XPCComponents.cpp -+++ b/js/xpconnect/src/XPCComponents.cpp -@@ -4236,7 +4236,9 @@ nsXPCComponents::CanCreateWrapper(const nsIID * iid, char **_retval) - NS_IMETHODIMP - nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, char **_retval) - { -- static const char* allowed[] = { "isSuccessCode", "lookupMethod", nsnull }; -+ // XXX: Pref observer? Also, is this what we want? Seems like a plan -+ //static const char* allowed[] = { "isSuccessCode", "lookupMethod", nsnull }; -+ static const char* allowed[] = { "isSuccessCode", nsnull }; - *_retval = xpc_CheckAccessList(methodName, allowed); - return NS_OK; - } -@@ -4245,7 +4247,9 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c - NS_IMETHODIMP - nsXPCComponents::CanGetProperty(const nsIID * iid, const PRUnichar *propertyName, char **_retval) - { -- static const char* allowed[] = { "interfaces", "interfacesByID", "results", nsnull}; -+ // XXX: Pref observer? Also, is this what we want? Seems like a plan -+ // static const char* allowed[] = { "interfaces", "interfacesByID", "results", nsnull}; -+ static const char* allowed[] = { "results", nsnull}; - *_retval = xpc_CheckAccessList(propertyName, allowed); - return NS_OK; - } --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0002-Make-Permissions-Manager-memory-only.patch b/www-client/torbrowser/files/11.0/0002-Make-Permissions-Manager-memory-only.patch deleted file mode 100644 index 1ff64e35a..000000000 --- a/www-client/torbrowser/files/11.0/0002-Make-Permissions-Manager-memory-only.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 4640f62becabf5adefd190ae119c93e486be9aed Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:45:16 -0800 -Subject: [PATCH 02/13] Make Permissions Manager memory-only - -This patch exposes a pref 'permissions.memory_only' that properly isolates the -permissions manager to memory, which is responsible for all user specified -site permissions, as well as stored STS policy. - -The pref does successfully clear the permissions manager memory if toggled. It -does not need to be set in prefs.js, and can be handled by Torbutton. - -https://trac.torproject.org/projects/tor/ticket/2950 ---- - extensions/cookie/nsPermissionManager.cpp | 34 ++++++++++++++++++++++++++-- - 1 files changed, 31 insertions(+), 3 deletions(-) - -diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp -index 67eb216..12cc7cf 100644 ---- a/extensions/cookie/nsPermissionManager.cpp -+++ b/extensions/cookie/nsPermissionManager.cpp -@@ -58,6 +58,10 @@ - #include "mozStorageHelper.h" - #include "mozStorageCID.h" - #include "nsXULAppAPI.h" -+#include "nsCOMPtr.h" -+#include "nsIPrefService.h" -+#include "nsIPrefBranch.h" -+#include "nsIPrefBranch2.h" - - static nsPermissionManager *gPermissionManager = nsnull; - -@@ -203,6 +207,11 @@ nsPermissionManager::Init() - mObserverService->AddObserver(this, "profile-do-change", true); - } - -+ nsCOMPtr<nsIPrefBranch2> pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (pbi) { -+ pbi->AddObserver("permissions.", this, PR_FALSE); -+ } -+ - if (IsChildProcess()) { - // Get the permissions from the parent process - InfallibleTArray<IPC::Permission> perms; -@@ -251,8 +260,18 @@ nsPermissionManager::InitDB(bool aRemoveFile) - if (!storage) - return NS_ERROR_UNEXPECTED; - -+ bool memory_db = false; -+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (prefs) { -+ prefs->GetBoolPref("permissions.memory_only", &memory_db); -+ } -+ - // cache a connection to the hosts database -- rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ if (memory_db) { -+ rv = storage->OpenSpecialDatabase("memory", getter_AddRefs(mDBConn)); -+ } else { -+ rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ } - NS_ENSURE_SUCCESS(rv, rv); - - bool ready; -@@ -262,7 +281,11 @@ nsPermissionManager::InitDB(bool aRemoveFile) - rv = permissionsFile->Remove(false); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ if (memory_db) { -+ rv = storage->OpenSpecialDatabase("memory", getter_AddRefs(mDBConn)); -+ } else { -+ rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ } - NS_ENSURE_SUCCESS(rv, rv); - - mDBConn->GetConnectionReady(&ready); -@@ -783,7 +806,12 @@ NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aT - { - ENSURE_NOT_CHILD_PROCESS; - -- if (!nsCRT::strcmp(aTopic, "profile-before-change")) { -+ if (nsCRT::strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) { -+ if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("permissions.memory_only").get())) { -+ // XXX: Should we remove the file? Probably not.. -+ InitDB(PR_FALSE); -+ } -+ } else if (!nsCRT::strcmp(aTopic, "profile-before-change")) { - // The profile is about to change, - // or is going away because the application is shutting down. - if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) { --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0003-Make-Intermediate-Cert-Store-memory-only.patch b/www-client/torbrowser/files/11.0/0003-Make-Intermediate-Cert-Store-memory-only.patch deleted file mode 100644 index 49ca58e0f..000000000 --- a/www-client/torbrowser/files/11.0/0003-Make-Intermediate-Cert-Store-memory-only.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b24b0d0fdddb77692a1609109f4c7cfb4b6f11f8 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 19 Aug 2011 17:58:23 -0700 -Subject: [PATCH 03/13] Make Intermediate Cert Store memory-only. - -This patch makes the intermediate SSL cert store exist in memory only. - -The pref must be set before startup in prefs.js. -https://trac.torproject.org/projects/tor/ticket/2949 ---- - security/manager/ssl/src/nsNSSComponent.cpp | 15 ++++++++++++++- - 1 files changed, 14 insertions(+), 1 deletions(-) - -diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp -index 5abc0a5..22becca 100644 ---- a/security/manager/ssl/src/nsNSSComponent.cpp -+++ b/security/manager/ssl/src/nsNSSComponent.cpp -@@ -1738,8 +1738,21 @@ nsNSSComponent::InitializeNSS(bool showWarningBox) - // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as - // "/usr/lib/nss/libnssckbi.so". - PRUint32 init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; -- SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "", -+ bool nocertdb = false; -+ mPrefBranch->GetBoolPref("security.nocertdb", &nocertdb); -+ -+ // XXX: We can also do the the following to only disable the certdb. -+ // Leaving this codepath in as a fallback in case InitNODB fails -+ if (nocertdb) -+ init_flags |= NSS_INIT_NOCERTDB; -+ -+ SECStatus init_rv; -+ if (nocertdb) { -+ init_rv = ::NSS_NoDB_Init(NULL); -+ } else { -+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", - SECMOD_DB, init_flags); -+ } - - if (init_rv != SECSuccess) { - PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get())); --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch b/www-client/torbrowser/files/11.0/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch deleted file mode 100644 index 2f0ef8348..000000000 --- a/www-client/torbrowser/files/11.0/0004-Add-HTTP-auth-headers-before-the-modify-request-obse.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d09a2b089ef401b08a8668b55b42233c81cbc198 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 2 Sep 2011 15:33:20 -0700 -Subject: [PATCH 04/13] Add HTTP auth headers before the modify-request - observer. - -Otherwise, how are we supposed to modify them? - -Thanks to Georg Koppen for spotting both the problem and this fix. ---- - netwerk/protocol/http/nsHttpChannel.cpp | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp -index 7c88d41..0cab7a4 100644 ---- a/netwerk/protocol/http/nsHttpChannel.cpp -+++ b/netwerk/protocol/http/nsHttpChannel.cpp -@@ -328,9 +328,6 @@ nsHttpChannel::Connect(bool firstTime) - return NS_ERROR_DOCUMENT_NOT_CACHED; - } - -- // check to see if authorization headers should be included -- mAuthProvider->AddAuthorizationHeaders(); -- - if (mLoadFlags & LOAD_NO_NETWORK_IO) { - return NS_ERROR_DOCUMENT_NOT_CACHED; - } -@@ -3743,6 +3740,9 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context) - - AddCookiesToRequest(); - -+ // check to see if authorization headers should be included -+ mAuthProvider->AddAuthorizationHeaders(); -+ - // notify "http-on-modify-request" observers - gHttpHandler->OnModifyRequest(this); - -@@ -4847,7 +4847,10 @@ nsHttpChannel::DoAuthRetry(nsAHttpConnection *conn) - // this authentication attempt (bug 84794). - // TODO: save cookies from auth response and send them here (bug 572151). - AddCookiesToRequest(); -- -+ -+ // check to see if authorization headers should be included -+ mAuthProvider->AddAuthorizationHeaders(); -+ - // notify "http-on-modify-request" observers - gHttpHandler->OnModifyRequest(this); - --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0005-Add-a-string-based-cacheKey.patch b/www-client/torbrowser/files/11.0/0005-Add-a-string-based-cacheKey.patch deleted file mode 100644 index c0b8be52e..000000000 --- a/www-client/torbrowser/files/11.0/0005-Add-a-string-based-cacheKey.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 76dfe3891b66f4a6ba352cf543ca52ff59aa65cd Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 2 Sep 2011 20:47:02 -0700 -Subject: [PATCH 05/13] Add a string-based cacheKey. - -Used for isolating cache according to same-origin policy. ---- - netwerk/base/public/nsICachingChannel.idl | 7 +++++++ - netwerk/protocol/http/nsHttpChannel.cpp | 22 ++++++++++++++++++++++ - netwerk/protocol/http/nsHttpChannel.h | 1 + - 3 files changed, 30 insertions(+), 0 deletions(-) - -diff --git a/netwerk/base/public/nsICachingChannel.idl b/netwerk/base/public/nsICachingChannel.idl -index 2da46d6..4ee5774 100644 ---- a/netwerk/base/public/nsICachingChannel.idl -+++ b/netwerk/base/public/nsICachingChannel.idl -@@ -98,6 +98,13 @@ interface nsICachingChannel : nsICacheInfoChannel - attribute nsISupports cacheKey; - - /** -+ * Set/get the cache domain... uniquely identifies the data in the cache -+ * for this channel. Holding a reference to this key does NOT prevent -+ * the cached data from being removed. -+ */ -+ attribute AUTF8String cacheDomain; -+ -+ /** - * Specifies whether or not the data should be cached to a file. This - * may fail if the disk cache is not present. The value of this attribute - * is usually only settable during the processing of a channel's -diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp -index 0cab7a4..2c2803f 100644 ---- a/netwerk/protocol/http/nsHttpChannel.cpp -+++ b/netwerk/protocol/http/nsHttpChannel.cpp -@@ -2408,6 +2408,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID, - cacheKey.Append(buf); - } - -+ if (strlen(mCacheDomain.get()) > 0) { -+ cacheKey.AppendLiteral("domain="); -+ cacheKey.Append(mCacheDomain.get()); -+ cacheKey.AppendLiteral("&"); -+ } -+ - if (!cacheKey.IsEmpty()) { - cacheKey.AppendLiteral("uri="); - } -@@ -4747,6 +4753,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value) - } - - NS_IMETHODIMP -+nsHttpChannel::GetCacheDomain(nsACString &value) -+{ -+ value = mCacheDomain; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsHttpChannel::SetCacheDomain(const nsACString &value) -+{ -+ mCacheDomain = value; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP - nsHttpChannel::GetOfflineCacheClientID(nsACString &value) - { - value = mOfflineCacheClientID; -diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h -index 88ce469..53538cf 100644 ---- a/netwerk/protocol/http/nsHttpChannel.h -+++ b/netwerk/protocol/http/nsHttpChannel.h -@@ -303,6 +303,7 @@ private: - nsCOMPtr<nsICacheEntryDescriptor> mOfflineCacheEntry; - nsCacheAccessMode mOfflineCacheAccess; - nsCString mOfflineCacheClientID; -+ nsCString mCacheDomain; - - // auth specific data - nsCOMPtr<nsIHttpChannelAuthProvider> mAuthProvider; --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0006-Randomize-HTTP-pipeline-order-and-depth.patch b/www-client/torbrowser/files/11.0/0006-Randomize-HTTP-pipeline-order-and-depth.patch deleted file mode 100644 index 04a34ea19..000000000 --- a/www-client/torbrowser/files/11.0/0006-Randomize-HTTP-pipeline-order-and-depth.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 39a9dab25c4ed3acc95009c0f44f4f6f2f1c5086 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Thu, 15 Mar 2012 20:05:07 -0700 -Subject: [PATCH 06/13] Randomize HTTP pipeline order and depth. - -This is an experimental defense against -http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf - -See also: -https://blog.torproject.org/blog/experimental-defense-website-traffic-fingerprinting ---- - netwerk/protocol/http/nsHttpConnectionMgr.cpp | 79 ++++++++++++++++++++++++- - netwerk/protocol/http/nsHttpConnectionMgr.h | 4 + - 2 files changed, 82 insertions(+), 1 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp -index 17d897f..3200638 100644 ---- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp -+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp -@@ -99,6 +99,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr() - LOG(("Creating nsHttpConnectionMgr @%x\n", this)); - mCT.Init(); - mAlternateProtocolHash.Init(16); -+ -+ nsresult rv; -+ mRandomGenerator = do_GetService("@mozilla.org/security/random-generator;1", &rv); -+ if (NS_FAILED(rv)) { -+ mRandomGenerator = nsnull; -+ } - } - - nsHttpConnectionMgr::~nsHttpConnectionMgr() -@@ -1227,7 +1233,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent, - - if (conn->SupportsPipelining() && (caps & NS_HTTP_ALLOW_PIPELINING)) { - LOG((" looking to build pipeline...\n")); -- if (BuildPipeline(ent, trans, &pipeline)) -+ if (BuildRandomizedPipeline(ent, trans, &pipeline)) - trans = pipeline; - } - -@@ -1300,6 +1306,77 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent, - return true; - } - -+bool -+nsHttpConnectionMgr::BuildRandomizedPipeline(nsConnectionEntry *ent, -+ nsAHttpTransaction *firstTrans, -+ nsHttpPipeline **result) -+{ -+ if (mRandomGenerator == nsnull) -+ return BuildPipeline(ent, firstTrans, result); -+ if (mMaxPipelinedRequests < 2) -+ return PR_FALSE; -+ -+ nsresult rv; -+ PRUint8 *bytes = nsnull; -+ -+ nsHttpPipeline *pipeline = nsnull; -+ nsHttpTransaction *trans; -+ -+ PRUint32 i = 0, numAdded = 0, numAllowed = 0; -+ PRUint32 max = 0; -+ -+ while (i < ent->mPendingQ.Length()) { -+ if (ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING) -+ numAllowed++; -+ i++; -+ } -+ -+ rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ // 4...12 -+ max = 4 + (bytes[0] % (mMaxPipelinedRequests + 1)); -+ NS_Free(bytes); -+ -+ while (numAllowed > 0) { -+ rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ i = bytes[0] % ent->mPendingQ.Length(); -+ NS_Free(bytes); -+ -+ trans = ent->mPendingQ[i]; -+ -+ if (!(ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING)) -+ continue; -+ -+ if (numAdded == 0) { -+ pipeline = new nsHttpPipeline; -+ if (!pipeline) -+ return PR_FALSE; -+ pipeline->AddTransaction(firstTrans); -+ numAdded = 1; -+ } -+ pipeline->AddTransaction(trans); -+ -+ // remove transaction from pending queue -+ ent->mPendingQ.RemoveElementAt(i); -+ NS_RELEASE(trans); -+ -+ numAllowed--; -+ -+ if (++numAdded == max) -+ break; -+ } -+ -+ //fprintf(stderr, "Yay!!! pipelined %u/%u transactions\n", numAdded, max); -+ LOG((" pipelined %u/%u transactions\n", numAdded, max)); -+ -+ if (numAdded == 0) -+ return PR_FALSE; -+ -+ NS_ADDREF(*result = pipeline); -+ return PR_TRUE; -+} -+ - nsresult - nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans) - { -diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h -index bb605a1..47d01f6 100644 ---- a/netwerk/protocol/http/nsHttpConnectionMgr.h -+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h -@@ -54,6 +54,7 @@ - #include "nsIObserver.h" - #include "nsITimer.h" - #include "nsIX509Cert3.h" -+#include "nsIRandomGenerator.h" - - class nsHttpPipeline; - -@@ -312,6 +313,7 @@ private: - nsresult DispatchTransaction(nsConnectionEntry *, nsHttpTransaction *, - PRUint8 caps, nsHttpConnection *); - bool BuildPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **); -+ bool BuildRandomizedPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **); - nsresult ProcessNewTransaction(nsHttpTransaction *); - nsresult EnsureSocketThreadTargetIfOnline(); - void ClosePersistentConnections(nsConnectionEntry *ent); -@@ -405,6 +407,8 @@ private: - PRUint64 mTimeOfNextWakeUp; - // Timer for next pruning of dead connections. - nsCOMPtr<nsITimer> mTimer; -+ // Random number generator for reordering HTTP pipeline -+ nsCOMPtr<nsIRandomGenerator> mRandomGenerator; - - // - // the connection table --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0007-Block-all-plugins-except-flash.patch b/www-client/torbrowser/files/11.0/0007-Block-all-plugins-except-flash.patch deleted file mode 100644 index b850f62a0..000000000 --- a/www-client/torbrowser/files/11.0/0007-Block-all-plugins-except-flash.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 10873c626d038b520853539d45a170919d6d0361 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:50:15 -0800 -Subject: [PATCH 07/13] Block all plugins except flash. - -We cannot use the @mozilla.org/extensions/blocklist;1 service, because we -actually want to stop plugins from ever entering the browser's process space -and/or executing code (for example, AV plugins that collect statistics/analyse -urls, magical toolbars that phone home or "help" the user, skype buttons that -ruin our day, and censorship filters). Hence we rolled our own. - -See https://trac.torproject.org/projects/tor/ticket/3547#comment:6 for musings -on a better way. Until then, it is delta-darwinism for us. ---- - dom/plugins/base/nsPluginHost.cpp | 33 +++++++++++++++++++++++++++++++++ - dom/plugins/base/nsPluginHost.h | 2 ++ - 2 files changed, 35 insertions(+), 0 deletions(-) - -diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp -index 7fe18b2..d76c4ca 100644 ---- a/dom/plugins/base/nsPluginHost.cpp -+++ b/dom/plugins/base/nsPluginHost.cpp -@@ -1982,6 +1982,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag) - return false; - } - -+PRBool nsPluginHost::GhettoBlacklist(nsIFile *pluginFile) -+{ -+ nsCString leaf; -+ const char *leafStr; -+ nsresult rv; -+ -+ rv = pluginFile->GetNativeLeafName(leaf); -+ if (NS_FAILED(rv)) { -+ return PR_TRUE; // fuck 'em. blacklist. -+ } -+ -+ leafStr = leaf.get(); -+ -+ if (!leafStr) { -+ return PR_TRUE; // fuck 'em. blacklist. -+ } -+ -+ // libgnashplugin.so, libflashplayer.so, Flash Player-10.4-10.5.plugin, -+ // NPSWF32.dll, NPSWF64.dll -+ if (strstr(leafStr, "libgnashplugin") == leafStr || -+ strstr(leafStr, "libflashplayer") == leafStr || -+ strstr(leafStr, "Flash Player") == leafStr || -+ strstr(leafStr, "NPSWF") == leafStr) { -+ return PR_FALSE; -+ } -+ -+ return PR_TRUE; // fuck 'em. blacklist. -+} -+ - typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void); - - nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, -@@ -2103,6 +2132,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, - continue; - } - -+ if (GhettoBlacklist(localfile)) { -+ continue; -+ } -+ - // if it is not found in cache info list or has been changed, create a new one - if (!pluginTag) { - nsPluginFile pluginFile(localfile); -diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h -index 5630b8d..f54bd32 100644 ---- a/dom/plugins/base/nsPluginHost.h -+++ b/dom/plugins/base/nsPluginHost.h -@@ -285,6 +285,8 @@ private: - // Loads all cached plugins info into mCachedPlugins - nsresult ReadPluginInfo(); - -+ PRBool GhettoBlacklist(nsIFile *pluginFile); -+ - // Given a file path, returns the plugins info from our cache - // and removes it from the cache. - void RemoveCachedPluginsInfo(const char *filePath, --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0008-Make-content-pref-service-memory-only-clearable.patch b/www-client/torbrowser/files/11.0/0008-Make-content-pref-service-memory-only-clearable.patch deleted file mode 100644 index b1233217a..000000000 --- a/www-client/torbrowser/files/11.0/0008-Make-content-pref-service-memory-only-clearable.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9a406718f9cb98f57de4649def8ef501ddbb9775 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Thu, 8 Sep 2011 08:40:17 -0700 -Subject: [PATCH 08/13] Make content pref service memory-only + clearable - -This prevents random urls from being inserted into content-prefs.sqllite in -the profile directory as content prefs change (includes site-zoom and perhaps -other site prefs?). ---- - .../contentprefs/nsContentPrefService.js | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js -index 17cac93..1f12609 100644 ---- a/toolkit/components/contentprefs/nsContentPrefService.js -+++ b/toolkit/components/contentprefs/nsContentPrefService.js -@@ -1242,7 +1242,7 @@ ContentPrefService.prototype = { - - var dbConnection; - -- if (!dbFile.exists()) -+ if (true || !dbFile.exists()) - dbConnection = this._dbCreate(dbService, dbFile); - else { - try { -@@ -1290,7 +1290,7 @@ ContentPrefService.prototype = { - }, - - _dbCreate: function ContentPrefService__dbCreate(aDBService, aDBFile) { -- var dbConnection = aDBService.openDatabase(aDBFile); -+ var dbConnection = aDBService.openSpecialDatabase("memory"); - - try { - this._dbCreateSchema(dbConnection); --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0010-Disable-SSL-Session-ID-tracking.patch b/www-client/torbrowser/files/11.0/0010-Disable-SSL-Session-ID-tracking.patch deleted file mode 100644 index 76ce1b6db..000000000 --- a/www-client/torbrowser/files/11.0/0010-Disable-SSL-Session-ID-tracking.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 33198fdb4467637fabf292e18530c89e8b6bad4e Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Wed, 7 Dec 2011 19:36:38 -0800 -Subject: [PATCH 10/13] Disable SSL Session ID tracking. - -We can't easily bind SSL Session ID tracking to url bar domain, -so we have to disable them to satisfy -https://www.torproject.org/projects/torbrowser/design/#identifier-linkability. ---- - security/nss/lib/ssl/sslsock.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c -index 22206f7..31086db 100644 ---- a/security/nss/lib/ssl/sslsock.c -+++ b/security/nss/lib/ssl/sslsock.c -@@ -173,7 +173,7 @@ static sslOptions ssl_defaults = { - PR_FALSE, /* enableSSL2 */ /* now defaults to off in NSS 3.13 */ - PR_TRUE, /* enableSSL3 */ - PR_TRUE, /* enableTLS */ /* now defaults to on in NSS 3.0 */ -- PR_FALSE, /* noCache */ -+ PR_TRUE, /* noCache */ - PR_FALSE, /* fdx */ - PR_FALSE, /* v2CompatibleHello */ /* now defaults to off in NSS 3.13 */ - PR_TRUE, /* detectRollBack */ --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0011-Provide-an-observer-event-to-close-persistent-connec.patch b/www-client/torbrowser/files/11.0/0011-Provide-an-observer-event-to-close-persistent-connec.patch deleted file mode 100644 index f44298274..000000000 --- a/www-client/torbrowser/files/11.0/0011-Provide-an-observer-event-to-close-persistent-connec.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a0c84e27f2c40d043c85ba3b794d3578e909f558 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:53:28 -0800 -Subject: [PATCH 11/13] Provide an observer event to close persistent - connections - -We need to prevent linkability across "New Identity", which includes closing -keep-alive connections. ---- - netwerk/protocol/http/nsHttpHandler.cpp | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp -index 727b5d6..87b55bc 100644 ---- a/netwerk/protocol/http/nsHttpHandler.cpp -+++ b/netwerk/protocol/http/nsHttpHandler.cpp -@@ -329,6 +329,7 @@ nsHttpHandler::Init() - mObserverService->AddObserver(this, "net:clear-active-logins", true); - mObserverService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, true); - mObserverService->AddObserver(this, "net:prune-dead-connections", true); -+ mObserverService->AddObserver(this, "net:prune-all-connections", PR_TRUE); - } - - return NS_OK; -@@ -1533,6 +1534,12 @@ nsHttpHandler::Observe(nsISupports *subject, - mConnMgr->PruneDeadConnections(); - } - } -+ else if (strcmp(topic, "net:prune-all-connections") == 0) { -+ if (mConnMgr) { -+ mConnMgr->ClosePersistentConnections(); -+ mConnMgr->PruneDeadConnections(); -+ } -+ } - - return NS_OK; - } --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0012-Provide-client-values-only-to-CSS-Media-Queries.patch b/www-client/torbrowser/files/11.0/0012-Provide-client-values-only-to-CSS-Media-Queries.patch deleted file mode 100644 index abed41466..000000000 --- a/www-client/torbrowser/files/11.0/0012-Provide-client-values-only-to-CSS-Media-Queries.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 10f26d027ba5413d7e26aaccd92cbc1c12b42d86 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Tue, 20 Dec 2011 21:02:49 -0800 -Subject: [PATCH 12/13] Provide client values only to CSS Media Queries - -Also disable a bunch of Mozilla extensions that smell like they are -fingerprintable. - -This is done to address -https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability ---- - layout/style/nsMediaFeatures.cpp | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp -index 6eca06e..c68f191 100644 ---- a/layout/style/nsMediaFeatures.cpp -+++ b/layout/style/nsMediaFeatures.cpp -@@ -383,14 +383,14 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eLength, - { nsnull }, -- GetDeviceWidth -+ GetWidth - }, - { - &nsGkAtoms::deviceHeight, - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eLength, - { nsnull }, -- GetDeviceHeight -+ GetHeight - }, - { - &nsGkAtoms::orientation, -@@ -411,7 +411,7 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eIntRatio, - { nsnull }, -- GetDeviceAspectRatio -+ GetAspectRatio - }, - { - &nsGkAtoms::color, -@@ -457,6 +457,7 @@ nsMediaFeatures::features[] = { - }, - - // Mozilla extensions -+/* - { - &nsGkAtoms::_moz_device_pixel_ratio, - nsMediaFeature::eMinMaxAllowed, -@@ -469,7 +470,7 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxNotAllowed, - nsMediaFeature::eEnumerated, - { kOrientationKeywords }, -- GetDeviceOrientation -+ GetOrientation - }, - { - &nsGkAtoms::_moz_is_resource_document, -@@ -590,6 +591,7 @@ nsMediaFeatures::features[] = { - { nsnull }, - GetWindowsTheme - }, -+*/ - // Null-mName terminator: - { - nsnull, --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/11.0/0013-Limit-the-number-of-fonts-per-document.patch b/www-client/torbrowser/files/11.0/0013-Limit-the-number-of-fonts-per-document.patch deleted file mode 100644 index 7f0f2483c..000000000 --- a/www-client/torbrowser/files/11.0/0013-Limit-the-number-of-fonts-per-document.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 215f7088f53e25309ec5037c05a25ed9048a625b Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 16:01:21 -0800 -Subject: [PATCH 13/13] Limit the number of fonts per document. - -We create two prefs: -browser.display.max_font_count and browser.display.max_font_attempts. -max_font_count sets a limit on the number of fonts actually used in the -document, and max_font_attempts sets a limit on the total number of CSS -queries that a document is allowed to perform. - -Once either limit is reached, the browser behaves as if -browser.display.use_document_fonts was set to 0 for subsequent font queries. - -If a pref is not set or is negative, that limit does not apply. - -This is done to address: -https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability ---- - layout/base/nsPresContext.cpp | 100 +++++++++++++++++++++++++++++++++++++++++ - layout/base/nsPresContext.h | 9 ++++ - layout/style/nsRuleNode.cpp | 13 ++++- - 3 files changed, 119 insertions(+), 3 deletions(-) - -diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp -index c7ad359..ac12dff 100644 ---- a/layout/base/nsPresContext.cpp -+++ b/layout/base/nsPresContext.cpp -@@ -98,6 +98,8 @@ - #include "FrameLayerBuilder.h" - #include "nsDOMMediaQueryList.h" - #include "nsSMILAnimationController.h" -+#include "nsString.h" -+#include "nsUnicharUtils.h" - - #ifdef IBMBIDI - #include "nsBidiPresUtils.h" -@@ -731,6 +733,10 @@ nsPresContext::GetUserPreferences() - // * use fonts? - mUseDocumentFonts = - Preferences::GetInt("browser.display.use_document_fonts") != 0; -+ mMaxFonts = -+ Preferences::GetInt("browser.display.max_font_count", -1); -+ mMaxFontAttempts = -+ Preferences::GetInt("browser.display.max_font_attempts", -1); - - // * replace backslashes with Yen signs? (bug 245770) - mEnableJapaneseTransform = -@@ -1332,6 +1338,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID) const - return font; - } - -+PRBool -+nsPresContext::FontUseCountReached(const nsFont &font) { -+ if (mMaxFonts < 0) { -+ return PR_FALSE; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsUsed.Length(); i++) { -+ if (mFontsUsed[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsUsed[i].style == font.style*/) { -+ // seen it before: OK -+ return PR_FALSE; -+ } -+ } -+ -+ if (mFontsUsed.Length() >= mMaxFonts) { -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+PRBool -+nsPresContext::FontAttemptCountReached(const nsFont &font) { -+ if (mMaxFontAttempts < 0) { -+ return PR_FALSE; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsTried.Length(); i++) { -+ if (mFontsTried[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsTried[i].style == font.style*/) { -+ // seen it before: OK -+ return PR_FALSE; -+ } -+ } -+ -+ if (mFontsTried.Length() >= mMaxFontAttempts) { -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+void -+nsPresContext::AddFontUse(const nsFont &font) { -+ if (mMaxFonts < 0) { -+ return; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsUsed.Length(); i++) { -+ if (mFontsUsed[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsUsed[i].style == font.style*/) { -+ // seen it before: OK -+ return; -+ } -+ } -+ -+ if (mFontsUsed.Length() >= mMaxFonts) { -+ return; -+ } -+ -+ mFontsUsed.AppendElement(font); -+ return; -+} -+ -+void -+nsPresContext::AddFontAttempt(const nsFont &font) { -+ if (mMaxFontAttempts < 0) { -+ return; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsTried.Length(); i++) { -+ if (mFontsTried[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsTried[i].style == font.style*/) { -+ // seen it before: OK -+ return; -+ } -+ } -+ -+ if (mFontsTried.Length() >= mMaxFontAttempts) { -+ return; -+ } -+ -+ mFontsTried.AppendElement(font); -+ return; -+} -+ - void - nsPresContext::SetFullZoom(float aZoom) - { -diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h -index 39f5b4a..a72d12e 100644 ---- a/layout/base/nsPresContext.h -+++ b/layout/base/nsPresContext.h -@@ -548,6 +548,13 @@ public: - } - } - -+ nsTArray<nsFont> mFontsUsed; // currently for font-count limiting only -+ nsTArray<nsFont> mFontsTried; // currently for font-count limiting only -+ void AddFontUse(const nsFont &font); -+ void AddFontAttempt(const nsFont &font); -+ PRBool FontUseCountReached(const nsFont &font); -+ PRBool FontAttemptCountReached(const nsFont &font); -+ - PRInt32 MinFontSize() const { - return NS_MAX(mMinFontSize, mMinimumFontSizePref); - } -@@ -1125,6 +1132,8 @@ protected: - PRUint32 mInterruptChecksToSkip; - - mozilla::TimeStamp mReflowStartTime; -+ PRInt32 mMaxFontAttempts; -+ PRInt32 mMaxFonts; - - unsigned mHasPendingInterrupt : 1; - unsigned mInterruptsEnabled : 1; -diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp -index 2918a54..5870693 100644 ---- a/layout/style/nsRuleNode.cpp -+++ b/layout/style/nsRuleNode.cpp -@@ -3091,6 +3091,7 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - - // See if there is a minimum font-size constraint to honor - nscoord minimumFontSize = mPresContext->MinFontSize(); -+ PRBool isXUL = PR_FALSE; - - if (minimumFontSize < 0) - minimumFontSize = 0; -@@ -3102,10 +3103,10 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - // We only need to know this to determine if we have to use the - // document fonts (overriding the useDocumentFonts flag), or to - // determine if we have to override the minimum font-size constraint. -- if ((!useDocumentFonts || minimumFontSize > 0) && mPresContext->IsChrome()) { -+ if (mPresContext->IsChrome()) { - // if we are not using document fonts, but this is a XUL document, - // then we use the document fonts anyway -- useDocumentFonts = true; -+ isXUL = PR_TRUE; - minimumFontSize = 0; - } - -@@ -3120,9 +3121,13 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - // generic? - nsFont::GetGenericID(font->mFont.name, &generic); - -+ mPresContext->AddFontAttempt(font->mFont); -+ - // If we aren't allowed to use document fonts, then we are only entitled - // to use the user's default variable-width font and fixed-width font -- if (!useDocumentFonts) { -+ if (!isXUL && (!useDocumentFonts || -+ mPresContext->FontAttemptCountReached(font->mFont) || -+ mPresContext->FontUseCountReached(font->mFont))) { - // Extract the generic from the specified font family... - nsAutoString genericName; - if (!font->mFont.EnumerateFamilies(ExtractGeneric, &genericName)) { -@@ -3158,6 +3163,8 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - minimumFontSize, font); - } - -+ if (font->mGenericID == kGenericFont_NONE) -+ mPresContext->AddFontUse(font->mFont); - COMPUTE_END_INHERITED(Font, font) - } - --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch b/www-client/torbrowser/files/12.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch deleted file mode 100644 index df1c20202..000000000 --- a/www-client/torbrowser/files/12.0/0001-Block-Components.interfaces-lookupMethod-from-conten.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 878aa170944f7d44a76f0eb09214d46b6028c549 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:40:40 -0800 -Subject: [PATCH 01/16] Block Components.interfaces,lookupMethod from content - -This patch removes the ability of content script to access -Components.interfaces.* as well as call or access Components.lookupMethod. - -These two interfaces seem to be exposed to content script only to make our -lives difficult. Components.lookupMethod can undo our JS hooks, and -Components.interfaces is useful for fingerprinting the platform, OS, and -Firebox version. - -They appear to have no other legitimate use. See also: -https://bugzilla.mozilla.org/show_bug.cgi?id=429070 -https://trac.torproject.org/projects/tor/ticket/2873 -https://trac.torproject.org/projects/tor/ticket/2874 ---- - js/xpconnect/src/XPCComponents.cpp | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp -index 716cfdb..56e3f55 100644 ---- a/js/xpconnect/src/XPCComponents.cpp -+++ b/js/xpconnect/src/XPCComponents.cpp -@@ -4261,7 +4261,9 @@ nsXPCComponents::CanCreateWrapper(const nsIID * iid, char **_retval) - NS_IMETHODIMP - nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, char **_retval) - { -- static const char* allowed[] = { "isSuccessCode", "lookupMethod", nsnull }; -+ // XXX: Pref observer? Also, is this what we want? Seems like a plan -+ //static const char* allowed[] = { "isSuccessCode", "lookupMethod", nsnull }; -+ static const char* allowed[] = { "isSuccessCode", nsnull }; - *_retval = xpc_CheckAccessList(methodName, allowed); - return NS_OK; - } -@@ -4270,7 +4272,9 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c - NS_IMETHODIMP - nsXPCComponents::CanGetProperty(const nsIID * iid, const PRUnichar *propertyName, char **_retval) - { -- static const char* allowed[] = { "interfaces", "interfacesByID", "results", nsnull}; -+ // XXX: Pref observer? Also, is this what we want? Seems like a plan -+ // static const char* allowed[] = { "interfaces", "interfacesByID", "results", nsnull}; -+ static const char* allowed[] = { "results", nsnull}; - *_retval = xpc_CheckAccessList(propertyName, allowed); - return NS_OK; - } --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0002-Make-Permissions-Manager-memory-only.patch b/www-client/torbrowser/files/12.0/0002-Make-Permissions-Manager-memory-only.patch deleted file mode 100644 index f38dc99b6..000000000 --- a/www-client/torbrowser/files/12.0/0002-Make-Permissions-Manager-memory-only.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 5f47c5bdf95633e28b6e338ba8794243b429aefb Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:45:16 -0800 -Subject: [PATCH 02/16] Make Permissions Manager memory-only - -This patch exposes a pref 'permissions.memory_only' that properly isolates the -permissions manager to memory, which is responsible for all user specified -site permissions, as well as stored STS policy. - -The pref does successfully clear the permissions manager memory if toggled. It -does not need to be set in prefs.js, and can be handled by Torbutton. - -https://trac.torproject.org/projects/tor/ticket/2950 ---- - extensions/cookie/nsPermissionManager.cpp | 34 ++++++++++++++++++++++++++-- - 1 files changed, 31 insertions(+), 3 deletions(-) - -diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp -index cdfe21b..a7a0efb 100644 ---- a/extensions/cookie/nsPermissionManager.cpp -+++ b/extensions/cookie/nsPermissionManager.cpp -@@ -58,6 +58,10 @@ - #include "mozStorageHelper.h" - #include "mozStorageCID.h" - #include "nsXULAppAPI.h" -+#include "nsCOMPtr.h" -+#include "nsIPrefService.h" -+#include "nsIPrefBranch.h" -+#include "nsIPrefBranch2.h" - - static nsPermissionManager *gPermissionManager = nsnull; - -@@ -203,6 +207,11 @@ nsPermissionManager::Init() - mObserverService->AddObserver(this, "profile-do-change", true); - } - -+ nsCOMPtr<nsIPrefBranch2> pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (pbi) { -+ pbi->AddObserver("permissions.", this, PR_FALSE); -+ } -+ - if (IsChildProcess()) { - // Get the permissions from the parent process - InfallibleTArray<IPC::Permission> perms; -@@ -251,8 +260,18 @@ nsPermissionManager::InitDB(bool aRemoveFile) - if (!storage) - return NS_ERROR_UNEXPECTED; - -+ bool memory_db = false; -+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (prefs) { -+ prefs->GetBoolPref("permissions.memory_only", &memory_db); -+ } -+ - // cache a connection to the hosts database -- rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ if (memory_db) { -+ rv = storage->OpenSpecialDatabase("memory", getter_AddRefs(mDBConn)); -+ } else { -+ rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ } - NS_ENSURE_SUCCESS(rv, rv); - - bool ready; -@@ -262,7 +281,11 @@ nsPermissionManager::InitDB(bool aRemoveFile) - rv = permissionsFile->Remove(false); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ if (memory_db) { -+ rv = storage->OpenSpecialDatabase("memory", getter_AddRefs(mDBConn)); -+ } else { -+ rv = storage->OpenDatabase(permissionsFile, getter_AddRefs(mDBConn)); -+ } - NS_ENSURE_SUCCESS(rv, rv); - - mDBConn->GetConnectionReady(&ready); -@@ -794,7 +817,12 @@ NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aT - { - ENSURE_NOT_CHILD_PROCESS; - -- if (!nsCRT::strcmp(aTopic, "profile-before-change")) { -+ if (nsCRT::strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) { -+ if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("permissions.memory_only").get())) { -+ // XXX: Should we remove the file? Probably not.. -+ InitDB(PR_FALSE); -+ } -+ } else if (!nsCRT::strcmp(aTopic, "profile-before-change")) { - // The profile is about to change, - // or is going away because the application is shutting down. - if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) { --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0003-Make-Intermediate-Cert-Store-memory-only.patch b/www-client/torbrowser/files/12.0/0003-Make-Intermediate-Cert-Store-memory-only.patch deleted file mode 100644 index 617a78ed7..000000000 --- a/www-client/torbrowser/files/12.0/0003-Make-Intermediate-Cert-Store-memory-only.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 8cb78993225793692fe0560d25db4af55e0553bd Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 19 Aug 2011 17:58:23 -0700 -Subject: [PATCH 03/16] Make Intermediate Cert Store memory-only. - -This patch makes the intermediate SSL cert store exist in memory only. - -The pref must be set before startup in prefs.js. -https://trac.torproject.org/projects/tor/ticket/2949 ---- - security/manager/ssl/src/nsNSSComponent.cpp | 15 ++++++++++++++- - 1 files changed, 14 insertions(+), 1 deletions(-) - -diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp -index 5abc0a5..22becca 100644 ---- a/security/manager/ssl/src/nsNSSComponent.cpp -+++ b/security/manager/ssl/src/nsNSSComponent.cpp -@@ -1738,8 +1738,21 @@ nsNSSComponent::InitializeNSS(bool showWarningBox) - // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as - // "/usr/lib/nss/libnssckbi.so". - PRUint32 init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE; -- SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "", -+ bool nocertdb = false; -+ mPrefBranch->GetBoolPref("security.nocertdb", &nocertdb); -+ -+ // XXX: We can also do the the following to only disable the certdb. -+ // Leaving this codepath in as a fallback in case InitNODB fails -+ if (nocertdb) -+ init_flags |= NSS_INIT_NOCERTDB; -+ -+ SECStatus init_rv; -+ if (nocertdb) { -+ init_rv = ::NSS_NoDB_Init(NULL); -+ } else { -+ init_rv = ::NSS_Initialize(profileStr.get(), "", "", - SECMOD_DB, init_flags); -+ } - - if (init_rv != SECSuccess) { - PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get())); --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0004-Add-a-string-based-cacheKey.patch b/www-client/torbrowser/files/12.0/0004-Add-a-string-based-cacheKey.patch deleted file mode 100644 index 7ddd877a6..000000000 --- a/www-client/torbrowser/files/12.0/0004-Add-a-string-based-cacheKey.patch +++ /dev/null @@ -1,85 +0,0 @@ -From c4212c764149b74a04aad7d15cb3df810512e4ba Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Fri, 2 Sep 2011 20:47:02 -0700 -Subject: [PATCH 04/16] Add a string-based cacheKey. - -Used for isolating cache according to same-origin policy. ---- - netwerk/base/public/nsICachingChannel.idl | 7 +++++++ - netwerk/protocol/http/nsHttpChannel.cpp | 22 ++++++++++++++++++++++ - netwerk/protocol/http/nsHttpChannel.h | 1 + - 3 files changed, 30 insertions(+), 0 deletions(-) - -diff --git a/netwerk/base/public/nsICachingChannel.idl b/netwerk/base/public/nsICachingChannel.idl -index 2da46d6..4ee5774 100644 ---- a/netwerk/base/public/nsICachingChannel.idl -+++ b/netwerk/base/public/nsICachingChannel.idl -@@ -98,6 +98,13 @@ interface nsICachingChannel : nsICacheInfoChannel - attribute nsISupports cacheKey; - - /** -+ * Set/get the cache domain... uniquely identifies the data in the cache -+ * for this channel. Holding a reference to this key does NOT prevent -+ * the cached data from being removed. -+ */ -+ attribute AUTF8String cacheDomain; -+ -+ /** - * Specifies whether or not the data should be cached to a file. This - * may fail if the disk cache is not present. The value of this attribute - * is usually only settable during the processing of a channel's -diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp -index fab0726..5f42b7b 100644 ---- a/netwerk/protocol/http/nsHttpChannel.cpp -+++ b/netwerk/protocol/http/nsHttpChannel.cpp -@@ -2415,6 +2415,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID, - cacheKey.Append(buf); - } - -+ if (strlen(mCacheDomain.get()) > 0) { -+ cacheKey.AppendLiteral("domain="); -+ cacheKey.Append(mCacheDomain.get()); -+ cacheKey.AppendLiteral("&"); -+ } -+ - if (!cacheKey.IsEmpty()) { - cacheKey.AppendLiteral("uri="); - } -@@ -4762,6 +4768,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value) - } - - NS_IMETHODIMP -+nsHttpChannel::GetCacheDomain(nsACString &value) -+{ -+ value = mCacheDomain; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsHttpChannel::SetCacheDomain(const nsACString &value) -+{ -+ mCacheDomain = value; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP - nsHttpChannel::GetOfflineCacheClientID(nsACString &value) - { - value = mOfflineCacheClientID; -diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h -index b7bba48..605dc80 100644 ---- a/netwerk/protocol/http/nsHttpChannel.h -+++ b/netwerk/protocol/http/nsHttpChannel.h -@@ -304,6 +304,7 @@ private: - nsCOMPtr<nsICacheEntryDescriptor> mOfflineCacheEntry; - nsCacheAccessMode mOfflineCacheAccess; - nsCString mOfflineCacheClientID; -+ nsCString mCacheDomain; - - // auth specific data - nsCOMPtr<nsIHttpChannelAuthProvider> mAuthProvider; --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0005-Block-all-plugins-except-flash.patch b/www-client/torbrowser/files/12.0/0005-Block-all-plugins-except-flash.patch deleted file mode 100644 index 9a577c0cb..000000000 --- a/www-client/torbrowser/files/12.0/0005-Block-all-plugins-except-flash.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 89d6deddce94c720793a33a1c9fc812ad65116a9 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:50:15 -0800 -Subject: [PATCH 05/16] Block all plugins except flash. - -We cannot use the @mozilla.org/extensions/blocklist;1 service, because we -actually want to stop plugins from ever entering the browser's process space -and/or executing code (for example, AV plugins that collect statistics/analyse -urls, magical toolbars that phone home or "help" the user, skype buttons that -ruin our day, and censorship filters). Hence we rolled our own. - -See https://trac.torproject.org/projects/tor/ticket/3547#comment:6 for musings -on a better way. Until then, it is delta-darwinism for us. ---- - dom/plugins/base/nsPluginHost.cpp | 33 +++++++++++++++++++++++++++++++++ - dom/plugins/base/nsPluginHost.h | 2 ++ - 2 files changed, 35 insertions(+), 0 deletions(-) - -diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp -index ed081fc..7384bcc 100644 ---- a/dom/plugins/base/nsPluginHost.cpp -+++ b/dom/plugins/base/nsPluginHost.cpp -@@ -1985,6 +1985,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag) - return false; - } - -+PRBool nsPluginHost::GhettoBlacklist(nsIFile *pluginFile) -+{ -+ nsCString leaf; -+ const char *leafStr; -+ nsresult rv; -+ -+ rv = pluginFile->GetNativeLeafName(leaf); -+ if (NS_FAILED(rv)) { -+ return PR_TRUE; // fuck 'em. blacklist. -+ } -+ -+ leafStr = leaf.get(); -+ -+ if (!leafStr) { -+ return PR_TRUE; // fuck 'em. blacklist. -+ } -+ -+ // libgnashplugin.so, libflashplayer.so, Flash Player-10.4-10.5.plugin, -+ // NPSWF32.dll, NPSWF64.dll -+ if (strstr(leafStr, "libgnashplugin") == leafStr || -+ strstr(leafStr, "libflashplayer") == leafStr || -+ strstr(leafStr, "Flash Player") == leafStr || -+ strstr(leafStr, "NPSWF") == leafStr) { -+ return PR_FALSE; -+ } -+ -+ return PR_TRUE; // fuck 'em. blacklist. -+} -+ - typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void); - - nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, -@@ -2118,6 +2147,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, - continue; - } - -+ if (GhettoBlacklist(localfile)) { -+ continue; -+ } -+ - // if it is not found in cache info list or has been changed, create a new one - if (!pluginTag) { - nsPluginFile pluginFile(localfile); -diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h -index 5630b8d..f54bd32 100644 ---- a/dom/plugins/base/nsPluginHost.h -+++ b/dom/plugins/base/nsPluginHost.h -@@ -285,6 +285,8 @@ private: - // Loads all cached plugins info into mCachedPlugins - nsresult ReadPluginInfo(); - -+ PRBool GhettoBlacklist(nsIFile *pluginFile); -+ - // Given a file path, returns the plugins info from our cache - // and removes it from the cache. - void RemoveCachedPluginsInfo(const char *filePath, --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0006-Make-content-pref-service-memory-only-clearable.patch b/www-client/torbrowser/files/12.0/0006-Make-content-pref-service-memory-only-clearable.patch deleted file mode 100644 index a26bfecda..000000000 --- a/www-client/torbrowser/files/12.0/0006-Make-content-pref-service-memory-only-clearable.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b2cc8f517c6589def4cc126af0b5f1898d61541c Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Thu, 8 Sep 2011 08:40:17 -0700 -Subject: [PATCH 06/16] Make content pref service memory-only + clearable - -This prevents random urls from being inserted into content-prefs.sqllite in -the profile directory as content prefs change (includes site-zoom and perhaps -other site prefs?). ---- - .../contentprefs/nsContentPrefService.js | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js -index 17cac93..1f12609 100644 ---- a/toolkit/components/contentprefs/nsContentPrefService.js -+++ b/toolkit/components/contentprefs/nsContentPrefService.js -@@ -1242,7 +1242,7 @@ ContentPrefService.prototype = { - - var dbConnection; - -- if (!dbFile.exists()) -+ if (true || !dbFile.exists()) - dbConnection = this._dbCreate(dbService, dbFile); - else { - try { -@@ -1290,7 +1290,7 @@ ContentPrefService.prototype = { - }, - - _dbCreate: function ContentPrefService__dbCreate(aDBService, aDBFile) { -- var dbConnection = aDBService.openDatabase(aDBFile); -+ var dbConnection = aDBService.openSpecialDatabase("memory"); - - try { - this._dbCreateSchema(dbConnection); --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0008-Disable-SSL-Session-ID-tracking.patch b/www-client/torbrowser/files/12.0/0008-Disable-SSL-Session-ID-tracking.patch deleted file mode 100644 index ff692fe29..000000000 --- a/www-client/torbrowser/files/12.0/0008-Disable-SSL-Session-ID-tracking.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 4d7f3122a76e0d5a31ba352880892fecd493252b Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Wed, 7 Dec 2011 19:36:38 -0800 -Subject: [PATCH 08/16] Disable SSL Session ID tracking. - -We can't easily bind SSL Session ID tracking to url bar domain, -so we have to disable them to satisfy -https://www.torproject.org/projects/torbrowser/design/#identifier-linkability. ---- - security/nss/lib/ssl/sslsock.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c -index 22206f7..31086db 100644 ---- a/security/nss/lib/ssl/sslsock.c -+++ b/security/nss/lib/ssl/sslsock.c -@@ -173,7 +173,7 @@ static sslOptions ssl_defaults = { - PR_FALSE, /* enableSSL2 */ /* now defaults to off in NSS 3.13 */ - PR_TRUE, /* enableSSL3 */ - PR_TRUE, /* enableTLS */ /* now defaults to on in NSS 3.0 */ -- PR_FALSE, /* noCache */ -+ PR_TRUE, /* noCache */ - PR_FALSE, /* fdx */ - PR_FALSE, /* v2CompatibleHello */ /* now defaults to off in NSS 3.13 */ - PR_TRUE, /* detectRollBack */ --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0009-Provide-an-observer-event-to-close-persistent-connec.patch b/www-client/torbrowser/files/12.0/0009-Provide-an-observer-event-to-close-persistent-connec.patch deleted file mode 100644 index 2c5f135f5..000000000 --- a/www-client/torbrowser/files/12.0/0009-Provide-an-observer-event-to-close-persistent-connec.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 873acaa3fd6df60fe57f1549cdb45df7e277808d Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 15:53:28 -0800 -Subject: [PATCH 09/16] Provide an observer event to close persistent - connections - -We need to prevent linkability across "New Identity", which includes closing -keep-alive connections. ---- - netwerk/protocol/http/nsHttpHandler.cpp | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp -index ebc7641..dbcdff7 100644 ---- a/netwerk/protocol/http/nsHttpHandler.cpp -+++ b/netwerk/protocol/http/nsHttpHandler.cpp -@@ -331,6 +331,7 @@ nsHttpHandler::Init() - mObserverService->AddObserver(this, "net:clear-active-logins", true); - mObserverService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, true); - mObserverService->AddObserver(this, "net:prune-dead-connections", true); -+ mObserverService->AddObserver(this, "net:prune-all-connections", PR_TRUE); - } - - return NS_OK; -@@ -1522,6 +1523,12 @@ nsHttpHandler::Observe(nsISupports *subject, - mConnMgr->PruneDeadConnections(); - } - } -+ else if (strcmp(topic, "net:prune-all-connections") == 0) { -+ if (mConnMgr) { -+ mConnMgr->ClosePersistentConnections(); -+ mConnMgr->PruneDeadConnections(); -+ } -+ } - - return NS_OK; - } --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0010-Provide-client-values-only-to-CSS-Media-Queries.patch b/www-client/torbrowser/files/12.0/0010-Provide-client-values-only-to-CSS-Media-Queries.patch deleted file mode 100644 index 661f0ca41..000000000 --- a/www-client/torbrowser/files/12.0/0010-Provide-client-values-only-to-CSS-Media-Queries.patch +++ /dev/null @@ -1,72 +0,0 @@ -From a27dcd387d8c3c1f1e150dcdd3c8aa1872ad14b5 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@fscked.org> -Date: Tue, 20 Dec 2011 21:02:49 -0800 -Subject: [PATCH 10/16] Provide client values only to CSS Media Queries - -Also disable a bunch of Mozilla extensions that smell like they are -fingerprintable. - -This is done to address -https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability ---- - layout/style/nsMediaFeatures.cpp | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp -index 6eca06e..c68f191 100644 ---- a/layout/style/nsMediaFeatures.cpp -+++ b/layout/style/nsMediaFeatures.cpp -@@ -383,14 +383,14 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eLength, - { nsnull }, -- GetDeviceWidth -+ GetWidth - }, - { - &nsGkAtoms::deviceHeight, - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eLength, - { nsnull }, -- GetDeviceHeight -+ GetHeight - }, - { - &nsGkAtoms::orientation, -@@ -411,7 +411,7 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxAllowed, - nsMediaFeature::eIntRatio, - { nsnull }, -- GetDeviceAspectRatio -+ GetAspectRatio - }, - { - &nsGkAtoms::color, -@@ -457,6 +457,7 @@ nsMediaFeatures::features[] = { - }, - - // Mozilla extensions -+/* - { - &nsGkAtoms::_moz_device_pixel_ratio, - nsMediaFeature::eMinMaxAllowed, -@@ -469,7 +470,7 @@ nsMediaFeatures::features[] = { - nsMediaFeature::eMinMaxNotAllowed, - nsMediaFeature::eEnumerated, - { kOrientationKeywords }, -- GetDeviceOrientation -+ GetOrientation - }, - { - &nsGkAtoms::_moz_is_resource_document, -@@ -590,6 +591,7 @@ nsMediaFeatures::features[] = { - { nsnull }, - GetWindowsTheme - }, -+*/ - // Null-mName terminator: - { - nsnull, --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0011-Limit-the-number-of-fonts-per-document.patch b/www-client/torbrowser/files/12.0/0011-Limit-the-number-of-fonts-per-document.patch deleted file mode 100644 index 9dce423f0..000000000 --- a/www-client/torbrowser/files/12.0/0011-Limit-the-number-of-fonts-per-document.patch +++ /dev/null @@ -1,228 +0,0 @@ -From c4d1c23872e2be83f33f2b9bfc5c49d2b98c73a6 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 1 Feb 2012 16:01:21 -0800 -Subject: [PATCH 11/16] Limit the number of fonts per document. - -We create two prefs: -browser.display.max_font_count and browser.display.max_font_attempts. -max_font_count sets a limit on the number of fonts actually used in the -document, and max_font_attempts sets a limit on the total number of CSS -queries that a document is allowed to perform. - -Once either limit is reached, the browser behaves as if -browser.display.use_document_fonts was set to 0 for subsequent font queries. - -If a pref is not set or is negative, that limit does not apply. - -This is done to address: -https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability ---- - layout/base/nsPresContext.cpp | 100 +++++++++++++++++++++++++++++++++++++++++ - layout/base/nsPresContext.h | 9 ++++ - layout/style/nsRuleNode.cpp | 13 ++++- - 3 files changed, 119 insertions(+), 3 deletions(-) - -diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp -index 49b201e..0a8db3c 100644 ---- a/layout/base/nsPresContext.cpp -+++ b/layout/base/nsPresContext.cpp -@@ -98,6 +98,8 @@ - #include "FrameLayerBuilder.h" - #include "nsDOMMediaQueryList.h" - #include "nsSMILAnimationController.h" -+#include "nsString.h" -+#include "nsUnicharUtils.h" - - #ifdef IBMBIDI - #include "nsBidiPresUtils.h" -@@ -733,6 +735,10 @@ nsPresContext::GetUserPreferences() - // * use fonts? - mUseDocumentFonts = - Preferences::GetInt("browser.display.use_document_fonts") != 0; -+ mMaxFonts = -+ Preferences::GetInt("browser.display.max_font_count", -1); -+ mMaxFontAttempts = -+ Preferences::GetInt("browser.display.max_font_attempts", -1); - - // * replace backslashes with Yen signs? (bug 245770) - mEnableJapaneseTransform = -@@ -1334,6 +1340,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID) const - return font; - } - -+PRBool -+nsPresContext::FontUseCountReached(const nsFont &font) { -+ if (mMaxFonts < 0) { -+ return PR_FALSE; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsUsed.Length(); i++) { -+ if (mFontsUsed[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsUsed[i].style == font.style*/) { -+ // seen it before: OK -+ return PR_FALSE; -+ } -+ } -+ -+ if (mFontsUsed.Length() >= mMaxFonts) { -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+PRBool -+nsPresContext::FontAttemptCountReached(const nsFont &font) { -+ if (mMaxFontAttempts < 0) { -+ return PR_FALSE; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsTried.Length(); i++) { -+ if (mFontsTried[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsTried[i].style == font.style*/) { -+ // seen it before: OK -+ return PR_FALSE; -+ } -+ } -+ -+ if (mFontsTried.Length() >= mMaxFontAttempts) { -+ return PR_TRUE; -+ } -+ -+ return PR_FALSE; -+} -+ -+void -+nsPresContext::AddFontUse(const nsFont &font) { -+ if (mMaxFonts < 0) { -+ return; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsUsed.Length(); i++) { -+ if (mFontsUsed[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsUsed[i].style == font.style*/) { -+ // seen it before: OK -+ return; -+ } -+ } -+ -+ if (mFontsUsed.Length() >= mMaxFonts) { -+ return; -+ } -+ -+ mFontsUsed.AppendElement(font); -+ return; -+} -+ -+void -+nsPresContext::AddFontAttempt(const nsFont &font) { -+ if (mMaxFontAttempts < 0) { -+ return; -+ } -+ -+ for (PRUint32 i = 0; i < mFontsTried.Length(); i++) { -+ if (mFontsTried[i].name.Equals(font.name, -+ nsCaseInsensitiveStringComparator()) -+ // XXX: Style is sometimes filled with garbage?? -+ /*&& mFontsTried[i].style == font.style*/) { -+ // seen it before: OK -+ return; -+ } -+ } -+ -+ if (mFontsTried.Length() >= mMaxFontAttempts) { -+ return; -+ } -+ -+ mFontsTried.AppendElement(font); -+ return; -+} -+ - void - nsPresContext::SetFullZoom(float aZoom) - { -diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h -index 4b70c2f..ae8fcd5 100644 ---- a/layout/base/nsPresContext.h -+++ b/layout/base/nsPresContext.h -@@ -535,6 +535,13 @@ public: - } - } - -+ nsTArray<nsFont> mFontsUsed; // currently for font-count limiting only -+ nsTArray<nsFont> mFontsTried; // currently for font-count limiting only -+ void AddFontUse(const nsFont &font); -+ void AddFontAttempt(const nsFont &font); -+ PRBool FontUseCountReached(const nsFont &font); -+ PRBool FontAttemptCountReached(const nsFont &font); -+ - PRInt32 MinFontSize() const { - return NS_MAX(mMinFontSize, mMinimumFontSizePref); - } -@@ -1127,6 +1134,8 @@ protected: - PRUint32 mInterruptChecksToSkip; - - mozilla::TimeStamp mReflowStartTime; -+ PRInt32 mMaxFontAttempts; -+ PRInt32 mMaxFonts; - - unsigned mHasPendingInterrupt : 1; - unsigned mInterruptsEnabled : 1; -diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp -index 9eb41ac..47065d0 100644 ---- a/layout/style/nsRuleNode.cpp -+++ b/layout/style/nsRuleNode.cpp -@@ -3087,6 +3087,7 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - - // See if there is a minimum font-size constraint to honor - nscoord minimumFontSize = mPresContext->MinFontSize(); -+ PRBool isXUL = PR_FALSE; - - if (minimumFontSize < 0) - minimumFontSize = 0; -@@ -3098,10 +3099,10 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - // We only need to know this to determine if we have to use the - // document fonts (overriding the useDocumentFonts flag), or to - // determine if we have to override the minimum font-size constraint. -- if ((!useDocumentFonts || minimumFontSize > 0) && mPresContext->IsChrome()) { -+ if (mPresContext->IsChrome()) { - // if we are not using document fonts, but this is a XUL document, - // then we use the document fonts anyway -- useDocumentFonts = true; -+ isXUL = PR_TRUE; - minimumFontSize = 0; - } - -@@ -3116,9 +3117,13 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - // generic? - nsFont::GetGenericID(font->mFont.name, &generic); - -+ mPresContext->AddFontAttempt(font->mFont); -+ - // If we aren't allowed to use document fonts, then we are only entitled - // to use the user's default variable-width font and fixed-width font -- if (!useDocumentFonts) { -+ if (!isXUL && (!useDocumentFonts || -+ mPresContext->FontAttemptCountReached(font->mFont) || -+ mPresContext->FontUseCountReached(font->mFont))) { - // Extract the generic from the specified font family... - nsAutoString genericName; - if (!font->mFont.EnumerateFamilies(ExtractGeneric, &genericName)) { -@@ -3154,6 +3159,8 @@ nsRuleNode::ComputeFontData(void* aStartStruct, - minimumFontSize, font); - } - -+ if (font->mGenericID == kGenericFont_NONE) -+ mPresContext->AddFontUse(font->mFont); - COMPUTE_END_INHERITED(Font, font) - } - --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch b/www-client/torbrowser/files/12.0/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch deleted file mode 100644 index 33ff9a243..000000000 --- a/www-client/torbrowser/files/12.0/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch +++ /dev/null @@ -1,251 +0,0 @@ -From 6147cea4de151dade922b3c2787016f70c222458 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Tue, 24 Apr 2012 17:21:45 -0700 -Subject: [PATCH 12/16] Randomize HTTP request order and pipeline depth. - -This is an experimental defense against -http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf - -See: -https://blog.torproject.org/blog/experimental-defense-website-traffic-fingerprinting - -This defense has been improved since that blog post to additionally randomize -the order and concurrency of non-pipelined HTTP requests. ---- - netwerk/protocol/http/nsHttpConnectionMgr.cpp | 133 ++++++++++++++++++++++++- - netwerk/protocol/http/nsHttpConnectionMgr.h | 5 + - 2 files changed, 133 insertions(+), 5 deletions(-) - -diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp -index 6e1099d..3eec5b3 100644 ---- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp -+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp -@@ -100,6 +100,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr() - mCT.Init(); - mAlternateProtocolHash.Init(16); - mSpdyPreferredHash.Init(); -+ -+ nsresult rv; -+ mRandomGenerator = do_GetService("@mozilla.org/security/random-generator;1", &rv); -+ if (NS_FAILED(rv)) { -+ mRandomGenerator = nsnull; -+ } - } - - nsHttpConnectionMgr::~nsHttpConnectionMgr() -@@ -353,8 +359,12 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline) - nsConnectionEntry *ent = mCT.Get(ci->HashKey()); - if (ent) { - // search for another request to pipeline... -- PRInt32 i, count = ent->mPendingQ.Length(); -- for (i=0; i<count; ++i) { -+ PRInt32 i, h, count = ent->mPendingQ.Length(); -+ PRInt32* ind = new PRInt32[count]; -+ ShuffleRequestOrder((PRUint32*)ind, (PRUint32)count); -+ -+ for (h=0; h<count; ++h) { -+ i = ind[h]; // random request sequence - nsHttpTransaction *trans = ent->mPendingQ[i]; - if (trans->Caps() & NS_HTTP_ALLOW_PIPELINING) { - pipeline->AddTransaction(trans); -@@ -365,6 +375,8 @@ - break; - } - } -+ -+ delete [] ind; - } - } - } -@@ -898,12 +908,17 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent) - - ProcessSpdyPendingQ(ent); - -- PRUint32 i, count = ent->mPendingQ.Length(); -+ PRUint32 h, i = 0, count = ent->mPendingQ.Length(); - if (count > 0) { - LOG((" pending-count=%u\n", count)); - nsHttpTransaction *trans = nsnull; - nsHttpConnection *conn = nsnull; -- for (i = 0; i < count; ++i) { -+ -+ PRUint32* ind = new PRUint32[count]; -+ ShuffleRequestOrder(ind, count); -+ -+ for (h=0; h<count; ++h) { -+ i = ind[h]; // random request sequence - trans = ent->mPendingQ[i]; - - // When this transaction has already established a half-open -@@ -927,6 +944,7 @@ - "something mutated pending queue from " - "GetConnection()"); - } -+ delete [] ind; - if (conn) { - LOG((" dispatching pending transaction...\n")); - -@@ -1011,6 +1026,19 @@ nsHttpConnectionMgr::AtActiveConnectionLimit(nsConnectionEntry *ent, PRUint8 cap - maxPersistConns = mMaxPersistConnsPerHost; - } - -+ // Fuzz maxConns for website fingerprinting attack -+ // We create a range of maxConns/5 up to 6*maxConns/5 -+ // because this function is called repeatedly, and we'll -+ // end up converging on a the high side of concurrent connections -+ // after a short while. -+ PRUint8 *bytes = nsnull; -+ nsresult rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ bytes[0] = bytes[0] % (maxConns + 1); -+ maxConns = (maxConns/5) + bytes[0]; -+ NS_Free(bytes); -+ - // use >= just to be safe - return (totalCount >= maxConns) || ( (caps & NS_HTTP_ALLOW_KEEPALIVE) && - (persistCount >= maxPersistConns) ); -@@ -1227,7 +1255,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent, - - if (conn->SupportsPipelining() && (caps & NS_HTTP_ALLOW_PIPELINING)) { - LOG((" looking to build pipeline...\n")); -- if (BuildPipeline(ent, trans, &pipeline)) -+ if (BuildRandomizedPipeline(ent, trans, &pipeline)) - trans = pipeline; - } - -@@ -1300,6 +1328,101 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent, - return true; - } - -+ -+// Generate a shuffled request ordering sequence -+void -+nsHttpConnectionMgr::ShuffleRequestOrder(PRUint32 *ind, PRUint32 count) -+{ -+ PRUint32 i; -+ PRUint32 *rints; -+ -+ for (i=0; i<count; ++i) { -+ ind[i] = i; -+ } -+ nsresult rv = mRandomGenerator->GenerateRandomBytes(sizeof(PRUint32)*count, -+ (PRUint8**)&rints); -+ if (NS_FAILED(rv)) -+ return; // Leave unshuffled if error -+ -+ for (i=0; i < count; ++i) { -+ PRInt32 temp = ind[i]; -+ ind[i] = ind[rints[i]%count]; -+ ind[rints[i]%count] = temp; -+ } -+ NS_Free(rints); -+} -+ -+bool -+nsHttpConnectionMgr::BuildRandomizedPipeline(nsConnectionEntry *ent, -+ nsAHttpTransaction *firstTrans, -+ nsHttpPipeline **result) -+{ -+ if (mRandomGenerator == nsnull) -+ return BuildPipeline(ent, firstTrans, result); -+ if (mMaxPipelinedRequests < 2) -+ return PR_FALSE; -+ -+ nsresult rv; -+ PRUint8 *bytes = nsnull; -+ -+ nsHttpPipeline *pipeline = nsnull; -+ nsHttpTransaction *trans; -+ -+ PRUint32 i = 0, numAdded = 0, numAllowed = 0; -+ PRUint32 max = 0; -+ -+ while (i < ent->mPendingQ.Length()) { -+ if (ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING) -+ numAllowed++; -+ i++; -+ } -+ -+ rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ // 4...12 -+ max = 4 + (bytes[0] % (mMaxPipelinedRequests + 1)); -+ NS_Free(bytes); -+ -+ while (numAllowed > 0) { -+ rv = mRandomGenerator->GenerateRandomBytes(1, &bytes); -+ NS_ENSURE_SUCCESS(rv, rv); -+ i = bytes[0] % ent->mPendingQ.Length(); -+ NS_Free(bytes); -+ -+ trans = ent->mPendingQ[i]; -+ -+ if (!(ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING)) -+ continue; -+ -+ if (numAdded == 0) { -+ pipeline = new nsHttpPipeline; -+ if (!pipeline) -+ return PR_FALSE; -+ pipeline->AddTransaction(firstTrans); -+ numAdded = 1; -+ } -+ pipeline->AddTransaction(trans); -+ -+ // remove transaction from pending queue -+ ent->mPendingQ.RemoveElementAt(i); -+ NS_RELEASE(trans); -+ -+ numAllowed--; -+ -+ if (++numAdded == max) -+ break; -+ } -+ -+ //fprintf(stderr, "Yay!!! pipelined %u/%u transactions\n", numAdded, max); -+ LOG((" pipelined %u/%u transactions\n", numAdded, max)); -+ -+ if (numAdded == 0) -+ return PR_FALSE; -+ -+ NS_ADDREF(*result = pipeline); -+ return PR_TRUE; -+} -+ - nsresult - nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans) - { -diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h -index a13da0f..59ee9b9 100644 ---- a/netwerk/protocol/http/nsHttpConnectionMgr.h -+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h -@@ -54,6 +54,7 @@ - #include "nsIObserver.h" - #include "nsITimer.h" - #include "nsIX509Cert3.h" -+#include "nsIRandomGenerator.h" - - class nsHttpPipeline; - -@@ -317,6 +318,8 @@ private: - nsresult DispatchTransaction(nsConnectionEntry *, nsHttpTransaction *, - PRUint8 caps, nsHttpConnection *); - bool BuildPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **); -+ bool BuildRandomizedPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **); -+ void ShuffleRequestOrder(PRUint32 *, PRUint32); - nsresult ProcessNewTransaction(nsHttpTransaction *); - nsresult EnsureSocketThreadTargetIfOnline(); - void ClosePersistentConnections(nsConnectionEntry *ent); -@@ -409,6 +412,8 @@ private: - PRUint64 mTimeOfNextWakeUp; - // Timer for next pruning of dead connections. - nsCOMPtr<nsITimer> mTimer; -+ // Random number generator for reordering HTTP pipeline -+ nsCOMPtr<nsIRandomGenerator> mRandomGenerator; - - // - // the connection table --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0013-Rebrand-Firefox-to-TorBrowser.patch b/www-client/torbrowser/files/12.0/0013-Rebrand-Firefox-to-TorBrowser.patch deleted file mode 100644 index 81ee4e2b8..000000000 --- a/www-client/torbrowser/files/12.0/0013-Rebrand-Firefox-to-TorBrowser.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 6a588618b49d59512c118802911d6f95c610299f Mon Sep 17 00:00:00 2001 -From: Erinn Clark <erinn@torproject.org> -Date: Wed, 25 Apr 2012 09:14:00 -0300 -Subject: [PATCH 13/16] Rebrand Firefox to TorBrowser - -This patch does some basic renaming of Firefox to TorBrowser. The rest of the -branding is done by images and icons. ---- - browser/branding/official/configure.sh | 2 +- - browser/branding/official/locales/en-US/brand.dtd | 6 +++--- - .../official/locales/en-US/brand.properties | 6 +++--- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/browser/branding/official/configure.sh b/browser/branding/official/configure.sh -index 4d3d297..e9b3738 100644 ---- a/browser/branding/official/configure.sh -+++ b/browser/branding/official/configure.sh -@@ -1,2 +1,2 @@ --MOZ_APP_DISPLAYNAME=Firefox -+MOZ_APP_DISPLAYNAME=TorBrowser - MOZ_UA_BUILDID=20100101 -diff --git a/browser/branding/official/locales/en-US/brand.dtd b/browser/branding/official/locales/en-US/brand.dtd -index 142d79b..c137e04 100644 ---- a/browser/branding/official/locales/en-US/brand.dtd -+++ b/browser/branding/official/locales/en-US/brand.dtd -@@ -1,4 +1,4 @@ --<!ENTITY brandShortName "Firefox"> --<!ENTITY brandFullName "Mozilla Firefox"> --<!ENTITY vendorShortName "Mozilla"> -+<!ENTITY brandShortName "TorBrowser"> -+<!ENTITY brandFullName "Tor Browser"> -+<!ENTITY vendorShortName "Tor Project"> - <!ENTITY trademarkInfo.part1 "Firefox and the Firefox logos are trademarks of the Mozilla Foundation."> -diff --git a/browser/branding/official/locales/en-US/brand.properties b/browser/branding/official/locales/en-US/brand.properties -index 5f3ad54..62ac2fd 100644 ---- a/browser/branding/official/locales/en-US/brand.properties -+++ b/browser/branding/official/locales/en-US/brand.properties -@@ -1,6 +1,6 @@ --brandShortName=Firefox --brandFullName=Mozilla Firefox --vendorShortName=Mozilla -+brandShortName=TorBrowser -+brandFullName=Tor Browser -+vendorShortName=Tor Project - - homePageSingleStartMain=Firefox Start, a fast home page with built-in search - homePageImport=Import your home page from %S --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0014-Make-Download-manager-memory-only.patch b/www-client/torbrowser/files/12.0/0014-Make-Download-manager-memory-only.patch deleted file mode 100644 index 66346885b..000000000 --- a/www-client/torbrowser/files/12.0/0014-Make-Download-manager-memory-only.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e01aaa410e0e8fabf75841ad6b975fc3ff89e154 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 25 Apr 2012 13:39:35 -0700 -Subject: [PATCH 14/16] Make Download manager memory only. - -Solves https://trac.torproject.org/projects/tor/ticket/4017. - -Yes, this is an ugly hack. We *could* send the observer notification from -Torbutton to tell the download manager to switch to memory, but then we have -to dance around and tell it again if the user switches in and out of private -browsing mode.. - -The right way to do this is with a pref. Maybe I'll get to that someday, if -this breaks enough times in conflict. ---- - toolkit/components/downloads/nsDownloadManager.cpp | 4 ++-- - toolkit/components/downloads/nsDownloadManager.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp -index 17c9dcb..62e0ad9 100644 ---- a/toolkit/components/downloads/nsDownloadManager.cpp -+++ b/toolkit/components/downloads/nsDownloadManager.cpp -@@ -2002,7 +2002,7 @@ nsDownloadManager::Observe(nsISupports *aSubject, - if (NS_LITERAL_STRING("memory").Equals(aData)) - return SwitchDatabaseTypeTo(DATABASE_MEMORY); - else if (NS_LITERAL_STRING("disk").Equals(aData)) -- return SwitchDatabaseTypeTo(DATABASE_DISK); -+ return SwitchDatabaseTypeTo(DATABASE_MEMORY); - } - else if (strcmp(aTopic, "alertclickcallback") == 0) { - nsCOMPtr<nsIDownloadManagerUI> dmui = -@@ -2079,7 +2079,7 @@ nsDownloadManager::OnLeavePrivateBrowsingMode() - (void)ResumeAllDownloads(false); - - // Switch back to the on-disk DB again -- (void)SwitchDatabaseTypeTo(DATABASE_DISK); -+ //(void)SwitchDatabaseTypeTo(DATABASE_DISK); - - mInPrivateBrowsing = false; - } -diff --git a/toolkit/components/downloads/nsDownloadManager.h b/toolkit/components/downloads/nsDownloadManager.h -index 54312e4..cb63b52 100644 ---- a/toolkit/components/downloads/nsDownloadManager.h -+++ b/toolkit/components/downloads/nsDownloadManager.h -@@ -90,7 +90,7 @@ public: - - virtual ~nsDownloadManager(); - nsDownloadManager() : -- mDBType(DATABASE_DISK) -+ mDBType(DATABASE_MEMORY) - , mInPrivateBrowsing(false) - #ifdef DOWNLOAD_SCANNER - , mScanner(nsnull) --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0015-Add-DDG-and-StartPage-to-Omnibox.patch b/www-client/torbrowser/files/12.0/0015-Add-DDG-and-StartPage-to-Omnibox.patch deleted file mode 100644 index e0740ae09..000000000 --- a/www-client/torbrowser/files/12.0/0015-Add-DDG-and-StartPage-to-Omnibox.patch +++ /dev/null @@ -1,84 +0,0 @@ -From db055738d6431057670e8f219616170ed3644a9e Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Wed, 25 Apr 2012 15:03:46 -0700 -Subject: [PATCH 15/16] Add DDG and StartPage to Omnibox. - -You mean there are search engines that don't require captchas if you don't -have a cookie? Holy crap. Get those in there now. ---- - browser/locales/en-US/searchplugins/duckduckgo.xml | 29 ++++++++++++++++++++ - browser/locales/en-US/searchplugins/list.txt | 2 + - browser/locales/en-US/searchplugins/startpage.xml | 11 +++++++ - 3 files changed, 42 insertions(+), 0 deletions(-) - create mode 100644 browser/locales/en-US/searchplugins/duckduckgo.xml - create mode 100644 browser/locales/en-US/searchplugins/startpage.xml - -diff --git a/browser/locales/en-US/searchplugins/duckduckgo.xml b/browser/locales/en-US/searchplugins/duckduckgo.xml -new file mode 100644 -index 0000000..4f00b4d ---- /dev/null -+++ b/browser/locales/en-US/searchplugins/duckduckgo.xml -@@ -0,0 +1,29 @@ -+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> -+<ShortName>DuckDuckGo</ShortName> -+<Description>Duck Duck Go</Description> -+<InputEncoding>UTF-8</InputEncoding> -+<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAA -+AAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8n -+IOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rB -+Uv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n///// -+/05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v// -+//////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9h -+XPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg -+7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs -+5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/ -+JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8n IOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg -+7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1 -+/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/ -+fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y -+1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg -+7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDs -+AScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAA -+AAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAA -+AAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMAD -+AADwDwAA+B8AAA==</Image> -+<Url type="text/html" method="POST" template="https://duckduckgo.com/html/"> -+ <Param name="q" value="{searchTerms}"/> -+</Url> -+<SearchForm>https://duckduckgo.com/html/</SearchForm> -+</SearchPlugin> -diff --git a/browser/locales/en-US/searchplugins/list.txt b/browser/locales/en-US/searchplugins/list.txt -index 2a1141a..0466f4e 100644 ---- a/browser/locales/en-US/searchplugins/list.txt -+++ b/browser/locales/en-US/searchplugins/list.txt -@@ -1,7 +1,9 @@ - amazondotcom - bing -+duckduckgo - eBay - google -+startpage - twitter - wikipedia - yahoo -diff --git a/browser/locales/en-US/searchplugins/startpage.xml b/browser/locales/en-US/searchplugins/startpage.xml -new file mode 100644 -index 0000000..1a310b1 ---- /dev/null -+++ b/browser/locales/en-US/searchplugins/startpage.xml -@@ -0,0 +1,11 @@ -+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> -+<ShortName>Startpage</ShortName> -+<Description>Start Page</Description> -+<InputEncoding>UTF-8</InputEncoding> -+<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2jkj+9YtD/vWLQ/71i0P+9otD/vaLRP72i0T+9YtE/vWLRP72i0T+9otD/vaNRP72jUT+9otF/vaLRf73kkv+9Yc///WJP//1iT//9Yk///rAmf/94Mz/+sCa//aRTv/1iUH/9ok///aJP//2i0H/9otB//aJQv/2iUL/9otC//aNRP/2jUT/9o1E//aNRP/6wpv////////////96dr/95dQ//aNRP/2kET/9pBG//aQRv/2kEb/9pBG//aRR//3lEz/95BH//mueP/7xJ3/959g//efYf/4p23//vDm//3p2//3kEr/95FJ//aRSf/niFH/95FK//aRSv/2mE//95hS/vq4iP/////////////////81bj/95xZ//q4iP//////+bF+//eZT//njFT/PSqi/2xGjv/2mVD/951V/vedVv783cX///////vQrf/++PP///////748//+8uj///////m3gf/olFr/PSuj/w8Pt/9sSJD/951V//eeWf73oVv++8ul///////5sXf/+KRi//vRsf////////////3r3v/olF//Piyk/w8Pt/9sSJH/+J5Z//ieWv/3oV/++KZf/vihXP/97N7//vn0//zTs//6wJP/+bBy//q6iP/onW//Piyl/w8Pt/8fGbH/m2iB/+icY//4pGD/96hl/viqZf74pmD/+Kxr//3iy/////////n1//ivbP/onGj/Pi2m/w8Pt/8uJKz/fFeQ/x8Zsf8+Lqb/6J9r//ivbP74rm3++Klm//mpZv/5q2f/+bR9//m0e//poW7/Pi6n/w8Pt/9sTZj/+Ktp//ira/+rd4P/Dw+3/4xijv/5snH++LN1/vmvbf/5r23/+a5t//mvb//4r2//TTuk/w8Pt/8fGrL/6ah1//ivcP/4r3P/q3yI/w8Pt/+MZpP/+bN5/vm4ev75t3X/+bV1//m1df/5t3X/+Ld3/8qUhP98XZn/Hxqz/+mse//5t3f/2p+B/x8as/8PD7f/u4qK//m7fv76u4D++bl7//m3fP/5uXz/+bl8//m5fP/5t3z/+bl//x8as/9NPKf/fWCb/x8as/8PD7f/bVOh//q5f//6v4X++sGI/vm9g//5voX/+b6F//m9hf/6vYX/+r6F//nCh/+bepr/Hxu0/w8Pt/8PD7f/fWOh//q+hf/6wof/+saN/vrGjf75xIv/+ceL//nEi//5xIv/+sSL//rHi//6x43/+ceN/+m7kP+7lpj/6ruQ//rHkP/6x43/+seQ//rLlf76ypT++seR//rJkf/6yZH/+seR//rJkf/6yZH/+8mR//vJlP/7yZT/+smU//rJlP/6yZT/+8yV//rJlf/6zpn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</Image> -+ -+<Url type="text/html" method="POST" template="https://startpage.com/do/search"> -+ <Param name="q" value="{searchTerms}"/> -+</Url> -+<SearchForm>https://startpage.com/do/search/</SearchForm> -+</SearchPlugin> --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0016-Adapt-Steven-Michaud-s-Mac-crashfix-patch-for-FF12.patch b/www-client/torbrowser/files/12.0/0016-Adapt-Steven-Michaud-s-Mac-crashfix-patch-for-FF12.patch deleted file mode 100644 index 5a08ed4cc..000000000 --- a/www-client/torbrowser/files/12.0/0016-Adapt-Steven-Michaud-s-Mac-crashfix-patch-for-FF12.patch +++ /dev/null @@ -1,544 +0,0 @@ -From 262403fb627ca452bfbcaf06fd6ad965f156ed18 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Thu, 26 Apr 2012 10:54:24 -0700 -Subject: [PATCH 16/16] Adapt Steven Michaud's Mac crashfix patch for FF12. - -Source is: https://bugzilla.mozilla.org/show_bug.cgi?id=715885#c35 - -Some minor tweaks were needed to get it to apply to FF12 and to compile on -MacOS. ---- - widget/Makefile.in | 1 + - widget/cocoa/nsChildView.mm | 35 +++++++++++++-------- - widget/gtk2/nsDragService.cpp | 2 +- - widget/gtk2/nsWindow.cpp | 2 +- - widget/nsIDragService.idl | 4 +-- - widget/nsPIDragService.idl | 48 +++++++++++++++++++++++++++++ - widget/qt/nsDragService.h | 2 + - widget/windows/Makefile.in | 4 ++ - widget/windows/nsDragService.cpp | 13 +++++--- - widget/windows/nsDragService.h | 12 +++--- - widget/windows/nsNativeDragSource.cpp | 7 ++-- - widget/windows/nsNativeDragTarget.cpp | 28 ++++++++++------ - widget/windows/nsPIDragServiceWindows.idl | 46 +++++++++++++++++++++++++++ - widget/xpwidgets/nsBaseDragService.cpp | 16 +++++++++- - widget/xpwidgets/nsBaseDragService.h | 9 ++--- - 15 files changed, 180 insertions(+), 49 deletions(-) - create mode 100644 widget/nsPIDragService.idl - create mode 100644 widget/windows/nsPIDragServiceWindows.idl - -diff --git a/widget/Makefile.in b/widget/Makefile.in -index 4a3405b..4c105a4 100644 ---- a/widget/Makefile.in -+++ b/widget/Makefile.in -@@ -138,6 +138,7 @@ XPIDLSRCS = \ - nsIClipboardDragDropHooks.idl \ - nsIClipboardDragDropHookList.idl \ - nsIDragSession.idl \ -+ nsPIDragService.idl \ - nsIDragService.idl \ - nsIFormatConverter.idl \ - nsIClipboard.idl \ -diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm -index 7f738a1..0149ab1 100644 ---- a/widget/cocoa/nsChildView.mm -+++ b/widget/cocoa/nsChildView.mm -@@ -4566,11 +4566,12 @@ NSEvent* gLastDragMouseDownEvent = nil; - if (!dragService) { - dragService = do_GetService(kDragServiceContractID); - } -+ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(dragService); - - if (dragService) { - NSPoint pnt = [NSEvent mouseLocation]; - FlipCocoaScreenCoordinate(pnt); -- dragService->DragMoved(NSToIntRound(pnt.x), NSToIntRound(pnt.y)); -+ dragServicePriv->DragMoved(NSToIntRound(pnt.x), NSToIntRound(pnt.y)); - } - } - -@@ -4591,11 +4592,13 @@ NSEvent* gLastDragMouseDownEvent = nil; - } - - if (mDragService) { -- // set the dragend point from the current mouse location -- nsDragService* dragService = static_cast<nsDragService *>(mDragService); -- NSPoint pnt = [NSEvent mouseLocation]; -- FlipCocoaScreenCoordinate(pnt); -- dragService->SetDragEndPoint(nsIntPoint(NSToIntRound(pnt.x), NSToIntRound(pnt.y))); -+ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(mDragService); -+ if (dragServicePriv) { -+ // set the dragend point from the current mouse location -+ NSPoint pnt = [NSEvent mouseLocation]; -+ FlipCocoaScreenCoordinate(pnt); -+ dragServicePriv->SetDragEndPoint(NSToIntRound(pnt.x), NSToIntRound(pnt.y)); -+ } - - // XXX: dropEffect should be updated per |operation|. - // As things stand though, |operation| isn't well handled within "our" -@@ -4606,13 +4609,19 @@ NSEvent* gLastDragMouseDownEvent = nil; - // value for NSDragOperationGeneric that is passed by other applications. - // All that said, NSDragOperationNone is still reliable. - if (operation == NSDragOperationNone) { -- nsCOMPtr<nsIDOMDataTransfer> dataTransfer; -- dragService->GetDataTransfer(getter_AddRefs(dataTransfer)); -- nsCOMPtr<nsIDOMNSDataTransfer> dataTransferNS = -- do_QueryInterface(dataTransfer); -- -- if (dataTransferNS) -- dataTransferNS->SetDropEffectInt(nsIDragService::DRAGDROP_ACTION_NONE); -+ nsCOMPtr<nsIDragSession> dragSession; -+ mDragService->GetCurrentSession(getter_AddRefs(dragSession)); -+ if (dragSession) { -+ nsCOMPtr<nsIDOMDataTransfer> dataTransfer; -+ dragSession->GetDataTransfer(getter_AddRefs(dataTransfer)); -+ if (dataTransfer) { -+ nsCOMPtr<nsIDOMNSDataTransfer> dataTransferNS = -+ do_QueryInterface(dataTransfer); -+ if (dataTransferNS) { -+ dataTransferNS->SetDropEffectInt(nsIDragService::DRAGDROP_ACTION_NONE); -+ } -+ } -+ } - } - - mDragService->EndDragSession(true); -diff --git a/widget/gtk2/nsDragService.cpp b/widget/gtk2/nsDragService.cpp -index ca5a42c..876fd55 100644 ---- a/widget/gtk2/nsDragService.cpp -+++ b/widget/gtk2/nsDragService.cpp -@@ -1334,7 +1334,7 @@ nsDragService::SourceEndDragSession(GdkDragContext *aContext, - GdkDisplay* display = gdk_display_get_default(); - if (display) { - gdk_display_get_pointer(display, NULL, &x, &y, NULL); -- SetDragEndPoint(nsIntPoint(x, y)); -+ SetDragEndPoint(x, y); - } - - // Either the drag was aborted or the drop occurred outside the app. -diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp -index 5e4afee..25c394b 100644 ---- a/widget/gtk2/nsWindow.cpp -+++ b/widget/gtk2/nsWindow.cpp -@@ -3698,7 +3698,7 @@ nsWindow::OnDragDropEvent(GtkWidget *aWidget, - if (display) { - // get the current cursor position - gdk_display_get_pointer(display, NULL, &x, &y, NULL); -- ((nsDragService *)dragService.get())->SetDragEndPoint(nsIntPoint(x, y)); -+ ((nsDragService *)dragService.get())->SetDragEndPoint(x, y); - } - dragService->EndDragSession(true); - -diff --git a/widget/nsIDragService.idl b/widget/nsIDragService.idl -index e42c578..ef8c46f 100644 ---- a/widget/nsIDragService.idl -+++ b/widget/nsIDragService.idl -@@ -48,7 +48,7 @@ interface nsIDOMDragEvent; - interface nsIDOMDataTransfer; - interface nsISelection; - --[scriptable, uuid(82B58ADA-F490-4C3D-B737-1057C4F1D052), builtinclass] -+[scriptable, uuid(82B58ADA-F490-4C3D-B737-1057C4F1D052)] - interface nsIDragService : nsISupports - { - const long DRAGDROP_ACTION_NONE = 0; -@@ -145,8 +145,6 @@ interface nsIDragService : nsISupports - */ - void suppress(); - void unsuppress(); -- -- [noscript] void dragMoved(in long aX, in long aY); - }; - - -diff --git a/widget/nsPIDragService.idl b/widget/nsPIDragService.idl -new file mode 100644 -index 0000000..93a144d ---- /dev/null -+++ b/widget/nsPIDragService.idl -@@ -0,0 +1,48 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * The Mozilla Foundation. -+ * Portions created by the Initial Developer are Copyright (C) 2012 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Steven Michaud <smichaud@pobox.com> -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsISupports.idl" -+ -+[scriptable, uuid(FAD8C90B-8E1D-446A-9B6C-241486A85CBD)] -+interface nsPIDragService : nsISupports -+{ -+ void dragMoved(in long aX, in long aY); -+ -+ PRUint16 getInputSource(); -+ -+ void setDragEndPoint(in long aX, in long aY); -+}; -diff --git a/widget/qt/nsDragService.h b/widget/qt/nsDragService.h -index 5a3e5bb..50dcfac 100644 ---- a/widget/qt/nsDragService.h -+++ b/widget/qt/nsDragService.h -@@ -50,6 +50,8 @@ public: - NS_DECL_ISUPPORTS - NS_DECL_NSIDRAGSERVICE - -+ NS_IMETHOD DragMoved(PRInt32 aX, PRInt32 aY); -+ - nsDragService(); - - private: -diff --git a/widget/windows/Makefile.in b/widget/windows/Makefile.in -index c9327f8..3298997 100644 ---- a/widget/windows/Makefile.in -+++ b/widget/windows/Makefile.in -@@ -119,6 +119,10 @@ ifdef MOZ_ENABLE_D3D10_LAYER - DEFINES += -DMOZ_ENABLE_D3D10_LAYER - endif - -+XPIDLSRCS += \ -+ nsPIDragServiceWindows.idl \ -+ $(NULL) -+ - SHARED_LIBRARY_LIBS = \ - ../xpwidgets/$(LIB_PREFIX)xpwidgets_s.$(LIB_SUFFIX) \ - $(NULL) -diff --git a/widget/windows/nsDragService.cpp b/widget/windows/nsDragService.cpp -index 8c5df7e..1cf9995 100644 ---- a/widget/windows/nsDragService.cpp -+++ b/widget/windows/nsDragService.cpp -@@ -97,6 +97,8 @@ nsDragService::~nsDragService() - NS_IF_RELEASE(mDataObject); - } - -+NS_IMPL_ISUPPORTS_INHERITED1(nsDragService, nsBaseDragService, nsPIDragServiceWindows) -+ - bool - nsDragService::CreateDragImage(nsIDOMNode *aDOMNode, - nsIScriptableRegion *aRegion, -@@ -350,7 +352,7 @@ nsDragService::StartInvokingDragSession(IDataObject * aDataObj, - POINT cpos; - cpos.x = GET_X_LPARAM(pos); - cpos.y = GET_Y_LPARAM(pos); -- SetDragEndPoint(nsIntPoint(cpos.x, cpos.y)); -+ SetDragEndPoint(cpos.x, cpos.y); - EndDragSession(true); - - mDoingDrag = false; -@@ -468,25 +470,26 @@ nsDragService::GetData(nsITransferable * aTransferable, PRUint32 anItem) - - //--------------------------------------------------------- - NS_IMETHODIMP --nsDragService::SetIDataObject(IDataObject * aDataObj) -+nsDragService::SetIDataObject(nsISupports * aDataObj) - { -+ IDataObject *dataObj = (IDataObject*) aDataObj; - // When the native drag starts the DragService gets - // the IDataObject that is being dragged - NS_IF_RELEASE(mDataObject); -- mDataObject = aDataObj; -+ mDataObject = dataObj; - NS_IF_ADDREF(mDataObject); - - return NS_OK; - } - - //--------------------------------------------------------- --void -+NS_IMETHODIMP - nsDragService::SetDroppedLocal() - { - // Sent from the native drag handler, letting us know - // a drop occurred within the application vs. outside of it. - mSentLocalDropEvent = true; -- return; -+ return NS_OK; - } - - //------------------------------------------------------------------------- -diff --git a/widget/windows/nsDragService.h b/widget/windows/nsDragService.h -index 87d6cc9..04c8746 100644 ---- a/widget/windows/nsDragService.h -+++ b/widget/windows/nsDragService.h -@@ -39,6 +39,7 @@ - #define nsDragService_h__ - - #include "nsBaseDragService.h" -+#include "nsPIDragServiceWindows.h" - #include <windows.h> - #include <shlobj.h> - -@@ -52,12 +53,15 @@ class nsString; - * Native Win32 DragService wrapper - */ - --class nsDragService : public nsBaseDragService -+class nsDragService : public nsBaseDragService, public nsPIDragServiceWindows - { - public: - nsDragService(); - virtual ~nsDragService(); -- -+ -+ NS_DECL_ISUPPORTS_INHERITED -+ NS_DECL_NSPIDRAGSERVICEWINDOWS -+ - // nsIDragService - NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode, - nsISupportsArray *anArrayTransferables, -@@ -71,13 +75,9 @@ public: - NS_IMETHOD EndDragSession(bool aDoneDrag); - - // native impl. -- NS_IMETHOD SetIDataObject(IDataObject * aDataObj); - NS_IMETHOD StartInvokingDragSession(IDataObject * aDataObj, - PRUint32 aActionType); - -- // A drop occurred within the application vs. outside of it. -- void SetDroppedLocal(); -- - protected: - nsDataObjCollection* GetDataObjCollection(IDataObject * aDataObj); - -diff --git a/widget/windows/nsNativeDragSource.cpp b/widget/windows/nsNativeDragSource.cpp -index e51101e..0fe6ffe 100644 ---- a/widget/windows/nsNativeDragSource.cpp -+++ b/widget/windows/nsNativeDragSource.cpp -@@ -42,7 +42,7 @@ - #include "nsIServiceManager.h" - #include "nsToolkit.h" - #include "nsWidgetsCID.h" --#include "nsIDragService.h" -+#include "nsDragService.h" - - static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID); - -@@ -101,9 +101,10 @@ STDMETHODIMP - nsNativeDragSource::QueryContinueDrag(BOOL fEsc, DWORD grfKeyState) - { - nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID); -- if (dragService) { -+ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(dragService); -+ if (dragServicePriv) { - DWORD pos = ::GetMessagePos(); -- dragService->DragMoved(GET_X_LPARAM(pos), GET_Y_LPARAM(pos)); -+ dragServicePriv->DragMoved(GET_X_LPARAM(pos), GET_Y_LPARAM(pos)); - } - - if (fEsc) { -diff --git a/widget/windows/nsNativeDragTarget.cpp b/widget/windows/nsNativeDragTarget.cpp -index cf6196b..82ad3c6 100644 ---- a/widget/windows/nsNativeDragTarget.cpp -+++ b/widget/windows/nsNativeDragTarget.cpp -@@ -209,7 +209,11 @@ nsNativeDragTarget::DispatchDragDropEvent(PRUint32 aEventType, POINTL aPT) - event.isControl = IsKeyDown(NS_VK_CONTROL); - event.isMeta = false; - event.isAlt = IsKeyDown(NS_VK_ALT); -- event.inputSource = static_cast<nsBaseDragService*>(mDragService)->GetInputSource(); -+ event.inputSource = 0; -+ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(mDragService); -+ if (dragServicePriv) { -+ dragServicePriv->GetInputSource(&event.inputSource); -+ } - - mWindow->DispatchEvent(&event, status); - } -@@ -296,9 +300,8 @@ nsNativeDragTarget::DragEnter(LPDATAOBJECT pIDataSource, - // This cast is ok because in the constructor we created a - // the actual implementation we wanted, so we know this is - // a nsDragService. It should be a private interface, though. -- nsDragService * winDragService = -- static_cast<nsDragService *>(mDragService); -- winDragService->SetIDataObject(pIDataSource); -+ nsCOMPtr<nsPIDragServiceWindows> winDragService = do_QueryInterface(mDragService); -+ winDragService->SetIDataObject((nsISupports*)pIDataSource); - - // Now process the native drag state and then dispatch the event - ProcessDrag(NS_DRAGDROP_ENTER, grfKeyState, ptl, pdwEffect); -@@ -436,8 +439,8 @@ nsNativeDragTarget::Drop(LPDATAOBJECT pData, - // This cast is ok because in the constructor we created a - // the actual implementation we wanted, so we know this is - // a nsDragService (but it should still be a private interface) -- nsDragService* winDragService = static_cast<nsDragService*>(mDragService); -- winDragService->SetIDataObject(pData); -+ nsCOMPtr<nsPIDragServiceWindows> winDragService = do_QueryInterface(mDragService); -+ winDragService->SetIDataObject((nsISupports*)pData); - - // NOTE: ProcessDrag spins the event loop which may destroy arbitrary objects. - // We use strong refs to prevent it from destroying these: -@@ -461,11 +464,14 @@ nsNativeDragTarget::Drop(LPDATAOBJECT pData, - // tell the drag service we're done with the session - // Use GetMessagePos to get the position of the mouse at the last message - // seen by the event loop. (Bug 489729) -- DWORD pos = ::GetMessagePos(); -- POINT cpos; -- cpos.x = GET_X_LPARAM(pos); -- cpos.y = GET_Y_LPARAM(pos); -- winDragService->SetDragEndPoint(nsIntPoint(cpos.x, cpos.y)); -+ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(mDragService); -+ if (dragServicePriv) { -+ DWORD pos = ::GetMessagePos(); -+ POINT cpos; -+ cpos.x = GET_X_LPARAM(pos); -+ cpos.y = GET_Y_LPARAM(pos); -+ dragServicePriv->SetDragEndPoint(cpos.x, cpos.y); -+ } - serv->EndDragSession(true); - - // release the ref that was taken in DragEnter -diff --git a/widget/windows/nsPIDragServiceWindows.idl b/widget/windows/nsPIDragServiceWindows.idl -new file mode 100644 -index 0000000..c8a46dd ---- /dev/null -+++ b/widget/windows/nsPIDragServiceWindows.idl -@@ -0,0 +1,46 @@ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Mozilla Public License Version -+ * 1.1 (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * The Mozilla Foundation. -+ * Portions created by the Initial Developer are Copyright (C) 2012 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Steven Michaud <smichaud@pobox.com> -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the MPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the MPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+#include "nsISupports.idl" -+ -+[scriptable, uuid(6FC2117D-5EB4-441A-9C12-62A783BEBC0C)] -+interface nsPIDragServiceWindows : nsISupports -+{ -+ void setIDataObject(in nsISupports aDataObj); -+ -+ void setDroppedLocal(); -+}; -diff --git a/widget/xpwidgets/nsBaseDragService.cpp b/widget/xpwidgets/nsBaseDragService.cpp -index 342a036..87e28f7 100644 ---- a/widget/xpwidgets/nsBaseDragService.cpp -+++ b/widget/xpwidgets/nsBaseDragService.cpp -@@ -88,7 +88,7 @@ nsBaseDragService::~nsBaseDragService() - { - } - --NS_IMPL_ISUPPORTS2(nsBaseDragService, nsIDragService, nsIDragSession) -+NS_IMPL_ISUPPORTS3(nsBaseDragService, nsIDragService, nsPIDragService, nsIDragSession) - - //--------------------------------------------------------- - NS_IMETHODIMP -@@ -436,6 +436,20 @@ nsBaseDragService::DragMoved(PRInt32 aX, PRInt32 aY) - return NS_OK; - } - -+NS_IMETHODIMP -+nsBaseDragService::SetDragEndPoint(PRInt32 aX, PRInt32 aY) -+{ -+ mEndDragPoint = nsIntPoint(aX, aY); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsBaseDragService::GetInputSource(PRUint16* aInputSource) -+{ -+ *aInputSource = mInputSource; -+ return NS_OK; -+} -+ - static nsIPresShell* - GetPresShellForContent(nsIDOMNode* aDOMNode) - { -diff --git a/widget/xpwidgets/nsBaseDragService.h b/widget/xpwidgets/nsBaseDragService.h -index 290c0cb..2ceac2b 100644 ---- a/widget/xpwidgets/nsBaseDragService.h -+++ b/widget/xpwidgets/nsBaseDragService.h -@@ -39,6 +39,7 @@ - #define nsBaseDragService_h__ - - #include "nsIDragService.h" -+#include "nsPIDragService.h" - #include "nsIDragSession.h" - #include "nsITransferable.h" - #include "nsISupportsArray.h" -@@ -64,6 +65,7 @@ class nsICanvasElementExternal; - */ - - class nsBaseDragService : public nsIDragService, -+ public nsPIDragService, - public nsIDragSession - { - -@@ -74,14 +76,11 @@ public: - //nsISupports - NS_DECL_ISUPPORTS - -- //nsIDragSession and nsIDragService -+ //nsIDragSession, nsIDragService and nsPIDragService - NS_DECL_NSIDRAGSERVICE -+ NS_DECL_NSPIDRAGSERVICE - NS_DECL_NSIDRAGSESSION - -- void SetDragEndPoint(nsIntPoint aEndDragPoint) { mEndDragPoint = aEndDragPoint; } -- -- PRUint16 GetInputSource() { return mInputSource; } -- - protected: - - /** --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/12.0/0017-Make-nsICacheService.EvictEntries-synchronous.patch b/www-client/torbrowser/files/12.0/0017-Make-nsICacheService.EvictEntries-synchronous.patch deleted file mode 100644 index 5354027d7..000000000 --- a/www-client/torbrowser/files/12.0/0017-Make-nsICacheService.EvictEntries-synchronous.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f7bdc9274aa6dc8efccc50d18dbb287225aa6c27 Mon Sep 17 00:00:00 2001 -From: Mike Perry <mikeperry-git@torproject.org> -Date: Tue, 1 May 2012 15:02:03 -0700 -Subject: [PATCH 17/17] Make nsICacheService.EvictEntries synchronous - -This fixes a race condition that allows cache-based EverCookies to persist for -a brief time (on the order of minutes?) after cache clearing/"New Identity". - -https://trac.torproject.org/projects/tor/ticket/5715 ---- - netwerk/cache/nsCacheService.cpp | 15 +++++++++++++-- - 1 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp -index 015e49e..1ef0db1 100644 ---- a/netwerk/cache/nsCacheService.cpp -+++ b/netwerk/cache/nsCacheService.cpp -@@ -1415,10 +1415,21 @@ NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor) - return NS_OK; - } - -- - NS_IMETHODIMP nsCacheService::EvictEntries(nsCacheStoragePolicy storagePolicy) - { -- return EvictEntriesForClient(nsnull, storagePolicy); -+ NS_IMETHODIMP r; -+ r = EvictEntriesForClient(nsnull, storagePolicy); -+ -+ // XXX: Bloody hack until we get this notifier in FF14.0: -+ // https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsICacheListener#onCacheEntryDoomed%28%29 -+ if (storagePolicy == nsICache::STORE_ANYWHERE && -+ NS_IsMainThread() && gService && gService->mInitialized) { -+ nsCacheServiceAutoLock lock; -+ gService->DoomActiveEntries(); -+ gService->ClearDoomList(); -+ (void) SyncWithCacheIOThread(); -+ } -+ return r; - } - - NS_IMETHODIMP nsCacheService::GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) --- -1.7.5.4 - diff --git a/www-client/torbrowser/files/libvpx-1.0.0.patch b/www-client/torbrowser/files/libvpx-1.0.0.patch deleted file mode 100644 index 9283206dc..000000000 --- a/www-client/torbrowser/files/libvpx-1.0.0.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- configure.in 2012-02-03 09:19:03.710073220 -0800 -+++ configure.in 2012-02-03 09:18:56.158036304 -0800 -@@ -5616,20 +5616,20 @@ - [MOZ_NATIVE_LIBVPX_DEC_TEST=1], - ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])) - if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then -- AC_MSG_CHECKING([for libvpx version >= v0.9.7]) -- dnl We need at least v0.9.7 to fix several crash bugs (for which we -- dnl had local patches prior to v0.9.7). -+ AC_MSG_CHECKING([for libvpx version >= v1.0.0]) -+ dnl We need at least v1.0.0 to fix several crash bugs (for which we -+ dnl had local patches prior to v1.0.0). - dnl - dnl This is a terrible test for the library version, but we don't - dnl have a good one. There is no version number in a public header, - dnl and testing the headers still doesn't guarantee we link against - dnl the right version. While we could call vpx_codec_version() at - dnl run-time, that would break cross-compiling. There are no -- dnl additional exported symbols between the v0.9.7 release and the -- dnl v0.9.6 one to check for. -+ dnl additional exported decoder symbols between the v1.0.0 release -+ dnl and the v0.9.7 one to check for. - AC_TRY_COMPILE([ - #include <vpx/vpx_decoder.h> -- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) -+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) - #error "test failed." - #endif - ], -@@ -5639,7 +5639,7 @@ - MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include" - MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"], - [AC_MSG_RESULT([no]) -- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])]) -+ AC_MSG_ERROR([--with-system-libvpx requested but it is not v1.0.0 or later])]) - fi - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS diff --git a/www-client/torbrowser/metadata.xml b/www-client/torbrowser/metadata.xml deleted file mode 100644 index be9d5f560..000000000 --- a/www-client/torbrowser/metadata.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer><email>maintainer-wanted@gentoo.org</email></maintainer> - <use> - <flag name="bindist">Disable official Firefox branding (icons, name) which - are not binary-redistributable according to upstream.</flag> - <flag name="custom-optimization">Fine-tune custom compiler - optimizations, setting this is not recommended.</flag> - <flag name="crashreporter">Enable crashreporter for mozilla upstream, debugging - symbols are not required for reporting crashes.</flag> - <flag name="ipc">Use inter-process communication between tabs and plugins. - Allows for greater stability in case of plugin crashes</flag> - <flag name="pgo">Add support for profile-guided optimization using gcc-4.5, - for faster binaries. This option will double the compile time.</flag> - <flag name="system-sqlite">Use the system-wide <pkg>dev-db/sqlite</pkg> - installation with secure-delete enabled</flag> - <flag name="webm">Use system <pkg>media-libs/libvpx</pkg> for HTML5 WebM - video support.</flag> - </use> - <longdescription> - This is the torbrowser from the torbrowser-bundle, compiled from source - and without vidalia or tor. It optionally provides the preconfigured - profile-folder recommended by upstream which includes the extensions - Torbutton, NoScript and HTTPS-Everywhere. It does not conflict with - firefox. - </longdescription> -</pkgmetadata> diff --git a/www-client/torbrowser/torbrowser-10.0.1.ebuild b/www-client/torbrowser/torbrowser-10.0.1.ebuild deleted file mode 100644 index de21969f1..000000000 --- a/www-client/torbrowser/torbrowser-10.0.1.ebuild +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="3" -VIRTUALX_REQUIRED="pgo" -WANT_AUTOCONF="2.1" - -MY_PN="firefox" -# latest version of the torbrowser-bundle we use the profile-folder from -# https://www.torproject.org/dist/torbrowser/linux/ -TB_V="2.2.35-7.2" - -# Patch version -PATCH="${MY_PN}-10.0-patches-0.5" -# Upstream ftp release URI that's used by mozlinguas.eclass -# We don't use the http mirror because it deletes old tarballs. -MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${MY_PN}/releases/" - -inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils autotools python virtualx nsplugins - -DESCRIPTION="Torbrowser without vidalia or tor, includes profile and extensions" -HOMEPAGE="https://www.torproject.org/projects/torbrowser.html.en" - -# may work on other arches, but untested -KEYWORDS="~amd64 ~x86" -SLOT="0" -# BSD license applies to torproject-related code like the patches -# GPL-2 and MIT applies to the extensions -# icons are under CCPL-Attribution-3.0 -LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 ) - BSD - GPL-2 - MIT - CCPL-Attribution-3.0" -IUSE="bindist +crashreporter +ipc pgo selinux system-sqlite +webm" - -SRC_URI="${SRC_URI} - http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz - ${MOZ_FTP_URI}/${PV}/source/${MY_PN}-${PV}.source.tar.bz2 - https://gitweb.torproject.org/user/ioerror/torbrowser.git/blob_plain/branding:/build-scripts/branding/torbrowser/default48.png -> torbrowser.png - amd64? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-x86_64-${TB_V}-dev-en-US.tar.gz ) - x86? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-i686-${TB_V}-dev-en-US.tar.gz )" - -# Mesa 7.10 needed for WebGL + bugfixes -RDEPEND=" - >=sys-devel/binutils-2.16.1 - >=dev-libs/nss-3.13.1 - >=dev-libs/nspr-4.8.8 - >=dev-libs/glib-2.26:2 - >=media-libs/mesa-7.10 - media-libs/libpng[apng] - virtual/libffi - system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,threadsafe,unlock-notify,debug=] ) - webm? ( >=media-libs/libvpx-1.0.0 - media-libs/alsa-lib ) - crashreporter? ( net-misc/curl ) - selinux? ( sec-policy/selinux-mozilla )" -# We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason -DEPEND="${RDEPEND} - virtual/pkgconfig - pgo? ( - =dev-lang/python-2*[sqlite] - >=sys-devel/gcc-4.5 ) - webm? ( >=dev-lang/yasm-1.1 )" - -S="${WORKDIR}/mozilla-release" - -QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/${MY_PN}/firefox" - -pkg_setup() { - moz_pkgsetup - - # Avoid PGO profiling problems due to enviroment leakage - # These should *always* be cleaned up anyway - unset DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XDG_SESSION_COOKIE \ - XAUTHORITY - - if ! use bindist; then - einfo - elog "You are enabling official branding. You may not redistribute this build" - elog "to any users on your network or the internet. Doing so puts yourself into" - elog "a legal problem with Mozilla Foundation" - elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" - fi - - if use pgo; then - einfo - ewarn "You will do a double build for profile guided optimization." - ewarn "This will result in your build taking at least twice as long as before." - fi - - # Ensure we have enough disk space to compile - if use pgo || use debug || use test ; then - CHECKREQS_DISK_BUILD="8G" - else - CHECKREQS_DISK_BUILD="4G" - fi - check-reqs_pkg_setup -} - -src_prepare() { - # Apply our patches - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${WORKDIR}/firefox" - - # patch for libvpx-1.0.0 compatibility - # https://bugzilla.mozilla.org/show_bug.cgi?id=722127 - epatch "${FILESDIR}"/libvpx-1.0.0.patch - - # Torbrowser patches for firefox 10, check regularly/for every version-bump - # https://gitweb.torproject.org/torbrowser.git/history/HEAD:/src/current-patches - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${FILESDIR}/${PV}" - - # Allow user to apply any additional patches without modifing ebuild - epatch_user - - # Enable gnomebreakpad - if use debug ; then - sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ - "${S}"/build/unix/run-mozilla.sh || die "sed failed!" - fi - - # Disable gnomevfs extension - sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \ - -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \ - || die "Failed to remove gnomevfs extension" - - # Ensure that plugins dir is enabled as default - # and is different from firefox-location - sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/${PN}/${MY_PN}/plugins:" \ - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" - - # Fix sandbox violations during make clean, bug 372817 - sed -e "s:\(/no-such-file\):${T}\1:g" \ - -i "${S}"/config/rules.mk \ - -i "${S}"/js/src/config/rules.mk \ - -i "${S}"/nsprpub/configure{.in,} \ - || die - - #Fix compilation with curl-7.21.7 bug 376027 - sed -e '/#include <curl\/types.h>/d' \ - -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \ - -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \ - -i "${S}"/config/system-headers \ - -i "${S}"/js/src/config/system-headers || die "Sed failed" - - eautoreconf -} - -src_configure() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}" - MEXTENSIONS="default" - - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - mozconfig_config - - mozconfig_annotate '' --prefix="${EPREFIX}"/usr - mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN} - mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" - mozconfig_annotate '' --disable-gconf - mozconfig_annotate '' --disable-mailnews - mozconfig_annotate '' --enable-canvas - mozconfig_annotate '' --enable-safe-browsing - mozconfig_annotate '' --with-system-png - mozconfig_annotate '' --enable-system-ffi - - # Other ff-specific settings - mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} - mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" - - # Allow for a proper pgo build - if use pgo; then - echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig - fi - - # Finalize and report settings - mozconfig_final - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-cxxflags -fno-stack-protector - elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then - if use amd64 || use x86; then - append-flags -mno-avx - fi - fi -} - -src_compile() { - if use pgo; then - addpredict /root - addpredict /etc/gconf - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - # Firefox tries to use dri stuff when it's run, see bug 380283 - shopt -s nullglob - cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') - if test -n "${cards}"; then - # FOSS drivers are fine - addpredict "${cards}" - else - cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') - if test -n "${cards}"; then - # Binary drivers seem to cause access violations anyway, so - # let's use indirect rendering so that the device files aren't - # touched at all. See bug 394715. - export LIBGL_ALWAYS_INDIRECT=1 - addpredict "${cards}" - fi - fi - shopt -u nullglob - - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - Xemake -f client.mk profiledbuild || die "Xemake failed" - else - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - emake -f client.mk || die "emake failed" - fi -} - -src_install() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}" - - # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. - local obj_dir="$(echo */config.log)" - obj_dir="${obj_dir%/*}" - cd "${S}/${obj_dir}" - - # Pax mark xpcshell for hardened support, only used for startupcache creation. - pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell - - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - emake DESTDIR="${D}" install || die "emake install failed" - - # remove default symlink in /usr/bin, because we add a proper wrapper-script later - rm "${ED}"/usr/bin/${MY_PN} || die "Failed to remove binary-symlink" - # we dont want development stuff for this kind of build, might as well - # conflict with other firefox-builds - rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \ - die "Failed to remove sdk and headers" - - # Required in order to use plugins and even run firefox on hardened. - pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} - - # Plugins dir - share_plugins_dir - dodir /usr/$(get_libdir)/${PN}/nsbrowser/plugins || die - - # Install pre-configured Torbrowser-profile - insinto /usr/share/${PN} - doins -r "${WORKDIR}"/tor-browser_en-US/Data/profile || die - - # create wrapper to start torbrowser - make_wrapper ${PN} "/usr/$(get_libdir)/${PN}/${MY_PN}/${MY_PN} -no-remote -profile ~/.${PN}/profile" - - doicon "${DISTDIR}"/torbrowser.png - make_desktop_entry ${PN} "Torbrowser" torbrowser.png "Network;WebBrowser" - dodoc "${WORKDIR}"/tor-browser_en-US/Docs/changelog || die -} - -pkg_postinst() { - einfo "" - elog "Copy the folder /usr/share/${PN}/profile into ~/.${PN} and run '${PN}'." - elog "" - elog "This profile folder includes pre-configuration recommended by upstream," - elog "as well as the _extensions_ Torbutton, NoScript and HTTPS-Everywhere." - elog "If you want to start from scratch just create the directories ~/.${PN}/profile." - elog "" - elog "Note that torbrowser uses a different _plugins_ folder too:" - elog "/usr/$(get_libdir)/${PN}/nsbrowser/plugins" - einfo "" -} diff --git a/www-client/torbrowser/torbrowser-11.0.ebuild b/www-client/torbrowser/torbrowser-11.0.ebuild deleted file mode 100644 index 9e79931d0..000000000 --- a/www-client/torbrowser/torbrowser-11.0.ebuild +++ /dev/null @@ -1,285 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="3" -VIRTUALX_REQUIRED="pgo" -WANT_AUTOCONF="2.1" - -MY_PN="firefox" -# latest version of the torbrowser-bundle we use the profile-folder from -# https://www.torproject.org/dist/torbrowser/linux/ -TB_V="2.2.35-9" - -# Patch version -PATCH="${MY_PN}-11.0-patches-0.4" -# Upstream ftp release URI that's used by mozlinguas.eclass -# We don't use the http mirror because it deletes old tarballs. -MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${MY_PN}/releases/" - -inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils autotools python virtualx nsplugins - -DESCRIPTION="Torbrowser without vidalia or tor, includes profile and extensions" -HOMEPAGE="https://www.torproject.org/projects/torbrowser.html.en" - -# may work on other arches, but untested -KEYWORDS="~amd64 ~x86" -SLOT="0" -# BSD license applies to torproject-related code like the patches -# GPL-2 and MIT applies to the extensions -# icons are under CCPL-Attribution-3.0 -LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 ) - BSD - GPL-2 - MIT - CCPL-Attribution-3.0" -IUSE="bindist +crashreporter +ipc pgo selinux system-sqlite +webm" - -SRC_URI="${SRC_URI} - http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz - ${MOZ_FTP_URI}/${PV}/source/${MY_PN}-${PV}.source.tar.bz2 - https://gitweb.torproject.org/user/ioerror/torbrowser.git/blob_plain/branding:/build-scripts/branding/torbrowser/default48.png -> torbrowser.png - amd64? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-x86_64-${TB_V}-dev-en-US.tar.gz ) - x86? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-i686-${TB_V}-dev-en-US.tar.gz )" - -# Mesa 7.10 needed for WebGL + bugfixes -RDEPEND=" - >=sys-devel/binutils-2.16.1 - >=dev-libs/nss-3.13.3 - >=dev-libs/nspr-4.9 - >=dev-libs/glib-2.26:2 - >=media-libs/mesa-7.10 - media-libs/libpng[apng] - virtual/libffi - system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,threadsafe,unlock-notify,debug=] ) - webm? ( >=media-libs/libvpx-1.0.0 - media-libs/alsa-lib ) - crashreporter? ( net-misc/curl ) - selinux? ( sec-policy/selinux-mozilla )" -# We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason -DEPEND="${RDEPEND} - virtual/pkgconfig - pgo? ( - =dev-lang/python-2*[sqlite] - >=sys-devel/gcc-4.5 ) - webm? ( >=dev-lang/yasm-1.1 - virtual/opengl )" - -S="${WORKDIR}/mozilla-release" - -QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/${MY_PN}/firefox" - -pkg_setup() { - moz_pkgsetup - - # Avoid PGO profiling problems due to enviroment leakage - # These should *always* be cleaned up anyway - unset DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XDG_SESSION_COOKIE \ - XAUTHORITY - - if ! use bindist; then - einfo - elog "You are enabling official branding. You may not redistribute this build" - elog "to any users on your network or the internet. Doing so puts yourself into" - elog "a legal problem with Mozilla Foundation" - elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" - fi - - if use pgo; then - einfo - ewarn "You will do a double build for profile guided optimization." - ewarn "This will result in your build taking at least twice as long as before." - fi - - # Ensure we have enough disk space to compile - if use pgo || use debug || use test ; then - CHECKREQS_DISK_BUILD="8G" - else - CHECKREQS_DISK_BUILD="4G" - fi - check-reqs_pkg_setup -} - -src_prepare() { - # Apply our patches - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${WORKDIR}/firefox" - - # Torbrowser patches for firefox 11, check regularly/for every version-bump - # https://gitweb.torproject.org/torbrowser.git/history/HEAD:/src/current-patches - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${FILESDIR}/${PV}" - - # Allow user to apply any additional patches without modifing ebuild - epatch_user - - # Enable gnomebreakpad - if use debug ; then - sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ - "${S}"/build/unix/run-mozilla.sh || die "sed failed!" - fi - - # Disable gnomevfs extension - sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \ - -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \ - || die "Failed to remove gnomevfs extension" - - # Ensure that plugins dir is enabled as default - # and is different from firefox-location - sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/${PN}/${MY_PN}/plugins:" \ - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" - - # Fix sandbox violations during make clean, bug 372817 - sed -e "s:\(/no-such-file\):${T}\1:g" \ - -i "${S}"/config/rules.mk \ - -i "${S}"/js/src/config/rules.mk \ - -i "${S}"/nsprpub/configure{.in,} \ - || die - - #Fix compilation with curl-7.21.7 bug 376027 - sed -e '/#include <curl\/types.h>/d' \ - -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \ - -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \ - -i "${S}"/config/system-headers \ - -i "${S}"/js/src/config/system-headers || die "Sed failed" - - eautoreconf -} - -src_configure() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}" - MEXTENSIONS="default" - - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - mozconfig_config - - mozconfig_annotate '' --prefix="${EPREFIX}"/usr - mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN} - mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" - mozconfig_annotate '' --disable-gconf - mozconfig_annotate '' --disable-mailnews - mozconfig_annotate '' --enable-canvas - mozconfig_annotate '' --enable-safe-browsing - mozconfig_annotate '' --with-system-png - mozconfig_annotate '' --enable-system-ffi - - # Other ff-specific settings - mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} - mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" - - # Allow for a proper pgo build - if use pgo; then - echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig - fi - - # Finalize and report settings - mozconfig_final - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-cxxflags -fno-stack-protector - elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then - if use amd64 || use x86; then - append-flags -mno-avx - fi - fi -} - -src_compile() { - if use pgo; then - addpredict /root - addpredict /etc/gconf - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - # Firefox tries to use dri stuff when it's run, see bug 380283 - shopt -s nullglob - cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') - if test -n "${cards}"; then - # FOSS drivers are fine - addpredict "${cards}" - else - cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') - if test -n "${cards}"; then - # Binary drivers seem to cause access violations anyway, so - # let's use indirect rendering so that the device files aren't - # touched at all. See bug 394715. - export LIBGL_ALWAYS_INDIRECT=1 - addpredict "${cards}" - fi - fi - shopt -u nullglob - - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - Xemake -f client.mk profiledbuild || die "Xemake failed" - else - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - emake -f client.mk || die "emake failed" - fi -} - -src_install() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}" - - # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. - local obj_dir="$(echo */config.log)" - obj_dir="${obj_dir%/*}" - cd "${S}/${obj_dir}" - - # Pax mark xpcshell for hardened support, only used for startupcache creation. - pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell - - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - emake DESTDIR="${D}" install || die "emake install failed" - - # remove default symlink in /usr/bin, because we add a proper wrapper-script later - rm "${ED}"/usr/bin/${MY_PN} || die "Failed to remove binary-symlink" - # we dont want development stuff for this kind of build, might as well - # conflict with other firefox-builds - rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \ - die "Failed to remove sdk and headers" - - # Required in order to use plugins and even run firefox on hardened. - pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} - - # Plugins dir - share_plugins_dir - dodir /usr/$(get_libdir)/${PN}/nsbrowser/plugins || die - - # Install pre-configured Torbrowser-profile - insinto /usr/share/${PN} - doins -r "${WORKDIR}"/tor-browser_en-US/Data/profile || die - - # create wrapper to start torbrowser - make_wrapper ${PN} "/usr/$(get_libdir)/${PN}/${MY_PN}/${MY_PN} -no-remote -profile ~/.${PN}/profile" - - doicon "${DISTDIR}"/torbrowser.png - make_desktop_entry ${PN} "Torbrowser" torbrowser.png "Network;WebBrowser" - dodoc "${WORKDIR}"/tor-browser_en-US/Docs/changelog || die -} - -pkg_postinst() { - einfo "" - elog "Copy the folder /usr/share/${PN}/profile into ~/.${PN} and run '${PN}'." - elog "" - elog "This profile folder includes pre-configuration recommended by upstream," - elog "as well as the _extensions_ Torbutton, NoScript and HTTPS-Everywhere." - elog "If you want to start from scratch just create the directories ~/.${PN}/profile." - elog "" - elog "Note that torbrowser uses a different _plugins_ folder too:" - elog "/usr/$(get_libdir)/${PN}/nsbrowser/plugins" - einfo "" -} diff --git a/www-client/torbrowser/torbrowser-12.0.ebuild b/www-client/torbrowser/torbrowser-12.0.ebuild deleted file mode 100644 index 1bcbf5214..000000000 --- a/www-client/torbrowser/torbrowser-12.0.ebuild +++ /dev/null @@ -1,291 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="3" -VIRTUALX_REQUIRED="pgo" -WANT_AUTOCONF="2.1" - -MY_PN="firefox" -# latest version of the torbrowser-bundle we use the profile-folder from -# https://www.torproject.org/dist/torbrowser/linux/ -TB_V="2.2.35-10" - -# Patch version -PATCH="${MY_PN}-12.0-patches-0.1" -# Upstream ftp release URI that's used by mozlinguas.eclass -# We don't use the http mirror because it deletes old tarballs. -MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${MY_PN}/releases/" - -inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils autotools python virtualx nsplugins - -DESCRIPTION="Torbrowser without vidalia or tor, includes profile and extensions" -HOMEPAGE="https://www.torproject.org/projects/torbrowser.html.en" - -# may work on other arches, but untested -KEYWORDS="~amd64 ~x86" -SLOT="0" -# BSD license applies to torproject-related code like the patches -# GPL-2 and MIT applies to the extensions -# icons are under CCPL-Attribution-3.0 -LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 ) - BSD - GPL-2 - MIT - CCPL-Attribution-3.0" -IUSE="bindist +crashreporter +ipc pgo selinux system-sqlite +webm" - -SRC_URI="${SRC_URI} - http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz - ${MOZ_FTP_URI}/${PV}/source/${MY_PN}-${PV}.source.tar.bz2 - https://gitweb.torproject.org/user/ioerror/torbrowser.git/blob_plain/branding:/build-scripts/branding/torbrowser/default48.png -> torbrowser.png - amd64? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-x86_64-${TB_V}-dev-en-US.tar.gz ) - x86? ( https://www.torproject.org/dist/${PN}/linux/tor-browser-gnu-linux-i686-${TB_V}-dev-en-US.tar.gz )" - -ASM_DEPEND=">=dev-lang/yasm-1.1" - -# Mesa 7.10 needed for WebGL + bugfixes -RDEPEND=" - >=sys-devel/binutils-2.16.1 - >=dev-libs/nss-3.13.3 - >=dev-libs/nspr-4.9 - >=dev-libs/glib-2.26:2 - >=media-libs/mesa-7.10 - media-libs/libpng[apng] - virtual/libffi - system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,threadsafe,unlock-notify,debug=] ) - webm? ( >=media-libs/libvpx-1.0.0 - media-libs/alsa-lib ) - crashreporter? ( net-misc/curl ) - selinux? ( sec-policy/selinux-mozilla )" -# We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason -DEPEND="${RDEPEND} - virtual/pkgconfig - pgo? ( - =dev-lang/python-2*[sqlite] - >=sys-devel/gcc-4.5 ) - webm? ( x86? ( ${ASM_DEPEND} ) - amd64? ( ${ASM_DEPEND} ) - virtual/opengl )" - -S="${WORKDIR}/mozilla-release" - -QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/${MY_PN}/firefox" - -pkg_setup() { - moz_pkgsetup - - # Avoid PGO profiling problems due to enviroment leakage - # These should *always* be cleaned up anyway - unset DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XDG_SESSION_COOKIE \ - XAUTHORITY - - if ! use bindist; then - einfo - elog "You are enabling official branding. You may not redistribute this build" - elog "to any users on your network or the internet. Doing so puts yourself into" - elog "a legal problem with Mozilla Foundation" - elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" - fi - - if use pgo; then - einfo - ewarn "You will do a double build for profile guided optimization." - ewarn "This will result in your build taking at least twice as long as before." - fi - - # Ensure we have enough disk space to compile - if use pgo || use debug || use test ; then - CHECKREQS_DISK_BUILD="8G" - else - CHECKREQS_DISK_BUILD="4G" - fi - check-reqs_pkg_setup -} - -src_prepare() { - # Apply our patches - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${WORKDIR}/firefox" - - # Torbrowser patches for firefox 11, check regularly/for every version-bump - # https://gitweb.torproject.org/torbrowser.git/history/HEAD:/src/current-patches - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${FILESDIR}/${PV}" - - # Allow user to apply any additional patches without modifing ebuild - epatch_user - - # Enable gnomebreakpad - if use debug ; then - sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ - "${S}"/build/unix/run-mozilla.sh || die "sed failed!" - fi - - # Disable gnomevfs extension - sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \ - -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \ - || die "Failed to remove gnomevfs extension" - - # Ensure that plugins dir is enabled as default - # and is different from firefox-location - sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/${PN}/${MY_PN}/plugins:" \ - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" - - # Fix sandbox violations during make clean, bug 372817 - sed -e "s:\(/no-such-file\):${T}\1:g" \ - -i "${S}"/config/rules.mk \ - -i "${S}"/js/src/config/rules.mk \ - -i "${S}"/nsprpub/configure{.in,} \ - || die - - #Fix compilation with curl-7.21.7 bug 376027 - sed -e '/#include <curl\/types.h>/d' \ - -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \ - -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \ - -i "${S}"/config/system-headers \ - -i "${S}"/js/src/config/system-headers || die "Sed failed" - - eautoreconf -} - -src_configure() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}" - MEXTENSIONS="default" - - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - mozconfig_config - - mozconfig_annotate '' --prefix="${EPREFIX}"/usr - mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN} - mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" - mozconfig_annotate '' --disable-gconf - mozconfig_annotate '' --disable-mailnews - mozconfig_annotate '' --enable-canvas - mozconfig_annotate '' --enable-safe-browsing - mozconfig_annotate '' --with-system-png - mozconfig_annotate '' --enable-system-ffi - mozconfig_annotate 'Missing features' --disable-system-cairo - - # Other ff-specific settings - mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} - mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" - - mozconfig_use_enable system-sqlite - - # Allow for a proper pgo build - if use pgo; then - echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig - fi - - # Finalize and report settings - mozconfig_final - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-cxxflags -fno-stack-protector - elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then - if use amd64 || use x86; then - append-flags -mno-avx - fi - fi -} - -src_compile() { - if use pgo; then - addpredict /root - addpredict /etc/gconf - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - # Firefox tries to use dri stuff when it's run, see bug 380283 - shopt -s nullglob - cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') - if test -n "${cards}"; then - # FOSS drivers are fine - addpredict "${cards}" - else - cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') - if test -n "${cards}"; then - # Binary drivers seem to cause access violations anyway, so - # let's use indirect rendering so that the device files aren't - # touched at all. See bug 394715. - export LIBGL_ALWAYS_INDIRECT=1 - addpredict "${cards}" - fi - fi - shopt -u nullglob - - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - Xemake -f client.mk profiledbuild || die "Xemake failed" - else - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - emake -f client.mk || die "emake failed" - fi -} - -src_install() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}/${MY_PN}" - - # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. - local obj_dir="$(echo */config.log)" - obj_dir="${obj_dir%/*}" - cd "${S}/${obj_dir}" - - # Pax mark xpcshell for hardened support, only used for startupcache creation. - pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell - - MOZ_MAKE_FLAGS="${MAKEOPTS}" \ - emake DESTDIR="${D}" install || die "emake install failed" - - # remove default symlink in /usr/bin, because we add a proper wrapper-script later - rm "${ED}"/usr/bin/${MY_PN} || die "Failed to remove binary-symlink" - # we dont want development stuff for this kind of build, might as well - # conflict with other firefox-builds - rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \ - die "Failed to remove sdk and headers" - - # Required in order to use plugins and even run firefox on hardened. - pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} - - # Plugins dir - share_plugins_dir - dodir /usr/$(get_libdir)/${PN}/nsbrowser/plugins || die - - # Install pre-configured Torbrowser-profile - insinto /usr/share/${PN} - doins -r "${WORKDIR}"/tor-browser_en-US/Data/profile || die - - # create wrapper to start torbrowser - make_wrapper ${PN} "/usr/$(get_libdir)/${PN}/${MY_PN}/${MY_PN} -no-remote -profile ~/.${PN}/profile" - - doicon "${DISTDIR}"/torbrowser.png - make_desktop_entry ${PN} "Torbrowser" torbrowser.png "Network;WebBrowser" - dodoc "${WORKDIR}"/tor-browser_en-US/Docs/changelog || die -} - -pkg_postinst() { - einfo "" - elog "Copy the folder /usr/share/${PN}/profile into ~/.${PN} and run '${PN}'." - elog "" - elog "This profile folder includes pre-configuration recommended by upstream," - elog "as well as the _extensions_ Torbutton, NoScript and HTTPS-Everywhere." - elog "If you want to start from scratch just create the directories ~/.${PN}/profile." - elog "" - elog "Note that torbrowser uses a different _plugins_ folder too:" - elog "/usr/$(get_libdir)/${PN}/nsbrowser/plugins" - einfo "" -} |