[tor-commits] [tor-messenger-build/updater] Add a patch for bugzilla 1298574

2016-08-28 Thread sukhbir
commit 22893766980774cd2f22a405a978b4f70abb3075
Author: Arlo Breault 
Date:   Sun Aug 28 09:06:07 2016 -0700

Add a patch for bugzilla 1298574
---
 projects/instantbird/bug-1298574.patch | 47 ++
 projects/instantbird/config|  1 +
 2 files changed, 48 insertions(+)

diff --git a/projects/instantbird/bug-1298574.patch 
b/projects/instantbird/bug-1298574.patch
new file mode 100644
index 000..b0a4ae2
--- /dev/null
+++ b/projects/instantbird/bug-1298574.patch
@@ -0,0 +1,47 @@
+# HG changeset patch
+# User Arlo Breault 
+# Date 1472399861 25200
+#  Sun Aug 28 08:57:41 2016 -0700
+# Branch THUNDERBIRD4530_2016082513_RELBRANCH
+# Node ID 69baf6e1ea1e4c8f4ddf719bff6b542869a99a23
+# Parent  f4a50139b69d93674a2fa55b51ab843a66d3fae2
+Bug 1298574 - Set _userVCard own property when downloading vCard fails. r=aleth
+ * This prevents an infinite req / res cycle.
+
+--HG--
+extra : amend_source : fb94df25b6157ec06dcf8f57b66a484aee243a28
+
+diff --git a/chat/protocols/xmpp/xmpp.jsm b/chat/protocols/xmpp/xmpp.jsm
+--- a/chat/protocols/xmpp/xmpp.jsm
 b/chat/protocols/xmpp/xmpp.jsm
+@@ -2231,16 +2231,30 @@ var XMPPAccountPrototype = {
+ if (this._userVCard) {
+   let binval = this._userVCard.getElement(["PHOTO", "BINVAL"]);
+   if (binval && binval.children.length) {
+ binval = binval.children[0];
+ binval.text = binval.text.replace(/[^A-Za-z0-9\+\/\=]/g, "")
+  .replace(/.{74}/g, "$&\n");
+   }
+ }
++else {
++  // Downloading the vCard failed.
++  if (this.handleErrors({
++  itemNotFound: () => false,  // OK, no vCard exists yet.
++  default: () => true
++})(aStanza)) {
++this.WARN("Unexpected error retrieving the user's vcard, " +
++  "so we won't attempt to set it either.");
++return;
++  }
++  // Set this so that we don't get into an infinite loop trying to 
download
++  // the vcard again. The check in sendVCard is for hasOwnProperty.
++  this._userVCard = null;
++}
+ this._sendVCard();
+   },
+ 
+   _cachingUserIcon: false,
+   _cacheUserIcon: function() {
+ if (this._cachingUserIcon)
+   return;
+ 
diff --git a/projects/instantbird/config b/projects/instantbird/config
index a1e2098..1223804 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -69,6 +69,7 @@ input_files:
   - filename: xmppRegister.js
   - filename: xmppRegister.xul
   - filename: xmpp-gtalk-resource.patch
+  - filename: bug-1298574.patch
   - filename: trac-16489.patch
   - filename: trac-17896.patch
   - filename: trac-17494.patch



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Revert "Fix linux-i686"

2016-08-28 Thread sukhbir
commit 1b702d7895a5a95b23faed004b011d6b69c9032c
Author: Arlo Breault 
Date:   Sat Aug 27 17:13:15 2016 -0700

Revert "Fix linux-i686"

This reverts commit d170a50962b36b4b7d9c1fcd8fe063772d4944d1.
---
 projects/docker-image/config | 1 -
 1 file changed, 1 deletion(-)

diff --git a/projects/docker-image/config b/projects/docker-image/config
index 9e0c42d..8ab70f5 100644
--- a/projects/docker-image/config
+++ b/projects/docker-image/config
@@ -23,7 +23,6 @@ pre: |
   [% pc(c('origin_project'), 'var/pre_pkginst') %]
   [% END -%]
   [% IF c('lsb_release/id') == 'Ubuntu' || c('lsb_release/id') == 'Debian' %]
-  dpkg --add-architecture i386
   apt-get update -y
   apt-get upgrade -y
   [% END %]



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Update changelog

2016-08-28 Thread sukhbir
commit 9e23301abf65cc62f652990fa3509e19e38ba725
Author: Sukhbir Singh 
Date:   Sun Aug 28 23:27:35 2016 -0400

Update changelog
---
 ChangeLog | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ChangeLog b/ChangeLog
index 511334b..8260ab2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ Tor Messenger 0.1.0b7 --
  * GH 73: Show progress during verification in notification box (patch by 
Vu Quoc Huy)
  * Mac
* Bug 13861: Profile directory stored in ~/Library/Application\ Support
+   * Bug 17460: Add graphics for OS X drag and drop to Applications
 
 Tor Messenger 0.1.0b6 -- April 06, 2016
  * All Platforms

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Fix linux-i686

2016-08-28 Thread sukhbir
commit d170a50962b36b4b7d9c1fcd8fe063772d4944d1
Author: Arlo Breault 
Date:   Sat Aug 27 15:05:12 2016 -0700

Fix linux-i686
---
 projects/docker-image/config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/projects/docker-image/config b/projects/docker-image/config
index 8ab70f5..9e0c42d 100644
--- a/projects/docker-image/config
+++ b/projects/docker-image/config
@@ -23,6 +23,7 @@ pre: |
   [% pc(c('origin_project'), 'var/pre_pkginst') %]
   [% END -%]
   [% IF c('lsb_release/id') == 'Ubuntu' || c('lsb_release/id') == 'Debian' %]
+  dpkg --add-architecture i386
   apt-get update -y
   apt-get upgrade -y
   [% END %]



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] More linux-i686 fixin'

2016-08-28 Thread sukhbir
commit a26af78053453ab2165066f9c1b3966cf09d4fcb
Author: Arlo Breault 
Date:   Sat Aug 27 15:48:43 2016 -0700

More linux-i686 fixin'
---
 projects/instantbird/config   | 31 ---
 projects/tor-messenger/config |  2 +-
 rbm.conf  |  1 +
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/projects/instantbird/config b/projects/instantbird/config
index 1223804..bef6465 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -9,23 +9,12 @@ var:
   deps:
 - build-essential
 - libmpc-dev
-- libgconf2-dev
-- autotools-dev
 - autoconf2.13
 - python
 - zip
-- libgtk2.0-dev
 - libidl-dev
-- libxt-dev
-- libxml2-dev
 - uuid-runtime
 - imagemagick
-- mesa-common-dev
-- libdbus-1-dev
-- libdbus-glib-1-dev
-- libasound2-dev
-- libgstreamer-plugins-base0.10-dev
-- libpulse-dev
 - ccache
 targets:
   windows-i686:
@@ -37,6 +26,16 @@ targets:
 var:
   arch_deps:
 - yasm
+- libgconf2-dev
+- libgtk2.0-dev
+- libxml2-dev
+- mesa-common-dev
+- libdbus-1-dev
+- libdbus-glib-1-dev
+- libasound2-dev
+- libgstreamer-plugins-base0.10-dev
+- libpulse-dev
+- libxt-dev
   linux-i686:
 var:
   arch_deps:
@@ -45,6 +44,16 @@ targets:
 - lib32z1-dev
 - lib32asound2-dev
 - yasm
+- libgconf2-dev:i386
+- libgtk2.0-dev:i386
+- libxml2-dev:i386
+- mesa-common-dev:i386
+- libdbus-1-dev:i386
+- libdbus-glib-1-dev:i386
+- libasound2-dev:i386
+- libgstreamer-plugins-base0.10-dev:i386
+- libpulse-dev:i386
+- libxt-dev:i386
   osx-x86_64:
 var:
   arch_deps:
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index 19e98b6..dc0a28b 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -29,7 +29,7 @@ input_files:
   - project: docker-image
 
 remote_docker: 1
-distribution: Ubuntu-12.04
+distribution: Debian-7.11
 var:
   filename_ext: 'tar.xz'
   deps:
diff --git a/rbm.conf b/rbm.conf
index 61a5f35..f2084c5 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -41,6 +41,7 @@ targets:
   osname: linux-i686
   configure_opt: '--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 
LDFLAGS=-m32'
   compiler: gcc
+  pre_pkginst: dpkg --add-architecture i386
   windows-i686:
 distribution: Ubuntu-14.10
 arch: i686



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Add OS X drag and drop to applications (closes #17460)

2016-08-28 Thread sukhbir
commit cefe5d8dbc02ded03928118a61823ec49ba7085b
Author: Sukhbir Singh 
Date:   Sun Aug 28 22:58:43 2016 -0400

Add OS X drag and drop to applications (closes #17460)
---
 projects/tor-messenger/DS_Store| Bin 0 -> 15364 bytes
 projects/tor-messenger/VolumeIcon.icns | Bin 0 -> 124971 bytes
 projects/tor-messenger/background.png  | Bin 0 -> 8012 bytes
 projects/tor-messenger/build.osx   |   7 +++
 projects/tor-messenger/config  |   6 ++
 5 files changed, 13 insertions(+)

diff --git a/projects/tor-messenger/DS_Store b/projects/tor-messenger/DS_Store
new file mode 100644
index 000..2a2073a
Binary files /dev/null and b/projects/tor-messenger/DS_Store differ
diff --git a/projects/tor-messenger/VolumeIcon.icns 
b/projects/tor-messenger/VolumeIcon.icns
new file mode 100644
index 000..db5a495
Binary files /dev/null and b/projects/tor-messenger/VolumeIcon.icns differ
diff --git a/projects/tor-messenger/background.png 
b/projects/tor-messenger/background.png
new file mode 100644
index 000..8a938c2
Binary files /dev/null and b/projects/tor-messenger/background.png differ
diff --git a/projects/tor-messenger/build.osx b/projects/tor-messenger/build.osx
index c7f46c7..a7b261f 100755
--- a/projects/tor-messenger/build.osx
+++ b/projects/tor-messenger/build.osx
@@ -44,6 +44,13 @@ mv torbrowser/TorBrowser.app/Contents/MacOS/Tor/ 
$rootdir/TorMessenger.app/Conte
 mkdir dmg
 mv TorMessenger.app dmg
 cd dmg
+
+cp $rootdir/VolumeIcon.icns .VolumeIcon.icns
+mkdir .background
+cp $rootdir/background.png .background/
+cp $rootdir/DS_Store .DS_Store
+ln -s /Applications/ .
+
 find . -executable -exec chmod 750 {} \;
 find . ! -executable -exec chmod 640 {} \;
 find . -type f | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" > 
../filelist.txt
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index dc0a28b..225977f 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -18,6 +18,12 @@ input_files:
   - filename: start-tor-messenger
   - filename: start-tor-messenger.desktop
   - filename: execdesktop
+  - filename: background.png
+enable: '[% c("var/osx") %]'
+  - filename: DS_Store
+enable: '[% c("var/osx") %]'
+  - filename: VolumeIcon.icns
+enable: '[% c("var/osx") %]'
   - filename: tor-messenger.nsi
 enable: '[% c("var/windows") %]'
   - filename: cert_override.txt



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Add patch for setting Tor Launcher minVersion for Instantbird

2016-08-28 Thread sukhbir
commit 95a69bb47a9349d9877c8382889c658808327fba
Author: Sukhbir Singh 
Date:   Sat Aug 27 15:38:34 2016 -0400

Add patch for setting Tor Launcher minVersion for Instantbird
---
 projects/tor-launcher/build |  1 +
 projects/tor-launcher/config|  1 +
 projects/tor-launcher/min-version.patch | 13 +
 3 files changed, 15 insertions(+)

diff --git a/projects/tor-launcher/build b/projects/tor-launcher/build
index 5b11d89..ea1e533 100644
--- a/projects/tor-launcher/build
+++ b/projects/tor-launcher/build
@@ -14,5 +14,6 @@ cp ../default48.png src/chrome/skin/default48.png
 [% END -%]
 patch -p1 < ../logo.patch
 patch -p1 < ../locale-disable.patch
+patch -p1 < ../min-version.patch
 make package
 mv pkg/*.xpi [% dest_dir _ '/' _ c('filename') %]
diff --git a/projects/tor-launcher/config b/projects/tor-launcher/config
index f4dc4ee..3a4a129 100644
--- a/projects/tor-launcher/config
+++ b/projects/tor-launcher/config
@@ -11,6 +11,7 @@ input_files:
   - filename: default48.png
   - filename: logo.patch
   - filename: locale-disable.patch
+  - filename: min-version.patch
   - filename: controlport.patch
 content: '[% INCLUDE controlport.patch.tmpl -%]'
 refresh_input: 1
diff --git a/projects/tor-launcher/min-version.patch 
b/projects/tor-launcher/min-version.patch
new file mode 100644
index 000..ac58d39
--- /dev/null
+++ b/projects/tor-launcher/min-version.patch
@@ -0,0 +1,13 @@
+diff --git a/src/install.rdf b/src/install.rdf
+index 2eea493..4ce8ac8 100644
+--- a/src/install.rdf
 b/src/install.rdf
+@@ -34,7 +34,7 @@
+ 
+ 
+ {33cb9019-c295-46dd-be21-8c4936574bee}
+-1.4
++0
+ *.*.*
+ 
+ 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Remove redundant diff from updater-remove-links.mozpatch

2016-08-28 Thread sukhbir
commit 521606be0e73e589a176a2ef78674ace8df4f380
Author: Sukhbir Singh 
Date:   Fri Aug 26 22:00:39 2016 -0400

Remove redundant diff from updater-remove-links.mozpatch
---
 projects/instantbird/updater-remove-links.mozpatch | 12 
 1 file changed, 12 deletions(-)

diff --git a/projects/instantbird/updater-remove-links.mozpatch 
b/projects/instantbird/updater-remove-links.mozpatch
index 865423e..9832a3f 100644
--- a/projects/instantbird/updater-remove-links.mozpatch
+++ b/projects/instantbird/updater-remove-links.mozpatch
@@ -1,15 +1,3 @@
-diff --git a/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd 
b/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
 a/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
-+++ b/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
-@@ -34,7 +34,7 @@
- 
- 
- 
--
-+
- 
- 
 diff --git a/toolkit/mozapps/update/content/updates.js 
b/toolkit/mozapps/update/content/updates.js
 --- a/toolkit/mozapps/update/content/updates.js
 +++ b/toolkit/mozapps/update/content/updates.js



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Fix typo in preferences.patch

2016-08-28 Thread sukhbir
commit 0b77aee0b537ab25edb585e1699fd14bc4b5d18f
Author: Sukhbir Singh 
Date:   Fri Aug 26 23:15:38 2016 -0400

Fix typo in preferences.patch
---
 projects/instantbird/preferences.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projects/instantbird/preferences.patch 
b/projects/instantbird/preferences.patch
index 55d1439..b9599eb 100644
--- a/projects/instantbird/preferences.patch
+++ b/projects/instantbird/preferences.patch
@@ -50,7 +50,7 @@ diff --git a/im/app/profile/all-instantbird.js 
b/im/app/profile/all-instantbird.
  // URL user can browse to manually if for some reason all update installation
  // attempts fail.
 -pref("app.update.url.manual", "http://www.instantbird.com/download.html;);
-+pref("app.update.url.manual", "https://www.torproject.org);
++pref("app.update.url.manual", "https://www.torproject.org;);
  
  // A default value for the "More information about this update" link
  // supplied in the "An update is available" page of the update wizard.



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Update the changelog for the updater patches

2016-08-28 Thread sukhbir
commit 1a9892a438fbbd4c8296b7875b1b2acfbebc040d
Author: Arlo Breault 
Date:   Tue Aug 23 15:47:51 2016 -0700

Update the changelog for the updater patches
---
 ChangeLog | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a392187..4dc9198 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,12 +2,15 @@ Tor Messenger 0.1.0b7 --
  * All Platforms
* Use the THUNDERBIRD_45_2_0_RELEASE tag on mozilla-esr45
* Use the THUNDERBIRD_45_2_0_RELEASE tag on comm-esr45
+   * Bug 14388: Port Tor Browser's updater patches
* Bug 19053: Display plaintext in notifications
* Update libgpg-error to 1.24
* Update libgcrypt to 1.6.6 for CVE-2016-6316
* ctypes-otr
  * GH 66: Provide functionality for adding verified fingerprints (patch by 
Vu Quoc Huy)
  * GH 73: Show progress during verification in notification box (patch by 
Vu Quoc Huy)
+ * Mac
+   * Bug 13861: Profile directory stored in ~/Library/Application\ Support
 
 Tor Messenger 0.1.0b6 -- April 06, 2016
  * All Platforms



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Bump ctypes-otr to 0.0.1

2016-08-28 Thread sukhbir
commit 8624752bd2cffddf9fce3762e75fce92358f0c34
Author: Arlo Breault 
Date:   Sat Aug 20 11:19:48 2016 -0700

Bump ctypes-otr to 0.0.1

 * Use a signed tag
---
 keyring/arlolra.gpg| Bin 0 -> 75708 bytes
 projects/ctypes-otr/config |   6 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/keyring/arlolra.gpg b/keyring/arlolra.gpg
new file mode 100644
index 000..53f3c9e
Binary files /dev/null and b/keyring/arlolra.gpg differ
diff --git a/projects/ctypes-otr/config b/projects/ctypes-otr/config
index 5d7ea81..0a61b42 100644
--- a/projects/ctypes-otr/config
+++ b/projects/ctypes-otr/config
@@ -1,7 +1,9 @@
 # vim: filetype=yaml sw=2
-version: '[% c("abbrev") %]'
+version: 0.0.1
 git_url: https://github.com/arlolra/ctypes-otr
-git_hash: f5cc35a72065d56df9e1fac47cf9a247aebc787b
+git_hash: '[% c("version") %]'
+gpg_keyring: arlolra.gpg
+tag_gpg_id: 1
 filename: 'ctypes-otr-[% c("version") %]-[% c("var/osname") %]-[% 
c("var/build_id") %].tar.gz'
 var:
   lib_glob: 'lib/*.so*'



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Remove links from the about screen

2016-08-28 Thread sukhbir
commit b6af820db5d77fe5bc9c9e2f02420a8b93c7eb4f
Author: Sukhbir Singh 
Date:   Fri Aug 26 11:15:24 2016 -0400

Remove links from the about screen
---
 projects/instantbird/aboutDialog.dtd   |  8 +---
 projects/instantbird/aboutDialog.xul   | 32 
 projects/instantbird/preferences.patch |  2 +-
 3 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/projects/instantbird/aboutDialog.dtd 
b/projects/instantbird/aboutDialog.dtd
index 1562ebc..187cf5c 100644
--- a/projects/instantbird/aboutDialog.dtd
+++ b/projects/instantbird/aboutDialog.dtd
@@ -106,17 +106,19 @@
 
 
 
-
+
 
 
 
 
 
 
-
+
+https://www.torproject.org/donate;>
 
 
-
+
+https://www.torproject.org/volunteer;>
 
 
 
diff --git a/projects/instantbird/aboutDialog.xul 
b/projects/instantbird/aboutDialog.xul
index 35dfdd6..5e1f51f 100644
--- a/projects/instantbird/aboutDialog.xul
+++ b/projects/instantbird/aboutDialog.xul
@@ -116,16 +116,14 @@
 
   
   
-
-https://www.torproject.org/donate/donate.html.en;>
-  
-
-
-https://www.torproject.org/getinvolved/volunteer.html.en;>
-  
-
+   
+   
+  
+  
+   
+   
   
   
 
@@ -162,20 +160,6 @@
   
   
 
-
-  https://www.torproject.org/docs/faq.html.en;>
-
-  
-  https://www.torproject.org/getinvolved/relays;>
-
-  
-  
-
-  
-
 
   
 
diff --git a/projects/instantbird/preferences.patch 
b/projects/instantbird/preferences.patch
index f94c7ad..55d1439 100644
--- a/projects/instantbird/preferences.patch
+++ b/projects/instantbird/preferences.patch
@@ -50,7 +50,7 @@ diff --git a/im/app/profile/all-instantbird.js 
b/im/app/profile/all-instantbird.
  // URL user can browse to manually if for some reason all update installation
  // attempts fail.
 -pref("app.update.url.manual", "http://www.instantbird.com/download.html;);
-+pref("app.update.url.manual", 
"https://www.torproject.org/download/download-easy.html;);
++pref("app.update.url.manual", "https://www.torproject.org);
  
  // A default value for the "More information about this update" link
  // supplied in the "An update is available" page of the update wizard.



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Back out some of a82a7c1b

2016-08-28 Thread sukhbir
commit b5cf475df1ddbeef1fd4db91001250f504600a6c
Author: Arlo Breault 
Date:   Wed Aug 24 10:03:03 2016 -0700

Back out some of a82a7c1b

 * libgpg-error bump is breaking osx.
---
 ChangeLog| 1 -
 projects/libgpg-error/config | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4dc9198..497bb35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,6 @@ Tor Messenger 0.1.0b7 --
* Use the THUNDERBIRD_45_2_0_RELEASE tag on comm-esr45
* Bug 14388: Port Tor Browser's updater patches
* Bug 19053: Display plaintext in notifications
-   * Update libgpg-error to 1.24
* Update libgcrypt to 1.6.6 for CVE-2016-6316
* ctypes-otr
  * GH 66: Provide functionality for adding verified fingerprints (patch by 
Vu Quoc Huy)
diff --git a/projects/libgpg-error/config b/projects/libgpg-error/config
index ed98a5e..48c10be 100644
--- a/projects/libgpg-error/config
+++ b/projects/libgpg-error/config
@@ -1,6 +1,6 @@
 # vim: filetype=yaml sw=2
 filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% 
c("var/build_id") %].tar.gz'
-version: 1.24
+version: 1.20
 remote_docker: 1
 var:
   deps:



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/updater] Remove links from the updater window

2016-08-28 Thread sukhbir
commit c1a11869d136155dc74a709c34d733cdd610ad97
Author: Sukhbir Singh 
Date:   Fri Aug 26 21:59:23 2016 -0400

Remove links from the updater window
---
 projects/instantbird/config|  1 +
 projects/instantbird/updater-remove-links.mozpatch | 37 ++
 2 files changed, 38 insertions(+)

diff --git a/projects/instantbird/config b/projects/instantbird/config
index 7e3bf13..c1d2b58 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -135,6 +135,7 @@ input_files:
   - filename: Updater-Linux-search-path-bug-18900.mozpatch
   - filename: aboutTBUpdateLogo.png
   - filename: trac-16475.mozpatch
+  - filename: updater-remove-links.mozpatch
   - filename: OSX-package-as-tar.bz2.mozpatch
 enable: '[% c("var/osx") %]'
   - filename: browserMountPoints.inc
diff --git a/projects/instantbird/updater-remove-links.mozpatch 
b/projects/instantbird/updater-remove-links.mozpatch
new file mode 100644
index 000..865423e
--- /dev/null
+++ b/projects/instantbird/updater-remove-links.mozpatch
@@ -0,0 +1,37 @@
+diff --git a/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd 
b/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
+--- a/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
 b/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
+@@ -34,7 +34,7 @@
+ 
+ 
+ 
+-
++
+ 
+ 
+diff --git a/toolkit/mozapps/update/content/updates.js 
b/toolkit/mozapps/update/content/updates.js
+--- a/toolkit/mozapps/update/content/updates.js
 b/toolkit/mozapps/update/content/updates.js
+@@ -952,7 +952,7 @@
+ 
+ var updateMoreInfoURL = document.getElementById("updateMoreInfoURL");
+ if (update.detailsURL)
+-  updateMoreInfoURL.setAttribute("url", update.detailsURL);
++  updateMoreInfoURL.setAttribute("value", update.detailsURL);
+ else
+   updateMoreInfoURL.hidden = true;
+ 
+diff --git a/toolkit/mozapps/update/content/updates.xul 
b/toolkit/mozapps/update/content/updates.xul
+--- a/toolkit/mozapps/update/content/updates.xul
 b/toolkit/mozapps/update/content/updates.xul
+@@ -121,8 +121,7 @@
+   
+   
+ 
+-  
++
+ 
+   
+ 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/master] Update changelog

2016-08-28 Thread sukhbir
commit 9e23301abf65cc62f652990fa3509e19e38ba725
Author: Sukhbir Singh 
Date:   Sun Aug 28 23:27:35 2016 -0400

Update changelog
---
 ChangeLog | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ChangeLog b/ChangeLog
index 511334b..8260ab2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ Tor Messenger 0.1.0b7 --
  * GH 73: Show progress during verification in notification box (patch by 
Vu Quoc Huy)
  * Mac
* Bug 13861: Profile directory stored in ~/Library/Application\ Support
+   * Bug 17460: Add graphics for OS X drag and drop to Applications
 
 Tor Messenger 0.1.0b6 -- April 06, 2016
  * All Platforms

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/master] Add OS X drag and drop to applications (closes #17460)

2016-08-28 Thread sukhbir
commit cefe5d8dbc02ded03928118a61823ec49ba7085b
Author: Sukhbir Singh 
Date:   Sun Aug 28 22:58:43 2016 -0400

Add OS X drag and drop to applications (closes #17460)
---
 projects/tor-messenger/DS_Store| Bin 0 -> 15364 bytes
 projects/tor-messenger/VolumeIcon.icns | Bin 0 -> 124971 bytes
 projects/tor-messenger/background.png  | Bin 0 -> 8012 bytes
 projects/tor-messenger/build.osx   |   7 +++
 projects/tor-messenger/config  |   6 ++
 5 files changed, 13 insertions(+)

diff --git a/projects/tor-messenger/DS_Store b/projects/tor-messenger/DS_Store
new file mode 100644
index 000..2a2073a
Binary files /dev/null and b/projects/tor-messenger/DS_Store differ
diff --git a/projects/tor-messenger/VolumeIcon.icns 
b/projects/tor-messenger/VolumeIcon.icns
new file mode 100644
index 000..db5a495
Binary files /dev/null and b/projects/tor-messenger/VolumeIcon.icns differ
diff --git a/projects/tor-messenger/background.png 
b/projects/tor-messenger/background.png
new file mode 100644
index 000..8a938c2
Binary files /dev/null and b/projects/tor-messenger/background.png differ
diff --git a/projects/tor-messenger/build.osx b/projects/tor-messenger/build.osx
index c7f46c7..a7b261f 100755
--- a/projects/tor-messenger/build.osx
+++ b/projects/tor-messenger/build.osx
@@ -44,6 +44,13 @@ mv torbrowser/TorBrowser.app/Contents/MacOS/Tor/ 
$rootdir/TorMessenger.app/Conte
 mkdir dmg
 mv TorMessenger.app dmg
 cd dmg
+
+cp $rootdir/VolumeIcon.icns .VolumeIcon.icns
+mkdir .background
+cp $rootdir/background.png .background/
+cp $rootdir/DS_Store .DS_Store
+ln -s /Applications/ .
+
 find . -executable -exec chmod 750 {} \;
 find . ! -executable -exec chmod 640 {} \;
 find . -type f | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" > 
../filelist.txt
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index dc0a28b..225977f 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -18,6 +18,12 @@ input_files:
   - filename: start-tor-messenger
   - filename: start-tor-messenger.desktop
   - filename: execdesktop
+  - filename: background.png
+enable: '[% c("var/osx") %]'
+  - filename: DS_Store
+enable: '[% c("var/osx") %]'
+  - filename: VolumeIcon.icns
+enable: '[% c("var/osx") %]'
   - filename: tor-messenger.nsi
 enable: '[% c("var/windows") %]'
   - filename: cert_override.txt



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/master] More linux-i686 fixin'

2016-08-28 Thread arlo
commit a26af78053453ab2165066f9c1b3966cf09d4fcb
Author: Arlo Breault 
Date:   Sat Aug 27 15:48:43 2016 -0700

More linux-i686 fixin'
---
 projects/instantbird/config   | 31 ---
 projects/tor-messenger/config |  2 +-
 rbm.conf  |  1 +
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/projects/instantbird/config b/projects/instantbird/config
index 1223804..bef6465 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -9,23 +9,12 @@ var:
   deps:
 - build-essential
 - libmpc-dev
-- libgconf2-dev
-- autotools-dev
 - autoconf2.13
 - python
 - zip
-- libgtk2.0-dev
 - libidl-dev
-- libxt-dev
-- libxml2-dev
 - uuid-runtime
 - imagemagick
-- mesa-common-dev
-- libdbus-1-dev
-- libdbus-glib-1-dev
-- libasound2-dev
-- libgstreamer-plugins-base0.10-dev
-- libpulse-dev
 - ccache
 targets:
   windows-i686:
@@ -37,6 +26,16 @@ targets:
 var:
   arch_deps:
 - yasm
+- libgconf2-dev
+- libgtk2.0-dev
+- libxml2-dev
+- mesa-common-dev
+- libdbus-1-dev
+- libdbus-glib-1-dev
+- libasound2-dev
+- libgstreamer-plugins-base0.10-dev
+- libpulse-dev
+- libxt-dev
   linux-i686:
 var:
   arch_deps:
@@ -45,6 +44,16 @@ targets:
 - lib32z1-dev
 - lib32asound2-dev
 - yasm
+- libgconf2-dev:i386
+- libgtk2.0-dev:i386
+- libxml2-dev:i386
+- mesa-common-dev:i386
+- libdbus-1-dev:i386
+- libdbus-glib-1-dev:i386
+- libasound2-dev:i386
+- libgstreamer-plugins-base0.10-dev:i386
+- libpulse-dev:i386
+- libxt-dev:i386
   osx-x86_64:
 var:
   arch_deps:
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index 19e98b6..dc0a28b 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -29,7 +29,7 @@ input_files:
   - project: docker-image
 
 remote_docker: 1
-distribution: Ubuntu-12.04
+distribution: Debian-7.11
 var:
   filename_ext: 'tar.xz'
   deps:
diff --git a/rbm.conf b/rbm.conf
index 61a5f35..f2084c5 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -41,6 +41,7 @@ targets:
   osname: linux-i686
   configure_opt: '--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 
LDFLAGS=-m32'
   compiler: gcc
+  pre_pkginst: dpkg --add-architecture i386
   windows-i686:
 distribution: Ubuntu-14.10
 arch: i686

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-prefsdtd] Update translations for tor-messenger-prefsdtd

2016-08-28 Thread translation
commit f219aed5e744a8a2761176011a7cd0add8c51e63
Author: Translation commit bot 
Date:   Sun Aug 28 20:18:09 2016 +

Update translations for tor-messenger-prefsdtd
---
 pl/prefs.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pl/prefs.dtd b/pl/prefs.dtd
index acd32f5..a9b207e 100644
--- a/pl/prefs.dtd
+++ b/pl/prefs.dtd
@@ -13,10 +13,10 @@
 
 
 
-
-
+
+
 
-
+
 
 
 
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere] Update translations for https_everywhere

2016-08-28 Thread translation
commit 6e809ab0008ba9382b025c4432a7c30f6aa379a8
Author: Translation commit bot 
Date:   Sun Aug 28 20:15:20 2016 +

Update translations for https_everywhere
---
 pl/https-everywhere.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pl/https-everywhere.dtd b/pl/https-everywhere.dtd
index 2e6d0c3..dedf9c0 100644
--- a/pl/https-everywhere.dtd
+++ b/pl/https-everywhere.dtd
@@ -20,7 +20,7 @@
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere_completed] Update translations for https_everywhere_completed

2016-08-28 Thread translation
commit ed43995a15398e47ff194f27f726363c3d00b554
Author: Translation commit bot 
Date:   Sun Aug 28 20:15:28 2016 +

Update translations for https_everywhere_completed
---
 pl/https-everywhere.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pl/https-everywhere.dtd b/pl/https-everywhere.dtd
index 1cf1214..dedf9c0 100644
--- a/pl/https-everywhere.dtd
+++ b/pl/https-everywhere.dtd
@@ -20,7 +20,7 @@
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [doctor/master] Disable notice that Tonga is a authority

2016-08-28 Thread atagar
commit 10193a86c3d39795fa1541f8990e8e0d62820e19
Author: Damian Johnson 
Date:   Sun Aug 28 12:15:48 2016 -0700

Disable notice that Tonga is a authority

Oops, tried to disable notices to Tonga but inadvertantly caused...

  NOTICE: The following authorities were not expected in the consensus: 
Tonga

Disabling this part of the check until Tonga's gone.
---
 consensus_health_checker.py | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index a2859e9..7d7a354 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -603,8 +603,10 @@ def has_authority_flag(latest_consensus, consensuses, 
votes):
   if missing_authorities:
 issues.append(Issue(Runlevel.WARNING, 'MISSING_AUTHORITIES', authorities = 
', '.join(missing_authorities), to = missing_authorities))
 
-  if extra_authorities:
-issues.append(Issue(Runlevel.NOTICE, 'EXTRA_AUTHORITIES', authorities = ', 
'.join(extra_authorities), to = extra_authorities))
+  # TODO: Re-enable when Tonga is gone.
+
+  #if extra_authorities:
+  #  issues.append(Issue(Runlevel.NOTICE, 'EXTRA_AUTHORITIES', authorities = 
', '.join(extra_authorities), to = extra_authorities))
 
   return issues
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [stem/master] Remove Tonga as a directory authority

2016-08-28 Thread atagar
commit 152fa89c33114619913d2be13e67adb4e55ce7ab
Author: Damian Johnson 
Date:   Sun Aug 28 11:31:47 2016 -0700

Remove Tonga as a directory authority

Lucky has asked for DocTor notifications to cease and this is the easiest 
way
of doing so. Tonga will be replaced with Bitfroest soon as it's up...

  https://trac.torproject.org/projects/tor/ticket/19690#comment:7
---
 stem/descriptor/remote.py | 9 -
 1 file changed, 9 deletions(-)

diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py
index d16170c..f0c98f4 100644
--- a/stem/descriptor/remote.py
+++ b/stem/descriptor/remote.py
@@ -807,15 +807,6 @@ DIRECTORY_AUTHORITIES = {
 fingerprint = '7EA6EAD6FD83083C538F44038BBFA077587DD755',
 v3ident = 'E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58',
   ),
-  'Tonga': DirectoryAuthority(
-nickname = 'Tonga',
-address = '82.94.251.203',
-or_port = 443,
-dir_port = 80,
-is_bandwidth_authority = False,
-fingerprint = '4A0CCD2DDC7995083D73F5D667100C8A5831F16D',
-v3ident = None,  # does not vote in the consensus
-  ),
   'gabelmoo': DirectoryAuthority(
 nickname = 'gabelmoo',
 address = '131.188.40.189',

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] Python 3.x compatibility

2016-08-28 Thread atagar
commit ca2a38500b964dfdbd5e4645c4e0a44fcab3f059
Merge: 290f1a9 d7e9cd9
Author: Damian Johnson 
Date:   Sun Aug 28 11:27:21 2016 -0700

Python 3.x compatibility

Don't get too excited. While tests pass and I can now run nyx under python 
3.x
there's no doubt some issues I haven't uncovered yet. :P

 nyx/curses.py   |  4 +--
 nyx/panel/config.py |  4 +--
 nyx/panel/connection.py |  2 +-
 nyx/panel/graph.py  | 10 
 nyx/panel/log.py|  6 ++---
 nyx/panel/torrc.py  |  2 +-
 nyx/popups.py   | 20 +++
 test/popups.py  | 68 -
 8 files changed, 58 insertions(+), 58 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] Graph panel stacktrace due to float width

2016-08-28 Thread atagar
commit 10c791fc665ae0f640ccbb97182aacd16071b24d
Author: Damian Johnson 
Date:   Sun Aug 28 10:32:50 2016 -0700

Graph panel stacktrace due to float width

Ewww I suspect we're gonna be stumbling on these for a while. This one
manifests as...

  TypeError: slice indices must be integers or None or have an __index__ 
method
---
 nyx/panel/graph.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/panel/graph.py b/nyx/panel/graph.py
index 250c0e6..70b8b60 100644
--- a/nyx/panel/graph.py
+++ b/nyx/panel/graph.py
@@ -567,7 +567,7 @@ class GraphPanel(nyx.panel.Panel):
 
 stat = type(stat)(stat)  # clone the GraphCategory
 subgraph_height = self._graph_height + 2  # graph rows + header + x-axis 
label
-subgraph_width = min(subwindow.width / 2, 
CONFIG['features.graph.max_width'])
+subgraph_width = min(subwindow.width // 2, 
CONFIG['features.graph.max_width'])
 interval, bounds_type = self._update_interval, self._bounds_type
 
 subwindow.addstr(0, 0, stat.title(subwindow.width), HIGHLIGHT)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] torrc panel stacktraced due to filter()

2016-08-28 Thread atagar
commit d7e9cd9eea9c106ea074f6fb72e444de72d299ed
Author: Damian Johnson 
Date:   Sun Aug 28 10:35:16 2016 -0700

torrc panel stacktraced due to filter()

Anther spot where we need to standardize our use of filter(). This one
manifested as a stacktrace when viewing the torrc panel with...

  AttributeError: 'filter' object has no attribute 'strip'
---
 nyx/panel/torrc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/panel/torrc.py b/nyx/panel/torrc.py
index d5e890e..eeb08e6 100644
--- a/nyx/panel/torrc.py
+++ b/nyx/panel/torrc.py
@@ -25,7 +25,7 @@ def _read_torrc(path):
   with open(path) as torrc_file:
 for line in torrc_file.readlines():
   line = line.replace('\t', '   ').replace('\xc2', "'").rstrip()
-  contents.append(filter(lambda char: char in string.printable, line))
+  contents.append(''.join(filter(lambda char: char in string.printable, 
line)))
 
   return contents
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] Standardizing on unicode for curses.screenshot()

2016-08-28 Thread atagar
commit 14fed296185fb6e4c2e5cbf43707ef44fb0bba84
Author: Damian Johnson 
Date:   Sun Aug 28 10:02:05 2016 -0700

Standardizing on unicode for curses.screenshot()

Lowest hanging fruit for getting our tests python 3.x compatible, this 
reduces
failures as follows...

  from: FAILED (failures=53, errors=15)
  to: FAILED (failures=3, errors=15)
---
 nyx/curses.py  |  2 +-
 test/popups.py | 68 +-
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/nyx/curses.py b/nyx/curses.py
index 27cfbfc..922729c 100644
--- a/nyx/curses.py
+++ b/nyx/curses.py
@@ -479,7 +479,7 @@ def screenshot():
   for y in range(screen_size().height):
 lines.append(CURSES_SCREEN.instr(y, 0).rstrip())
 
-  return '\n'.join(lines).rstrip()
+  return stem.util.str_tools._to_unicode(b'\n'.join(lines).rstrip())
 
 
 def asci_to_curses(msg):
diff --git a/test/popups.py b/test/popups.py
index 02dc6a1..12ce3ef 100644
--- a/test/popups.py
+++ b/test/popups.py
@@ -161,6 +161,40 @@ Event 
Types:---+
 
+--+
 """.strip()
 
+EXPECTED_DESCRIPTOR_WITHOUT_FINGERPRINT = """
+Consensus Descriptor:--+
+|  No consensus data available |
++--+
+""".strip()
+
+EXPECTED_DESCRIPTOR = """
+Consensus Descriptor 
(29787760145CD1A473552A2FC64C72A9A130820E):---+
+|  1 Consensus:
|
+|  2   
|
+|  3 r cyberphunk KXh3YBRc0aRzVSovxkxyqaEwgg4 VjdJThHuYj0jDY2tkkDJkCa8s1s  
|
+|2016-04-04 19:03:16 94.23.150.191 8080 0  
|
+|  4 s Fast Guard Running Stable Valid 
|
+|  5 w Bandwidth=8410  
|
+|  6 p reject 1-65535  
|
+|  7   
|
+|  8 Server Descriptor:
|
+|  9   
|
+| 10 router cyberphunk 94.23.150.191 8080 0 0  
|
+| 11 platform Tor 0.2.4.27 on Linux
|
+| 12 protocols Link 1 2 Circuit 1  
|
+| 13 published 2016-04-04 19:03:16 
|
+| 14 fingerprint 2978 7760 145C D1A4 7355 2A2F C64C 72A9 A130 820E 
|
+| 15 uptime 3899791
|
+| 16 bandwidth 1024 10444800 6482376   
|
+| 17 extra-info-digest 9DC532664DDFD238A4119D623D30F136A3B851BF
|
+| 18 reject *:*
|
+| 19 router-signature  
|
+| 20 -BEGIN SIGNATURE- 
|
+| 21 EUFm38gONCoDuY7ZWHyJtBKuvk6Xi1MPuKuecS5frP3fX0wiZSrOVcpX0X8J+4Hr  
|
+| 22 Fb5i+yuMIAXeEn6UhtjqhhZBbY9PW9GdZOMTH8hJpG+evURyr+10PZq6UElg86rA  
|
++--+
+""".strip()
+
 TORRC = """
 ControlPort 9051
 CookieAuthentication 1
@@ -208,40 +242,6 @@ NCGI042p6+7UgCVT1x3WcLnq3ScV//s1wXHrUXa7vi0=
 -END SIGNATURE-
 """.strip().split('\n')
 
-EXPECTED_DESCRIPTOR_WITHOUT_FINGERPRINT = """
-Consensus Descriptor:--+
-|  No consensus data available |
-+--+
-""".strip()
-
-EXPECTED_DESCRIPTOR = """
-Consensus Descriptor 
(29787760145CD1A473552A2FC64C72A9A130820E):---+
-|  1 Consensus:
|
-|  2   
|
-|  3 r cyberphunk KXh3YBRc0aRzVSovxkxyqaEwgg4 VjdJThHuYj0jDY2tkkDJkCa8s1s  
|
-|2016-04-04 19:03:16 94.23.150.191 8080 0  
|
-|  4 s Fast Guard Running Stable Valid 
|
-|  5 w Bandwidth=8410  
|
-|  6 p reject 1-65535  
|
-|  7   
|
-|  8 Server Descriptor:
|
-|  9   
|
-| 10 router cyberphunk 94.23.150.191 8080 0 0  
|
-| 11 platform Tor 0.2.4.27 on Linux
|
-| 12 protocols 

[tor-commits] [nyx/master] Use items() rather than iteritems()

2016-08-28 Thread atagar
commit fd9c4549cf97e9476a4a7262f9be61e01170f76e
Author: Damian Johnson 
Date:   Sun Aug 28 10:15:14 2016 -0700

Use items() rather than iteritems()

Python 3.x dropped the iteritems() method since items() now provides an
iterator...

  AttributeError: 'dict' object has no attribute 'iteritems'
---
 nyx/popups.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nyx/popups.py b/nyx/popups.py
index e9fa1db..ecea237 100644
--- a/nyx/popups.py
+++ b/nyx/popups.py
@@ -147,13 +147,13 @@ def show_counts(title, counts, fill_char = ' '):
 subwindow.addstr(0, 0, title, HIGHLIGHT)
 
 graph_width = subwindow.width - key_width - val_width - 11  # border, 
extra spaces, and percentage column
-sorted_counts = sorted(counts.iteritems(), key = operator.itemgetter(1), 
reverse = True)
+sorted_counts = sorted(counts.items(), key = operator.itemgetter(1), 
reverse = True)
 
 for y, (k, v) in enumerate(sorted_counts):
   label = '%s %s (%-2i%%)' % (k.ljust(key_width), str(v).rjust(val_width), 
v * 100 / value_total)
   x = subwindow.addstr(2, y + 1, label, GREEN, BOLD)
 
-  for j in range(graph_width * v / value_total):
+  for j in range(graph_width * v // value_total):
 subwindow.addstr(x + j + 1, y + 1, fill_char, RED, HIGHLIGHT)
 
 subwindow.addstr(2, subwindow.height - 2, 'Press any key...')



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] Standardize on integer division

2016-08-28 Thread atagar
commit 168561c5ad3584212f8cfd993f082fbb0da4d7dd
Author: Damian Johnson 
Date:   Sun Aug 28 10:11:30 2016 -0700

Standardize on integer division

Python 3.x changes to do float division. Using '//' to explicitly do integer
division. This changes testing failures as follows...

  from: FAILED (failures=3, errors=15)
  to: FAILED (failures=8, errors=5)
---
 nyx/panel/graph.py | 8 
 nyx/popups.py  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/nyx/panel/graph.py b/nyx/panel/graph.py
index 492037e..250c0e6 100644
--- a/nyx/panel/graph.py
+++ b/nyx/panel/graph.py
@@ -648,7 +648,7 @@ def _x_axis_labels(interval, columns):
   interval_spacing = 10 if columns >= WIDE_LABELING_GRAPH_COL else 5
   previous_units, decimal_precision = None, 0
 
-  for i in range((columns - 4) / interval_spacing):
+  for i in range((columns - 4) // interval_spacing):
 x = (i + 1) * interval_spacing
 time_label = str_tools.time_label(x * interval_sec, decimal_precision)
 
@@ -676,15 +676,15 @@ def _y_axis_labels(subgraph_height, data, min_bound, 
max_bound):
 subgraph_height - 1: data.y_axis_label(min_bound),
   }
 
-  ticks = (subgraph_height - 5) / 2
+  ticks = (subgraph_height - 5) // 2
 
   for i in range(ticks):
 row = subgraph_height - (2 * i) - 5
 
-if subgraph_height % 2 == 0 and i >= (ticks / 2):
+if subgraph_height % 2 == 0 and i >= (ticks // 2):
   row -= 1  # make extra gap be in the middle when we're an even size
 
-val = (max_bound - min_bound) * (subgraph_height - row - 3) / 
(subgraph_height - 3)
+val = (max_bound - min_bound) * (subgraph_height - row - 3) // 
(subgraph_height - 3)
 
 if val not in (min_bound, max_bound):
   y_axis_labels[row + 2] = data.y_axis_label(val)
diff --git a/nyx/popups.py b/nyx/popups.py
index 8cadf05..e9fa1db 100644
--- a/nyx/popups.py
+++ b/nyx/popups.py
@@ -233,7 +233,7 @@ def show_descriptor(fingerprint, color, is_close_key):
 
   for line in lines:
 width = min(screen_size.width, max(width, len(line) + line_number_width + 
5))
-height += len(line) / (screen_size.width - line_number_width - 5)  # extra 
lines due to text wrap
+height += len(line) // (screen_size.width - line_number_width - 5)  # 
extra lines due to text wrap
 
   with nyx.curses.CURSES_LOCK:
 nyx.curses.draw(lambda subwindow: subwindow.addstr(0, 0, ' ' * 500), top = 
_top(), height = 1)  # hides title below us
@@ -454,7 +454,7 @@ def select_event_types(initial_selection):
 
   with nyx.curses.CURSES_LOCK:
 while True:
-  nyx.curses.draw(_render, top = _top(), width = 80, height = (len(events) 
/ 3) + 10)
+  nyx.curses.draw(_render, top = _top(), width = 80, height = (len(events) 
// 3) + 10)
   key = nyx.curses.key_input()
 
   if key.match('up'):



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] Float division in popups

2016-08-28 Thread atagar
commit 94428d5841c1a6bc79220846142b5253b49dab04
Author: Damian Johnson 
Date:   Sun Aug 28 10:28:54 2016 -0700

Float division in popups

Oops, there was more float division in our popups.py, causing assertion
failures rather than errors. With this our tests now pass under python 3.x!
---
 nyx/popups.py | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/nyx/popups.py b/nyx/popups.py
index ecea237..ee4910c 100644
--- a/nyx/popups.py
+++ b/nyx/popups.py
@@ -67,7 +67,7 @@ def show_help():
 subwindow.addstr(0, 0, 'Page %i Commands:' % (control.get_page() + 1), 
HIGHLIGHT)
 
 for i, option in enumerate(handlers):
-  if i / 2 >= subwindow.height - 2:
+  if i // 2 >= subwindow.height - 2:
 break
 
   # Entries are shown in the form ': [ ()]',
@@ -76,7 +76,7 @@ def show_help():
   #   u: duplicate log entries (hidden)
 
   x = 2 if i % 2 == 0 else 41
-  y = (i / 2) + 1
+  y = (i // 2) + 1
 
   x = subwindow.addstr(x, y, option.key, BOLD)
   x = subwindow.addstr(x, y, ': ' + option.description)
@@ -150,7 +150,7 @@ def show_counts(title, counts, fill_char = ' '):
 sorted_counts = sorted(counts.items(), key = operator.itemgetter(1), 
reverse = True)
 
 for y, (k, v) in enumerate(sorted_counts):
-  label = '%s %s (%-2i%%)' % (k.ljust(key_width), str(v).rjust(val_width), 
v * 100 / value_total)
+  label = '%s %s (%-2i%%)' % (k.ljust(key_width), str(v).rjust(val_width), 
v * 100 // value_total)
   x = subwindow.addstr(2, y + 1, label, GREEN, BOLD)
 
   for j in range(graph_width * v // value_total):
@@ -358,7 +358,7 @@ def select_sort_order(title, options, previous_order, 
option_colors):
 
 for i, option in enumerate(shown_options):
   attr = HIGHLIGHT if i == cursor_index else NORMAL
-  subwindow.addstr((i % 4) * 19 + 2, (i / 4) + 4, option, attr)
+  subwindow.addstr((i % 4) * 19 + 2, (i // 4) + 4, option, attr)
 
   with nyx.curses.CURSES_LOCK:
 while len(new_order) < len(previous_order):
@@ -442,8 +442,8 @@ def select_event_types(initial_selection):
 subwindow._addch(79, 6, curses.ACS_RTEE)
 
 for i, event in enumerate(events):
-  x = subwindow.addstr((i % 3) * 25 + 1, i / 3 + 7, '[X]' if event in 
selected_events else '[ ]')
-  x = subwindow.addstr(x + 1, i / 3 + 7, event, HIGHLIGHT if selection == 
(i + 10) else NORMAL)
+  x = subwindow.addstr((i % 3) * 25 + 1, i // 3 + 7, '[X]' if event in 
selected_events else '[ ]')
+  x = subwindow.addstr(x + 1, i // 3 + 7, event, HIGHLIGHT if selection == 
(i + 10) else NORMAL)
 
 x = subwindow.width - 14
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] filter() provides an iterater rather than a list

2016-08-28 Thread atagar
commit de061785bed2a92fff2f82e30ce73ef6050df09b
Author: Damian Johnson 
Date:   Sun Aug 28 10:19:06 2016 -0700

filter() provides an iterater rather than a list

Standardizing most of our filter() calls to provide us a list...

  AttributeError: 'filter' object has no attribute 'append'
---
 nyx/curses.py   | 2 +-
 nyx/panel/config.py | 2 +-
 nyx/panel/log.py| 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/nyx/curses.py b/nyx/curses.py
index 922729c..d6176f9 100644
--- a/nyx/curses.py
+++ b/nyx/curses.py
@@ -511,7 +511,7 @@ def asci_to_curses(msg):
   continue
 elif attr in Color:
   # replace previous color with new one
-  combined_attr = filter(lambda attr: attr not in Color, combined_attr)
+  combined_attr = list(filter(lambda attr: attr not in Color, 
combined_attr))
 
 combined_attr.append(attr)
 
diff --git a/nyx/panel/config.py b/nyx/panel/config.py
index 424586c..3a4a67b 100644
--- a/nyx/panel/config.py
+++ b/nyx/panel/config.py
@@ -294,7 +294,7 @@ class ConfigPanel(nyx.panel.Panel):
 break
 
   def _get_config_options(self):
-return self._contents if self._show_all else filter(lambda entry: 
stem.manual.is_important(entry.name) or entry.is_set(), self._contents)
+return self._contents if self._show_all else list(filter(lambda entry: 
stem.manual.is_important(entry.name) or entry.is_set(), self._contents))
 
 
 def _draw_line(subwindow, x, y, entry, is_selected, value_width, 
description_width):
diff --git a/nyx/panel/log.py b/nyx/panel/log.py
index ec9e238..af793aa 100644
--- a/nyx/panel/log.py
+++ b/nyx/panel/log.py
@@ -72,7 +72,7 @@ class LogPanel(nyx.panel.DaemonPanel):
 
 logged_events = CONFIG['startup.events'].split(',')
 tor_events = tor_controller().get_info('events/names', '').split()
-invalid_events = filter(lambda event: not event.startswith('NYX_') and 
event not in tor_events, logged_events)
+invalid_events = list(filter(lambda event: not event.startswith('NYX_') 
and event not in tor_events, logged_events))
 
 if invalid_events:
   logged_events = ['NOTICE', 'WARN', 'ERR', 'NYX_NOTICE', 'NYX_WARNING', 
'NYX_ERROR']
@@ -270,8 +270,8 @@ class LogPanel(nyx.panel.DaemonPanel):
 show_duplicates = self._show_duplicates
 
 event_log = self._event_log_paused if nyx_controller.is_paused() else 
self._event_log
-event_log = filter(lambda entry: 
event_filter.match(entry.display_message), event_log)
-event_log = filter(lambda entry: not entry.is_duplicate or 
show_duplicates, event_log)
+event_log = list(filter(lambda entry: 
event_filter.match(entry.display_message), event_log))
+event_log = list(filter(lambda entry: not entry.is_duplicate or 
show_duplicates, event_log))
 
 is_scrollbar_visible = last_content_height > subwindow.height - 1
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [nyx/master] Unable to index into dict keys/values

2016-08-28 Thread atagar
commit a272168174e2dc2c57b2a027c02ebf87276aa660
Author: Damian Johnson 
Date:   Sun Aug 28 10:22:08 2016 -0700

Unable to index into dict keys/values

The dict's keys() and values() methods provide iterators which we can't 
index
into...

  TypeError: 'dict_values' object does not support indexing
---
 nyx/panel/config.py | 2 +-
 nyx/panel/connection.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nyx/panel/config.py b/nyx/panel/config.py
index 3a4a67b..d67afae 100644
--- a/nyx/panel/config.py
+++ b/nyx/panel/config.py
@@ -58,7 +58,7 @@ class ConfigEntry(object):
 self.name = name
 self.value_type = value_type
 self.manual = manual.config_options.get(name, 
stem.manual.ConfigOption(name))
-self._index = manual.config_options.keys().index(name) if name in 
manual.config_options else 9
+self._index = list(manual.config_options.keys()).index(name) if name in 
manual.config_options else 9
 
   def value(self):
 """
diff --git a/nyx/panel/connection.py b/nyx/panel/connection.py
index d30742f..16175d9 100644
--- a/nyx/panel/connection.py
+++ b/nyx/panel/connection.py
@@ -598,7 +598,7 @@ def _draw_details(subwindow, selected):
   subwindow.addstr(2, 3, 'No consensus data found', *attr)
 elif len(matches) == 1 or selected.connection.remote_port in matches:
   controller = tor_controller()
-  fingerprint = matches.values()[0] if len(matches) == 1 else 
matches[selected.connection.remote_port]
+  fingerprint = list(matches.values())[0] if len(matches) == 1 else 
matches[selected.connection.remote_port]
   router_status_entry = controller.get_network_status(fingerprint, None)
 
   subwindow.addstr(15, 2, 'fingerprint: %s' % fingerprint, *attr)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/torbutton-torbuttonproperties] Update translations for torbutton-torbuttonproperties

2016-08-28 Thread translation
commit 4c365858018dcb86db24d661031d67d05b7e47c8
Author: Translation commit bot 
Date:   Sun Aug 28 17:16:30 2016 +

Update translations for torbutton-torbuttonproperties
---
 lt/torbutton.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lt/torbutton.properties b/lt/torbutton.properties
index 7ab7f61..318ea84 100644
--- a/lt/torbutton.properties
+++ b/lt/torbutton.properties
@@ -11,7 +11,7 @@ torbutton.panel.tooltip.enabled = Paspauskite kad atjungti Tor
 torbutton.panel.label.disabled = Tor atjungtas
 torbutton.panel.label.enabled = Tor įgalintas
 extensions.torbut...@torproject.org.description = Torbutton provides a button 
to configure Tor settings and quickly and easily clear private browsing data.
-torbutton.popup.external.title = Download an external file type?
+torbutton.popup.external.title = Atsisiųsti išorinį failo tipą?
 torbutton.popup.external.app = Tor Browser negali atverti Å¡io failo. Juma 
teks atverti jį, naudojant kitą programą.\n\n
 torbutton.popup.external.note = Kai kurie failų tipai, gali priversti 
programas prisijungti prie interneto ne per Tor.\n\n
 torbutton.popup.external.suggest = Saugumo sumetimais, parsisiųstus failus 
derėtų atverti, atsijungus nuo interneto arba naudojant Tor Live CD tokį 
kaip Tails.\n
@@ -25,7 +25,7 @@ torbutton.popup.prompt_torbrowser = Torbutton works 
differently now: you can't t
 torbutton.popup.short_torbrowser = Important Torbutton 
Information!\n\nTorbutton is now always enabled.\n\nClick on the Torbutton for 
more information.
 
 torbutton.popup.confirm_plugins = Plugins such as Flash can harm your privacy 
and anonymity.\n\nThey can also bypass Tor to reveal your current location and 
IP address.\n\nAre you sure you want to enable plugins?\n\n
-torbutton.popup.never_ask_again = Never ask me again
+torbutton.popup.never_ask_again = Daugiau nebeklausti
 torbutton.popup.confirm_newnym = Tor Browser will close all windows and tabs. 
All website sessions will be lost.\n\nRestart Tor Browser now to reset your 
identity?\n\n
 
 torbutton.slider_notification = The green onion menu now has a security slider 
which lets you adjust your security level. Check it out!

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-prefsdtd] Update translations for tor-messenger-prefsdtd

2016-08-28 Thread translation
commit 9204493902bc5bae4d248844c9d7c935a44c93fc
Author: Translation commit bot 
Date:   Sun Aug 28 16:18:04 2016 +

Update translations for tor-messenger-prefsdtd
---
 pt/prefs.dtd | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pt/prefs.dtd b/pt/prefs.dtd
index 9e64e21..3f374a7 100644
--- a/pt/prefs.dtd
+++ b/pt/prefs.dtd
@@ -14,9 +14,9 @@
 
 
 
-
-
-
-
+
+
+
+
 
 
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-messenger-build/master] Add a patch for bugzilla 1298574

2016-08-28 Thread arlo
commit 22893766980774cd2f22a405a978b4f70abb3075
Author: Arlo Breault 
Date:   Sun Aug 28 09:06:07 2016 -0700

Add a patch for bugzilla 1298574
---
 projects/instantbird/bug-1298574.patch | 47 ++
 projects/instantbird/config|  1 +
 2 files changed, 48 insertions(+)

diff --git a/projects/instantbird/bug-1298574.patch 
b/projects/instantbird/bug-1298574.patch
new file mode 100644
index 000..b0a4ae2
--- /dev/null
+++ b/projects/instantbird/bug-1298574.patch
@@ -0,0 +1,47 @@
+# HG changeset patch
+# User Arlo Breault 
+# Date 1472399861 25200
+#  Sun Aug 28 08:57:41 2016 -0700
+# Branch THUNDERBIRD4530_2016082513_RELBRANCH
+# Node ID 69baf6e1ea1e4c8f4ddf719bff6b542869a99a23
+# Parent  f4a50139b69d93674a2fa55b51ab843a66d3fae2
+Bug 1298574 - Set _userVCard own property when downloading vCard fails. r=aleth
+ * This prevents an infinite req / res cycle.
+
+--HG--
+extra : amend_source : fb94df25b6157ec06dcf8f57b66a484aee243a28
+
+diff --git a/chat/protocols/xmpp/xmpp.jsm b/chat/protocols/xmpp/xmpp.jsm
+--- a/chat/protocols/xmpp/xmpp.jsm
 b/chat/protocols/xmpp/xmpp.jsm
+@@ -2231,16 +2231,30 @@ var XMPPAccountPrototype = {
+ if (this._userVCard) {
+   let binval = this._userVCard.getElement(["PHOTO", "BINVAL"]);
+   if (binval && binval.children.length) {
+ binval = binval.children[0];
+ binval.text = binval.text.replace(/[^A-Za-z0-9\+\/\=]/g, "")
+  .replace(/.{74}/g, "$&\n");
+   }
+ }
++else {
++  // Downloading the vCard failed.
++  if (this.handleErrors({
++  itemNotFound: () => false,  // OK, no vCard exists yet.
++  default: () => true
++})(aStanza)) {
++this.WARN("Unexpected error retrieving the user's vcard, " +
++  "so we won't attempt to set it either.");
++return;
++  }
++  // Set this so that we don't get into an infinite loop trying to 
download
++  // the vcard again. The check in sendVCard is for hasOwnProperty.
++  this._userVCard = null;
++}
+ this._sendVCard();
+   },
+ 
+   _cachingUserIcon: false,
+   _cacheUserIcon: function() {
+ if (this._cachingUserIcon)
+   return;
+ 
diff --git a/projects/instantbird/config b/projects/instantbird/config
index a1e2098..1223804 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -69,6 +69,7 @@ input_files:
   - filename: xmppRegister.js
   - filename: xmppRegister.xul
   - filename: xmpp-gtalk-resource.patch
+  - filename: bug-1298574.patch
   - filename: trac-16489.patch
   - filename: trac-17896.patch
   - filename: trac-17494.patch

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-tasks/master] Tweak code for web logs analysis (#20008).

2016-08-28 Thread karsten
commit f4f909d227732fe3ba14da17436e3fc3065f70f4
Author: Karsten Loesing 
Date:   Sun Aug 28 14:38:02 2016 +0200

Tweak code for web logs analysis (#20008).
---
 task-20008/run.sh   | 2 +-
 task-20008/webstats.sql | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/task-20008/run.sh b/task-20008/run.sh
index 4039ee6..883b0c3 100755
--- a/task-20008/run.sh
+++ b/task-20008/run.sh
@@ -3,6 +3,6 @@ date
 rm -rf bin
 mkdir -p bin/
 javac -d bin/ -cp 
lib/commons-compress-1.9.jar:lib/postgresql-jdbc3-9.2.jar:lib/xz-1.5.jar 
src/Importer.java
-java -cp 
bin:lib/commons-compress-1.9.jar:lib/postgresql-jdbc3-9.2.jar:lib/xz-1.5.jar 
Importer webstats.torproject.org >> log
+java -cp 
bin:lib/commons-compress-1.9.jar:lib/postgresql-jdbc3-9.2.jar:lib/xz-1.5.jar 
Importer webstats.torproject.org >> log 2>&1
 date
 
diff --git a/task-20008/webstats.sql b/task-20008/webstats.sql
index 91a36b6..079397d 100644
--- a/task-20008/webstats.sql
+++ b/task-20008/webstats.sql
@@ -17,9 +17,9 @@ CREATE TABLE resources (
 );
 
 CREATE TABLE requests (
-  file_id integer REFERENCES files (file_id),
+  file_id integer REFERENCES files (file_id) NOT NULL,
   method method NOT NULL,
-  resource_id integer REFERENCES resources (resource_id),
+  resource_id integer REFERENCES resources (resource_id) NOT NULL,
   response_code smallint NOT NULL,
   count integer NOT NULL,
   total_bytes_sent bigint NOT NULL,

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-tasks/master] Add code for web logs analysis (#20008).

2016-08-28 Thread karsten
commit ff63b91cdb0383b4c02ac6c82912a02e195c8b25
Author: Karsten Loesing 
Date:   Sun Aug 28 14:19:35 2016 +0200

Add code for web logs analysis (#20008).
---
 task-20008/.gitignore|   9 ++
 task-20008/LICENSE   |  30 ++
 task-20008/README.md |  46 ++
 task-20008/run.sh|   8 ++
 task-20008/src/Importer.java | 211 +++
 task-20008/webstats.sql  |  28 ++
 6 files changed, 332 insertions(+)

diff --git a/task-20008/.gitignore b/task-20008/.gitignore
new file mode 100644
index 000..fb5bbfa
--- /dev/null
+++ b/task-20008/.gitignore
@@ -0,0 +1,9 @@
+/.classpath
+/.project
+/.vagrant/
+/Vagrantfile
+/bin/
+/lib/
+/log
+/webstats.torproject.org/
+
diff --git a/task-20008/LICENSE b/task-20008/LICENSE
new file mode 100644
index 000..9dbb66d
--- /dev/null
+++ b/task-20008/LICENSE
@@ -0,0 +1,30 @@
+Copyright 2016 The Tor Project
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the following disclaimer
+  in the documentation and/or other materials provided with the
+  distribution.
+
+* Neither the names of the copyright owners nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/task-20008/README.md b/task-20008/README.md
new file mode 100644
index 000..5f7e254
--- /dev/null
+++ b/task-20008/README.md
@@ -0,0 +1,46 @@
+README: Perform an ad-hoc analysis of Tor's sanitized web logs
+==
+
+Sanitized versions of Tor's Apache web logs are available at
+https://webstats.torproject.org/.  Let's perform an ad-hoc analysis of
+these logs to decide what graphs we'll want to put on Tor Metrics.  And
+let's perform this analysis by throwing everything into a PostgreSQL
+database that we might later want to re-use for Tor Metrics.  
+
+Steps to import sanitized web logs into the database:
+
+Create PostgreSQL database user webstats and database of same name:
+
+$ sudo -u postgres createuser -P webstats
+$ sudo -u postgres createdb -O webstats webstats
+
+Import database schema:
+
+$ psql -f webstats.sql webstats
+
+Fetch sanitized web logs and put them under webstats.torproject.org/:
+
+$ wget --recursive --reject "index.html*" --no-parent \
+  --accept "*201608*" https://webstats.torproject.org/
+
+Fetch the following required libraries and put them in the lib/
+folder:
+
+ - lib/commons-compress-1.9.jar
+ - lib/postgresql-jdbc3-9.2.jar
+ - lib/xz-1.5.jar
+
+Run the importer:
+
+$ ./run.sh
+
+Log into database and run a simple query:
+
+$ psql webstats
+
+webstats=> SELECT log_date, SUM(count) AS hits FROM requests
+  NATURAL JOIN resources NATURAL JOIN files
+  WHERE method = 'GET' AND response_code = 200
+  AND (resource_string = '/' OR resource_string LIKE '/index%')
+  AND site = 'www.torproject.org' GROUP BY log_date ORDER BY log_date;
+
diff --git a/task-20008/run.sh b/task-20008/run.sh
new file mode 100755
index 000..4039ee6
--- /dev/null
+++ b/task-20008/run.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+date
+rm -rf bin
+mkdir -p bin/
+javac -d bin/ -cp 
lib/commons-compress-1.9.jar:lib/postgresql-jdbc3-9.2.jar:lib/xz-1.5.jar 
src/Importer.java
+java -cp 
bin:lib/commons-compress-1.9.jar:lib/postgresql-jdbc3-9.2.jar:lib/xz-1.5.jar 
Importer webstats.torproject.org >> log
+date
+
diff --git a/task-20008/src/Importer.java b/task-20008/src/Importer.java
new file mode 100644
index 000..6834bf0
--- /dev/null
+++ b/task-20008/src/Importer.java
@@ -0,0 +1,211 @@
+/* Copyright 2016 The Tor Project
+ * See LICENSE for licensing information */
+
+import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;