[tor-commits] [translation/bridgedb] https://gitweb.torproject.org/translation.git/commit/?h=bridgedb

2019-09-11 Thread translation
commit dbc7205053b65e05133c2966433e9c31037c8d79
Author: Translation commit bot 
Date:   Thu Sep 12 05:45:18 2019 +

https://gitweb.torproject.org/translation.git/commit/?h=bridgedb
---
 ml/LC_MESSAGES/bridgedb.po | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/ml/LC_MESSAGES/bridgedb.po b/ml/LC_MESSAGES/bridgedb.po
index 92ed7048f..ac8336bce 100644
--- a/ml/LC_MESSAGES/bridgedb.po
+++ b/ml/LC_MESSAGES/bridgedb.po
@@ -3,17 +3,19 @@
 # This file is distributed under the same license as the BridgeDB project.
 # 
 # Translators:
+# Translators:
 # Abhishek C , 2018
+# ameer pb , 2019
 # Christy K Kurian , 2018
 # NITHIN , 2018
 # Salman Faris , 2015
 msgid ""
 msgstr ""
-"Project-Id-Version: The Tor Project\n"
+"Project-Id-Version: Tor Project\n"
 "Report-Msgid-Bugs-To: 
'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB=bridgedb-reported,msgid=isis,sysrqb=isis'\n"
 "POT-Creation-Date: 2015-07-25 03:40+\n"
-"PO-Revision-Date: 2018-09-05 02:47+\n"
-"Last-Translator: Abhishek C \n"
+"PO-Revision-Date: 2019-09-12 05:44+\n"
+"Last-Translator: ameer pb \n"
 "Language-Team: Malayalam 
(http://www.transifex.com/otf/torproject/language/ml/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -72,7 +74,7 @@ msgstr "നിങ്ങളുടെ പാലം 
ലൈനുകൾ വേണ്
 #: bridgedb/https/templates/bridges.html:67
 #: bridgedb/https/templates/bridges.html:125
 msgid "Uh oh, spaghettios!"
-msgstr ""
+msgstr "പരിഹരിക്കുന്നതിലും അ
തീതമായി "
 
 #: bridgedb/https/templates/bridges.html:68
 msgid "It seems there was an error getting your QRCode."
@@ -93,7 +95,7 @@ msgstr "തൽസമയം ഒരു 
ബ്രിഡ്ജും ലഭ്യമ
 msgid ""
 " Perhaps you should try %s going back %s and choosing a different bridge "
 "type!"
-msgstr ""
+msgstr "ചിലപ്പോൾ താങ്കൾ ഒരു 
ശതമാനം 1%s പുറകിലേക്കു പോയി 1%s 
മറ്റൊരു ബ്രിഡ്ജ് 
സ്വീകരിക്കുക "
 
 #: bridgedb/https/templates/index.html:11
 #, python-format
@@ -113,7 +115,7 @@ msgstr "സ്റ്റെപ് %s2%s"
 #: bridgedb/https/templates/index.html:27
 #, python-format
 msgid "Get %s bridges %s"
-msgstr ""
+msgstr "ഒരു ശതമാനം %s ബ്രിഡ്ജ് 
സ്വീകരിക്കുക %s"
 
 #: bridgedb/https/templates/index.html:36
 #, python-format
@@ -123,7 +125,7 @@ msgstr "സ്റ്റെപ് %s3%s"
 #: bridgedb/https/templates/index.html:38
 #, python-format
 msgid "Now %s add the bridges to Tor Browser %s"
-msgstr ""
+msgstr "ഇനി ഒരു ശതമാനം %s ബ്രിഡ്ജ് 
ടോർ ബ്രൗസേറി ലേക് 
കൂട്ടിച്ചേർക്കുക %s"
 
 #. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
 #. beginning of words are present in your final translation. Thanks!
@@ -132,7 +134,7 @@ msgstr ""
 #: bridgedb/https/templates/options.html:38
 #, python-format
 msgid "%sJ%sust give me bridges!"
-msgstr ""
+msgstr "%s ബ്രിഡ്ജുകൾ തരുക %s "
 
 #: bridgedb/https/templates/options.html:51
 msgid "Advanced Options"
@@ -152,7 +154,7 @@ msgstr "ഒന്നുമില്ല"
 #: bridgedb/https/templates/options.html:124
 #, python-format
 msgid "%sY%ses!"
-msgstr ""
+msgstr "%s ശെരി  %s "
 
 #. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
 #. beginning of words are present in your final translation. Thanks!
@@ -160,7 +162,7 @@ msgstr ""
 #: bridgedb/https/templates/options.html:147
 #, python-format
 msgid "%sG%set Bridges"
-msgstr ""
+msgstr "%s ബ്രിഡ്ജുകൾ എടുക്കുക %s "
 
 #: bridgedb/strings.py:43
 msgid "[This is an automated message; please do not reply.]"
@@ -168,24 +170,24 @@ msgstr "[ഇത് ഒരു സ്വയം 
നിർമിത സന്ദേ
 
 #: bridgedb/strings.py:45
 msgid "Here are your bridges:"
-msgstr ""
+msgstr "ഇതാണ് താങ്കളുടെ 
ബ്രിഡ്ജുകൾ "
 
 #: bridgedb/strings.py:47
 #, python-format
 msgid ""
 "You have exceeded the rate limit. Please slow down! The minimum time 
between\n"
 "emails is %s hours. All further emails during this time period will be 
ignored."
-msgstr ""
+msgstr "നിങ്ങളുടെ കണക്കാക്കുന്ന 
പരിധി അ
തിക്രമിച്ചിരിക്കുന്നു. 
ദയവായി വേഗം കുറക്കുക !  ഇമെയിൽ 
ലഭിക്കുന്നതിനുള്ള കുറഞ്ഞ 
സമയം മണിക്കൂറുകളാണ് %s . ഈ 
സമയത്തെ വിശേഷിച്ച ഇമെയിലുകൾ 
അവഗണിക്കുന്നതാണ് "
 
 #: 

[tor-commits] [translation/tpo-web] https://gitweb.torproject.org/translation.git/commit/?h=tpo-web

2019-09-11 Thread translation
commit 2c5690b3cb3590b8ab5326fccdbe77436aed7e8d
Author: Translation commit bot 
Date:   Wed Sep 11 22:52:49 2019 +

https://gitweb.torproject.org/translation.git/commit/?h=tpo-web
---
 contents+nl.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contents+nl.po b/contents+nl.po
index 4bdce5311..6dd76d875 100644
--- a/contents+nl.po
+++ b/contents+nl.po
@@ -237,12 +237,12 @@ msgstr "Download Tor-broncode"
 #: https//www.torproject.org/about/cy-pres/
 #: (content/about/cy-pres/contents+en.lrpage.title)
 msgid "Cy Pres Awards"
-msgstr ""
+msgstr "Cy-près-prijzen"
 
 #: https//www.torproject.org/about/cy-pres/
 #: (content/about/cy-pres/contents+en.lrpage.body)
 msgid "### Cy Pres Awards – Consumer Privacy and Privacy Online"
-msgstr ""
+msgstr "### Cy-près-prijzen – Consumentprivacy en privacy on-line"
 
 #: https//www.torproject.org/about/cy-pres/
 #: (content/about/cy-pres/contents+en.lrpage.body)

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


[tor-commits] [bridgedb/master] Bump version number to 0.8.1.

2019-09-11 Thread phw
commit b55c8ca6b265b4b27bf3ebca88ee6f7e3bdfe14e
Author: Philipp Winter 
Date:   Wed Sep 11 14:05:55 2019 -0700

Bump version number to 0.8.1.
---
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index a8413eb..db92cb3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Changes in version 0.8.1 -
+Changes in version 0.8.1 - 2019-09-11
 
 * FIXES https://bugs.torproject.org/17626
 BridgeDB gets confused when users reply to a "get help" email.  The



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


[tor-commits] [bridgedb/master] Merge branch 'release-0.8.1'

2019-09-11 Thread phw
commit 5ab8ca22678cd65bb99399e7f55fa3ed577f4c10
Merge: bbf1bdc b55c8ca
Author: Philipp Winter 
Date:   Wed Sep 11 14:06:16 2019 -0700

Merge branch 'release-0.8.1'

 CHANGELOG   | 14 ++
 bridgedb/distributors/email/request.py  | 21 +++--
 bridgedb/distributors/https/templates/base.html |  7 ++-
 bridgedb/strings.py |  9 +
 4 files changed, 32 insertions(+), 19 deletions(-)

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


[tor-commits] [bridgedb/develop] Merge branch 'release-0.8.1' into develop

2019-09-11 Thread phw
commit 2e180b9277e440189b2301126891098ba4f12caa
Merge: 8a2f182 b55c8ca
Author: Philipp Winter 
Date:   Wed Sep 11 14:08:47 2019 -0700

Merge branch 'release-0.8.1' into develop

 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [bridgedb/develop] Merge branch 'fix/28533' into develop

2019-09-11 Thread phw
commit 8a2f182beb9213e5d6b5e3d97b7514957ac1f027
Merge: a65b843 55d248b
Author: Philipp Winter 
Date:   Wed Sep 11 13:58:17 2019 -0700

Merge branch 'fix/28533' into develop

 CHANGELOG   | 5 +
 bridgedb/distributors/https/templates/base.html | 7 ++-
 bridgedb/strings.py | 9 +
 3 files changed, 8 insertions(+), 13 deletions(-)



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


[tor-commits] [bridgedb/develop] Bump version number to 0.8.1.

2019-09-11 Thread phw
commit b55c8ca6b265b4b27bf3ebca88ee6f7e3bdfe14e
Author: Philipp Winter 
Date:   Wed Sep 11 14:05:55 2019 -0700

Bump version number to 0.8.1.
---
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index a8413eb..db92cb3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Changes in version 0.8.1 -
+Changes in version 0.8.1 - 2019-09-11
 
 * FIXES https://bugs.torproject.org/17626
 BridgeDB gets confused when users reply to a "get help" email.  The



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


[tor-commits] [bridgedb/master] Merge branch 'fix/17626' into develop

2019-09-11 Thread phw
commit a65b843dd18d812996035b84952d46ac3dc388de
Merge: d67abc7 4a05867
Author: Philipp Winter 
Date:   Mon Aug 26 14:46:38 2019 -0700

Merge branch 'fix/17626' into develop

 CHANGELOG  |  9 +
 bridgedb/distributors/email/request.py | 21 +++--
 2 files changed, 24 insertions(+), 6 deletions(-)



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


[tor-commits] [bridgedb/master] Don't interpret quoted text as commands.

2019-09-11 Thread phw
commit 4a0586767f08a3b4ee83b7805fd3cfcf531c245d
Author: Philipp Winter 
Date:   Mon Aug 19 17:05:52 2019 -0700

Don't interpret quoted text as commands.

BridgeDB gets confused when users reply to a "get help" email.  The
issue is that BridgeDB interprets commands anywhere in the email body,
even if it's in quoted text.

To fix this issue, we are ignoring commands whose email body line starts
with a '>' character, which is typically used for email quotes.

This fixes .
---
 CHANGELOG  |  9 +
 bridgedb/distributors/email/request.py | 21 +++--
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index aba6d19..c3073ef 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,12 @@
+Changes in version 0.8.1 -
+
+* FIXES https://bugs.torproject.org/17626
+BridgeDB gets confused when users reply to a "get help" email.  The
+issue is that BridgeDB interprets commands anywhere in the email body,
+even if it's in quoted text.  To fix this issue, we are ignoring
+commands whose email body line starts with a '>' character, which is
+typically used for email quotes.
+
 Changes in version 0.8.0 - 2019-08-20
 
 * FIXES https://bugs.torproject.org/9316
diff --git a/bridgedb/distributors/email/request.py 
b/bridgedb/distributors/email/request.py
index a490e56..83c203d 100644
--- a/bridgedb/distributors/email/request.py
+++ b/bridgedb/distributors/email/request.py
@@ -58,6 +58,15 @@ TRANSPORT_PATTERN = re.compile(TRANSPORT_REGEXP)
 UNBLOCKED_REGEXP = ".*unblocked ([a-z]{2,4})"
 UNBLOCKED_PATTERN = re.compile(UNBLOCKED_REGEXP)
 
+#: Regular expressions that we use to match for email commands.  Any command is
+#: valid as long as it wasn't quoted, i.e., the line didn't start with a '>'
+#: character.
+HELP_LINE  = re.compile("([^>].*)?h[ae]lp")
+GET_LINE   = re.compile("([^>].*)?get")
+KEY_LINE   = re.compile("([^>].*)?key")
+IPV6_LINE  = re.compile("([^>].*)?ipv6")
+TRANSPORT_LINE = re.compile("([^>].*)?transport")
+UNBLOCKED_LINE = re.compile("([^>].*)?unblocked")
 
 def determineBridgeRequestOptions(lines):
 """Figure out which :mod:`~bridgedb.filters` to apply, or offer help.
@@ -83,20 +92,20 @@ def determineBridgeRequestOptions(lines):
 if not line: skippedHeaders = True
 if not skippedHeaders: continue
 
-if ("help" in line) or ("halp" in line):
+if HELP_LINE.match(line) is not None:
 raise EmailRequestedHelp("Client requested help.")
 
-if "get" in line:
+if GET_LINE.match(line) is not None:
 request.isValid(True)
 logging.debug("Email request was valid.")
-if "key" in line:
+if KEY_LINE.match(line) is not None:
 request.wantsKey(True)
 raise EmailRequestedKey("Email requested a copy of our GnuPG key.")
-if "ipv6" in line:
+if IPV6_LINE.match(line) is not None:
 request.withIPv6()
-if "transport" in line:
+if TRANSPORT_LINE.match(line) is not None:
 request.withPluggableTransportType(line)
-if "unblocked" in line:
+if UNBLOCKED_LINE.match(line) is not None:
 request.withoutBlockInCountry(line)
 
 logging.debug("Generating hashring filters for request.")



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


[tor-commits] [bridgedb/develop] Remove frontdesk email link.

2019-09-11 Thread phw
commit 55d248ba8bdc0563b5e3fab36ca9b7c6069c6e16
Author: Philipp Winter 
Date:   Wed Sep 4 11:06:14 2019 -0700

Remove frontdesk email link.

The frontdesk is seeing plenty of empty bogus emails.  Let's remove the
email links and instead encourage users to take a look at the Tor
Browser Manual and at our Support Portal.

This fixes .
---
 CHANGELOG   | 5 +
 bridgedb/distributors/https/templates/base.html | 7 ++-
 bridgedb/strings.py | 9 +
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index c3073ef..a8413eb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,11 @@ Changes in version 0.8.1 -
 commands whose email body line starts with a '>' character, which is
 typically used for email quotes.
 
+* FIXES https://bugs.torproject.org/28533
+The frontdesk is seeing plenty of empty bogus emails.  This fix removes
+the email links and instead encourages users to take a look at the Tor
+Browser Manual and at our Support Portal.
+
 Changes in version 0.8.0 - 2019-08-20
 
 * FIXES https://bugs.torproject.org/9316
diff --git a/bridgedb/distributors/https/templates/base.html 
b/bridgedb/distributors/https/templates/base.html
index d7b6045..423b43c 100644
--- a/bridgedb/distributors/https/templates/base.html
+++ b/bridgedb/distributors/https/templates/base.html
@@ -66,8 +66,8 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
 ${_(strings.HELP[0])}
 
   ${_(strings.HELP[1]) % \
- ("""mailto:frontd...@torproject.org;>frontd...@torproject.org""")}
-  ${_(strings.HELP[2])}
+ ("""https://tb-manual.torproject.org/circumvention/;>Tor Browser 
Manual""",
+  """https://support.torproject.org/#censorship;>Support Portal""")}
 
   
  
@@ -84,9 +84,6 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
 https://gitweb.torproject.org/bridgedb.git/tree/CHANGELOG;>
   ${_("Changelog")}
   
-mailto:frontd...@torproject.org;>
-  ${_("Contact")}
-  
 ${_("Public Keys")}
   
   
diff --git a/bridgedb/strings.py b/bridgedb/strings.py
index 569f339..2a83751 100644
--- a/bridgedb/strings.py
+++ b/bridgedb/strings.py
@@ -114,14 +114,7 @@ send the email using an address from one of the following 
email providers:
 HELP = {
 0: _("My bridges don't work! I need help!"),
 # TRANSLATORS: Please DO NOT translate "Tor".
-1: _("""If your Tor doesn't work, you should email %s."""),
-# TRANSLATORS: Please DO NOT translate "Pluggable Transports".
-# TRANSLATORS: Please DO NOT translate "Tor Browser".
-# TRANSLATORS: Please DO NOT translate "Tor".
-2: _("""\
-Try including as much info about your case as you can, including the list of
-bridges and Pluggable Transports you tried to use, your Tor Browser version,
-and any messages which Tor gave out, etc."""),
+1: _("""If your Tor cannot connect, please take a look at the %s and our 
%s."""),
 }
 
 BRIDGES = {



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


[tor-commits] [bridgedb/master] Remove frontdesk email link.

2019-09-11 Thread phw
commit 55d248ba8bdc0563b5e3fab36ca9b7c6069c6e16
Author: Philipp Winter 
Date:   Wed Sep 4 11:06:14 2019 -0700

Remove frontdesk email link.

The frontdesk is seeing plenty of empty bogus emails.  Let's remove the
email links and instead encourage users to take a look at the Tor
Browser Manual and at our Support Portal.

This fixes .
---
 CHANGELOG   | 5 +
 bridgedb/distributors/https/templates/base.html | 7 ++-
 bridgedb/strings.py | 9 +
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index c3073ef..a8413eb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,11 @@ Changes in version 0.8.1 -
 commands whose email body line starts with a '>' character, which is
 typically used for email quotes.
 
+* FIXES https://bugs.torproject.org/28533
+The frontdesk is seeing plenty of empty bogus emails.  This fix removes
+the email links and instead encourages users to take a look at the Tor
+Browser Manual and at our Support Portal.
+
 Changes in version 0.8.0 - 2019-08-20
 
 * FIXES https://bugs.torproject.org/9316
diff --git a/bridgedb/distributors/https/templates/base.html 
b/bridgedb/distributors/https/templates/base.html
index d7b6045..423b43c 100644
--- a/bridgedb/distributors/https/templates/base.html
+++ b/bridgedb/distributors/https/templates/base.html
@@ -66,8 +66,8 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
 ${_(strings.HELP[0])}
 
   ${_(strings.HELP[1]) % \
- ("""mailto:frontd...@torproject.org;>frontd...@torproject.org""")}
-  ${_(strings.HELP[2])}
+ ("""https://tb-manual.torproject.org/circumvention/;>Tor Browser 
Manual""",
+  """https://support.torproject.org/#censorship;>Support Portal""")}
 
   
  
@@ -84,9 +84,6 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
 https://gitweb.torproject.org/bridgedb.git/tree/CHANGELOG;>
   ${_("Changelog")}
   
-mailto:frontd...@torproject.org;>
-  ${_("Contact")}
-  
 ${_("Public Keys")}
   
   
diff --git a/bridgedb/strings.py b/bridgedb/strings.py
index 569f339..2a83751 100644
--- a/bridgedb/strings.py
+++ b/bridgedb/strings.py
@@ -114,14 +114,7 @@ send the email using an address from one of the following 
email providers:
 HELP = {
 0: _("My bridges don't work! I need help!"),
 # TRANSLATORS: Please DO NOT translate "Tor".
-1: _("""If your Tor doesn't work, you should email %s."""),
-# TRANSLATORS: Please DO NOT translate "Pluggable Transports".
-# TRANSLATORS: Please DO NOT translate "Tor Browser".
-# TRANSLATORS: Please DO NOT translate "Tor".
-2: _("""\
-Try including as much info about your case as you can, including the list of
-bridges and Pluggable Transports you tried to use, your Tor Browser version,
-and any messages which Tor gave out, etc."""),
+1: _("""If your Tor cannot connect, please take a look at the %s and our 
%s."""),
 }
 
 BRIDGES = {



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


[tor-commits] [bridgedb/master] Merge branch 'master' into develop

2019-09-11 Thread phw
commit d67abc72951e4448275778da58e6d445cb6cd0ef
Merge: 8291822 bbf1bdc
Author: Philipp Winter 
Date:   Tue Aug 20 09:51:44 2019 -0700

Merge branch 'master' into develop

 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



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


[tor-commits] [bridgedb/master] Merge branch 'fix/28533' into develop

2019-09-11 Thread phw
commit 8a2f182beb9213e5d6b5e3d97b7514957ac1f027
Merge: a65b843 55d248b
Author: Philipp Winter 
Date:   Wed Sep 11 13:58:17 2019 -0700

Merge branch 'fix/28533' into develop

 CHANGELOG   | 5 +
 bridgedb/distributors/https/templates/base.html | 7 ++-
 bridgedb/strings.py | 9 +
 3 files changed, 8 insertions(+), 13 deletions(-)



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


[tor-commits] [tor-browser-build/master] Add missing Changelog item for 9.0a6

2019-09-11 Thread gk
commit e82857e90d8bbbf963d5060b6ea4922625162136
Author: Georg Koppen 
Date:   Wed Sep 11 17:33:22 2019 +

Add missing Changelog item for 9.0a6
---
 projects/tor-browser/Bundle-Data/Docs/ChangeLog.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/projects/tor-browser/Bundle-Data/Docs/ChangeLog.txt 
b/projects/tor-browser/Bundle-Data/Docs/ChangeLog.txt
index f97cb65..2ecd3d1 100644
--- a/projects/tor-browser/Bundle-Data/Docs/ChangeLog.txt
+++ b/projects/tor-browser/Bundle-Data/Docs/ChangeLog.txt
@@ -51,6 +51,7 @@ Tor Browser 9.0a6 -- September 4 2019
* Backport fix for bug 1572844 to fix broken build
  * OS X
* Bug 29818: Adapt #13379 patch for 68esr
+   * Bug 31464: meek and moat are broken on macOS 10.9 with Go 1.12
* Bug 31403: Bump snowflake commit to cd650fa009
  * Linux
* Bug 31403: Bump snowflake commit to cd650fa009

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


[tor-commits] [metrics-lib/master] Bump version to 2.7.0-dev.

2019-09-11 Thread karsten
commit 7e396f01ef6de4cb3cd7e2b7fc977b4af7b97e7f
Author: Karsten Loesing 
Date:   Wed Sep 11 16:08:16 2019 +0200

Bump version to 2.7.0-dev.
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 04f79fd..02ccf52 100644
--- a/build.xml
+++ b/build.xml
@@ -7,7 +7,7 @@
 
 
-  
+  
   
   
   

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


[tor-commits] [metrics-lib/release] Add new SnowflakeStats descriptor type.

2019-09-11 Thread karsten
commit dc946fe1c8b50386f60f29a5073046eb2c0b27ad
Author: Karsten Loesing 
Date:   Tue Aug 13 15:01:45 2019 +0200

Add new SnowflakeStats descriptor type.

Implements #29461.
---
 CHANGELOG.md   |   1 +
 .../org/torproject/descriptor/SnowflakeStats.java  |  86 ++
 .../descriptor/impl/DescriptorParserImpl.java  |   5 +
 .../java/org/torproject/descriptor/impl/Key.java   |   6 +
 .../torproject/descriptor/impl/ParseHelper.java|  21 +++
 .../descriptor/impl/SnowflakeStatsImpl.java| 185 +
 .../org/torproject/descriptor/DescriptorTest.java  |   7 +-
 .../descriptor/impl/SnowflakeStatsImplTest.java| 137 +++
 src/test/resources/snowflake/example_metrics.log   |  12 ++
 9 files changed, 459 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index b804ceb..2fdc45b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@
  versions resolved by Ivy are the same as in Debian stretch with
  few exceptions.
- Remove Cobertura from the build process.
+   - Add new SnowflakeStats descriptor type.
 
 
 # Changes in version 2.6.2 - 2019-05-29
diff --git a/src/main/java/org/torproject/descriptor/SnowflakeStats.java 
b/src/main/java/org/torproject/descriptor/SnowflakeStats.java
new file mode 100644
index 000..379a0f7
--- /dev/null
+++ b/src/main/java/org/torproject/descriptor/SnowflakeStats.java
@@ -0,0 +1,86 @@
+/* Copyright 2019 The Tor Project
+ * See LICENSE for licensing information */
+
+package org.torproject.descriptor;
+
+import java.time.Duration;
+import java.time.LocalDateTime;
+import java.util.Optional;
+import java.util.SortedMap;
+
+/**
+ * Contain aggregated information about snowflake proxies and snowflake 
clients.
+ *
+ * @since 2.7.0
+ */
+public interface SnowflakeStats extends Descriptor {
+
+  /**
+   * Return the end of the included measurement interval.
+   *
+   * @return End of the included measurement interval.
+   * @since 2.7.0
+   */
+  LocalDateTime snowflakeStatsEnd();
+
+  /**
+   * Return the length of the included measurement interval.
+   *
+   * @return Length of the included measurement interval.
+   * @since 2.7.0
+   */
+  Duration snowflakeStatsIntervalLength();
+
+  /**
+   * Return a list of mappings from two-letter country codes to the number of
+   * unique IP addresses of snowflake proxies that have polled.
+   *
+   * @return List of mappings from two-letter country codes to the number of
+   * unique IP addresses of snowflake proxies that have polled.
+   * @since 2.7.0
+   */
+  Optional> snowflakeIps();
+
+  /**
+   * Return a count of the total number of unique IP addresses of snowflake
+   * proxies that have polled.
+   *
+   * @return Count of the total number of unique IP addresses of snowflake
+   * proxies that have polled.
+   * @since 2.7.0
+   */
+  Optional snowflakeIpsTotal();
+
+  /**
+   * Return a count of the number of times a proxy has polled but received no
+   * client offer, rounded up to the nearest multiple of 8.
+   *
+   * @return Count of the number of times a proxy has polled but received no
+   * client offer, rounded up to the nearest multiple of 8.
+   * @since 2.7.0
+   */
+  Optional snowflakeIdleCount();
+
+  /**
+   * Return a count of the number of times a client has requested a proxy from
+   * the broker but no proxies were available, rounded up to the nearest
+   * multiple of 8.
+   *
+   * @return Count of the number of times a client has requested a proxy from
+   * the broker but no proxies were available, rounded up to the nearest
+   * multiple of 8.
+   * @since 2.7.0
+   */
+  Optional clientDeniedCount();
+
+  /**
+   * Return a count of the number of times a client successfully received a
+   * proxy from the broker, rounded up to the nearest multiple of 8.
+   *
+   * @return Count of the number of times a client successfully received a 
proxy
+   * from the broker, rounded up to the nearest multiple of 8.
+   * @since 2.7.0
+   */
+  Optional clientSnowflakeMatchCount();
+}
+
diff --git 
a/src/main/java/org/torproject/descriptor/impl/DescriptorParserImpl.java 
b/src/main/java/org/torproject/descriptor/impl/DescriptorParserImpl.java
index ef9da56..9b620cb 100644
--- a/src/main/java/org/torproject/descriptor/impl/DescriptorParserImpl.java
+++ b/src/main/java/org/torproject/descriptor/impl/DescriptorParserImpl.java
@@ -130,6 +130,11 @@ public class DescriptorParserImpl implements 
DescriptorParser {
 } else if (firstLines.startsWith("@type torperf 1.")) {
   return TorperfResultImpl.parseTorperfResults(rawDescriptorBytes,
   sourceFile);
+} else if (firstLines.startsWith("@type snowflake-stats 1.")
+|| firstLines.startsWith(Key.SNOWFLAKE_STATS_END.keyword + SP)
+|| firstLines.contains(NL + Key.SNOWFLAKE_STATS_END.keyword + SP)) {
+  return this.parseOneOrMoreDescriptors(rawDescriptorBytes, sourceFile,
+  

[tor-commits] [metrics-lib/release] Prepare for 2.7.0 release.

2019-09-11 Thread karsten
commit 0520779255dc44d30a69a25f24f5a638ae870a6e
Author: Karsten Loesing 
Date:   Fri Sep 6 08:53:14 2019 +0200

Prepare for 2.7.0 release.
---
 CHANGELOG.md | 2 +-
 build.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2fdc45b..457533e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# Changes in version 2.7.0 - 2019-0?-??
+# Changes in version 2.7.0 - 2019-09-06
 
  * Medium changes
- Use Ivy for resolving external dependencies rather than relying
diff --git a/build.xml b/build.xml
index f319cf0..04f79fd 100644
--- a/build.xml
+++ b/build.xml
@@ -7,7 +7,7 @@
 
 
-  
+  
   
   
   

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


[tor-commits] [metrics-lib/release] Upgrade to latest metrics-base.

2019-09-11 Thread karsten
commit aa686c4b492badec430abdc0b674c283e0ed6d39
Author: Karsten Loesing 
Date:   Wed Jul 24 19:25:19 2019 +0200

Upgrade to latest metrics-base.

Also include change log entries.
---
 CHANGELOG.md | 16 
 src/build|  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18d250e..66a626a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,19 @@
+# Changes in version 2.7.0 - 2019-0?-??
+
+ * Medium changes
+   * Update build-time and run-time dependencies to versions found in
+ Debian buster, including: commons-codec-1.11.jar,
+ commons-compress-1.18.jar, jackson-annotations-2.9.8.jar,
+ jackson-core-2.9.8.jar, jackson-databind-2.9.8.jar,
+ logback-core-1.2.3.jar, logback-classic-1.2.3.jar,
+ slf4j-api-1.7.25.jar, and xz-1.8.jar.
+   * Update Checkstyle dependencies to versions found in Debian
+ buster, including: antlr-2.7.7.jar, antlr4-runtime-4.7.2.jar,
+ checkstyle-8.15.jar, commons-beanutils-1.9.3.jar,
+ commons-collections3-3.2.2.jar, commons-logging-1.2.jar,
+ guava-19.0.jar, java-atk-wrapper.jar, and picocli-3.9.2.jar.
+
+
 # Changes in version 2.6.2 - 2019-05-29
 
  * Medium changes
diff --git a/src/build b/src/build
index e12ba96..42ee1fc 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit e12ba96aa0708b20375cf7cf5d20dfa19940d18a
+Subproject commit 42ee1fc086b0e86cddf56475124a547465484321



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


[tor-commits] [metrics-lib/release] Fix leaking resource in TorperfResultImpl.java

2019-09-11 Thread karsten
commit 114f548674d8586453577f2a16ad6b39b1714118
Author: fava 
Date:   Thu Aug 29 06:52:16 2019 +

Fix leaking resource in TorperfResultImpl.java

Fix leaking resource in TorperfResultImpl.java using
try-with-resource statement.
This fix is related to analysis on metrics-lib using sonarqube
Implements part of #30544

Signed-off-by: fava 
---
 .../descriptor/impl/TorperfResultImpl.java | 45 --
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git 
a/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java 
b/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java
index 4eb00ac..83e9491 100644
--- a/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java
+++ b/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java
@@ -30,28 +30,31 @@ public class TorperfResultImpl extends DescriptorImpl
 List parsedDescriptors = new ArrayList<>();
 String descriptorString = new String(rawDescriptorBytes,
 StandardCharsets.UTF_8);
-Scanner scanner = new Scanner(descriptorString).useDelimiter("\r?\n");
-String typeAnnotation = "";
-while (scanner.hasNext()) {
-  String line = scanner.next();
-  if (line.startsWith("@type torperf ")) {
-String[] parts = line.split(" ");
-if (parts.length != 3) {
-  throw new DescriptorParseException("Illegal line '" + line
-  + "'.");
-}
-String version = parts[2];
-if (!version.startsWith("1.")) {
-  throw new DescriptorParseException("Unsupported version in "
-  + " line '" + line + "'.");
+try (Scanner scanner =
+ new Scanner(descriptorString).useDelimiter("\r?\n")) {
+  String typeAnnotation = "";
+  while (scanner.hasNext()) {
+String line = scanner.next();
+if (line.startsWith("@type torperf ")) {
+  String[] parts = line.split(" ");
+  if (parts.length != 3) {
+throw new DescriptorParseException("Illegal line '" + line
++ "'.");
+  }
+  String version = parts[2];
+  if (!version.startsWith("1.")) {
+throw new DescriptorParseException("Unsupported version in "
++ " line '" + line + "'.");
+  }
+  typeAnnotation = line + "\n";
+} else {
+  /* XXX21932 */
+  parsedDescriptors.add(new TorperfResultImpl(
+  (typeAnnotation + line + "\n")
+  .getBytes(StandardCharsets.UTF_8),
+  descriptorFile));
+  typeAnnotation = "";
 }
-typeAnnotation = line + "\n";
-  } else {
-/* XXX21932 */
-parsedDescriptors.add(new TorperfResultImpl(
-(typeAnnotation + line + "\n").getBytes(StandardCharsets.UTF_8),
-descriptorFile));
-typeAnnotation = "";
   }
 }
 return parsedDescriptors;



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


[tor-commits] [metrics-lib/release] Add change log entry for Cobertura deps.

2019-09-11 Thread karsten
commit 4ffa637c56d676dc2c0ceeec48556110aee2050a
Author: Karsten Loesing 
Date:   Wed Jul 24 19:56:39 2019 +0200

Add change log entry for Cobertura deps.
---
 CHANGELOG.md | 4 
 1 file changed, 4 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66a626a..e3622e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,10 @@
  checkstyle-8.15.jar, commons-beanutils-1.9.3.jar,
  commons-collections3-3.2.2.jar, commons-logging-1.2.jar,
  guava-19.0.jar, java-atk-wrapper.jar, and picocli-3.9.2.jar.
+   * Update Cobertura dependencies to versions found in Debian buster,
+ including: asm4-5.0.4.jar, asm4-util-5.0.4.jar,
+ asm4-tree-5.0.4.jar, asm4-commons-5.0.4.jar,
+ asm4-analysis-5.0.4.jar, and commons-lang3-3.8.jar
 
 
 # Changes in version 2.6.2 - 2019-05-29



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


[tor-commits] [metrics-lib/release] Fix leaking resource in DescriptorReaderImpl.java

2019-09-11 Thread karsten
commit ce19c16543b410cedf3216ba477537d28cc3c818
Author: fava 
Date:   Thu Aug 22 05:28:44 2019 +

Fix leaking resource in DescriptorReaderImpl.java

Fix leaking resource in DescriptorReaderImpl.java using
try-with-resource statement.
This fix is related to analysis on metrics-lib using sonarqube
Implements part of #30544
---
 .../descriptor/impl/DescriptorReaderImpl.java  | 70 --
 1 file changed, 37 insertions(+), 33 deletions(-)

diff --git 
a/src/main/java/org/torproject/descriptor/impl/DescriptorReaderImpl.java 
b/src/main/java/org/torproject/descriptor/impl/DescriptorReaderImpl.java
index b8eb191..90ef2c6 100644
--- a/src/main/java/org/torproject/descriptor/impl/DescriptorReaderImpl.java
+++ b/src/main/java/org/torproject/descriptor/impl/DescriptorReaderImpl.java
@@ -281,41 +281,45 @@ public class DescriptorReaderImpl implements 
DescriptorReader {
 }
 
 private void readTarball(File file) throws IOException {
-  FileInputStream in = new FileInputStream(file);
-  if (in.available() <= 0) {
-return;
-  }
-  TarArchiveInputStream tais;
-  if (file.getName().endsWith(".tar.bz2")) {
-tais = new TarArchiveInputStream(new BZip2CompressorInputStream(in));
-  } else if (file.getName().endsWith(".tar.xz")) {
-tais = new TarArchiveInputStream(new XZCompressorInputStream(in));
-  } else if (file.getName().endsWith(".tar")) {
-tais = new TarArchiveInputStream(in);
-  } else {
-return;
-  }
-  BufferedInputStream bis = new BufferedInputStream(tais);
-  TarArchiveEntry tae;
-  while ((tae = tais.getNextTarEntry()) != null) {
-if (tae.isDirectory()) {
-  continue;
+  try (FileInputStream in = new FileInputStream(file)) {
+if (in.available() <= 0) {
+  return;
 }
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
-int len;
-byte[] data = new byte[1024];
-while ((len = bis.read(data, 0, 1024)) >= 0) {
-  baos.write(data, 0, len);
+TarArchiveInputStream tais;
+if (file.getName().endsWith(".tar.bz2")) {
+  tais = new TarArchiveInputStream(new BZip2CompressorInputStream(in));
+} else if (file.getName().endsWith(".tar.xz")) {
+  tais = new TarArchiveInputStream(new XZCompressorInputStream(in));
+} else if (file.getName().endsWith(".tar")) {
+  tais = new TarArchiveInputStream(in);
+} else {
+  return;
 }
-byte[] rawDescriptorBytes = baos.toByteArray();
-if (rawDescriptorBytes.length < 1) {
-  continue;
-}
-String fileName = tae.getName().substring(
-tae.getName().lastIndexOf("/") + 1);
-for (Descriptor descriptor : this.descriptorParser.parseDescriptors(
-rawDescriptorBytes, file, fileName)) {
-  this.descriptorQueue.add(descriptor);
+try (BufferedInputStream bis = new BufferedInputStream(tais)) {
+  TarArchiveEntry tae;
+  while ((tae = tais.getNextTarEntry()) != null) {
+if (tae.isDirectory()) {
+  continue;
+}
+try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+  int len;
+  byte[] data = new byte[1024];
+  while ((len = bis.read(data, 0, 1024)) >= 0) {
+baos.write(data, 0, len);
+  }
+  byte[] rawDescriptorBytes = baos.toByteArray();
+  if (rawDescriptorBytes.length < 1) {
+continue;
+  }
+  String fileName = tae.getName().substring(
+  tae.getName().lastIndexOf("/") + 1);
+  for (Descriptor descriptor :
+  this.descriptorParser.parseDescriptors(
+  rawDescriptorBytes, file, fileName)) {
+this.descriptorQueue.add(descriptor);
+  }
+}
+  }
 }
   }
 }



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


[tor-commits] [metrics-lib/release] Fix leaking resource in ExitListEntryImpl.java

2019-09-11 Thread karsten
commit 9fc82fafb32dcc39ebf6780822ecbc06d5f952e5
Author: fava 
Date:   Thu Aug 22 05:41:03 2019 +

Fix leaking resource in ExitListEntryImpl.java

Fix leaking resource in ExitListEntryImpl.java using
try-with-resource statement.
This fix is related to analysis on metrics-lib using sonarqube
Implements part of #30544
---
 .../descriptor/impl/ExitListEntryImpl.java | 51 +++---
 1 file changed, 26 insertions(+), 25 deletions(-)

diff --git 
a/src/main/java/org/torproject/descriptor/impl/ExitListEntryImpl.java 
b/src/main/java/org/torproject/descriptor/impl/ExitListEntryImpl.java
index 5389ce3..ba203e2 100644
--- a/src/main/java/org/torproject/descriptor/impl/ExitListEntryImpl.java
+++ b/src/main/java/org/torproject/descriptor/impl/ExitListEntryImpl.java
@@ -62,31 +62,32 @@ public class ExitListEntryImpl implements ExitList.Entry {
   }
 
   private void parseExitListEntry()
-  throws DescriptorParseException {
-Scanner scanner = new Scanner(this.exitListEntryString)
-.useDelimiter(ExitList.EOL);
-while (scanner.hasNext()) {
-  String line = scanner.next();
-  String[] parts = line.split(" ");
-  String keyword = parts[0];
-  switch (keyword) {
-case "ExitNode":
-  this.parseExitNodeLine(line, parts);
-  break;
-case "Published":
-  this.parsePublishedLine(line, parts);
-  break;
-case "LastStatus":
-  this.parseLastStatusLine(line, parts);
-  break;
-case "ExitAddress":
-  this.parseExitAddressLine(line, parts);
-  break;
-default:
-  if (this.unrecognizedLines == null) {
-this.unrecognizedLines = new ArrayList<>();
-  }
-  this.unrecognizedLines.add(line);
+  throws DescriptorParseException {
+try (Scanner scanner = new Scanner(this.exitListEntryString)
+.useDelimiter(ExitList.EOL)) {
+  while (scanner.hasNext()) {
+String line = scanner.next();
+String[] parts = line.split(" ");
+String keyword = parts[0];
+switch (keyword) {
+  case "ExitNode":
+this.parseExitNodeLine(line, parts);
+break;
+  case "Published":
+this.parsePublishedLine(line, parts);
+break;
+  case "LastStatus":
+this.parseLastStatusLine(line, parts);
+break;
+  case "ExitAddress":
+this.parseExitAddressLine(line, parts);
+break;
+  default:
+if (this.unrecognizedLines == null) {
+  this.unrecognizedLines = new ArrayList<>();
+}
+this.unrecognizedLines.add(line);
+}
   }
 }
   }



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


[tor-commits] [metrics-lib/release] Ignore Intellij's project files.

2019-09-11 Thread karsten
commit 3987fe8fd6164fcc7c35b21d5737e7fe9cd45fc0
Author: fava 
Date:   Thu Aug 22 04:39:20 2019 +

Ignore Intellij's project files.

Ignore Intellij's project files in order
to avoid personal configurations erroneusly committed
to the repository.
---
 .gitignore | 4 
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index af0ea90..a941692 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,7 @@ metrics-lib-*.tar.gz
 .project
 build.properties
 *~
+
+# IntelliJ files
+.idea/
+*.iml



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


[tor-commits] [metrics-lib/release] Update to Debian buster libraries.

2019-09-11 Thread karsten
commit 453a6f5acb9b9935a88de8c6e39e05e29b5423e7
Author: Karsten Loesing 
Date:   Thu Jul 18 07:53:39 2019 +0200

Update to Debian buster libraries.

Also upgrade to latest metrics-base.

Note that Checkstyle is excluded from this update, because there's a
yet unresolved issue with the new version: ("Unable to create Root
Module") that we'll have to address in a separate patch. But given
that Checkstyle is not required for the build it's okay to keep the
old version for now. It'll be in the release tarball.
---
 build.xml | 14 +++---
 src/build |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/build.xml b/build.xml
index 3066e90..a163dc9 100644
--- a/build.xml
+++ b/build.xml
@@ -14,13 +14,13 @@
   
 
   
-  
-  
-  
-  
-  
-  
-  
+  
+  
+  
+  
+  
+  
+  
   
 
   
diff --git a/src/build b/src/build
index e639c69..e12ba96 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit e639c697e9e94c6dbb26e946e5247c20a62c0661
+Subproject commit e12ba96aa0708b20375cf7cf5d20dfa19940d18a



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


[tor-commits] [metrics-lib/release] Adds GitLab CI for tests and checks

2019-09-11 Thread karsten
commit 4d8a8ea711828325371b9ec351021b7739ea06ac
Author: Iain R. Learmonth 
Date:   Tue Aug 6 16:08:26 2019 +0100

Adds GitLab CI for tests and checks

Configuration is held in the .gitlab-ci.yml file.

Fixes: #31645
---
 .gitlab-ci.yml | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000..7abea88
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,18 @@
+variables:
+  GIT_STRATEGY: clone
+
+stages:
+ - test
+
+test:
+ stage: test
+ image: debian:buster
+ script:
+  - apt update
+  - apt -y install default-jdk ant ivy git
+  - git submodule init
+  - git submodule update
+  - mkdir lib
+  - ant -lib /usr/share/java resolve
+  - ant test
+  - ant checks



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


[tor-commits] [metrics-lib/release] Use Ivy for resolving external dependencies.

2019-09-11 Thread karsten
commit e1728709b5ed30dace2dd5b7e47a3e3c5e9e5736
Author: Karsten Loesing 
Date:   Sat Aug 3 11:57:02 2019 +0200

Use Ivy for resolving external dependencies.

Includes an upgrade to the latest metrics-base commit 256e619.

Implements part of #31326.
---
 CHANGELOG.md | 14 ++
 build.xml|  3 ++-
 src/build|  2 +-
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18d250e..560ee96 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+# Changes in version 2.7.0 - 2019-0?-??
+
+ * Medium changes
+   - Use Ivy for resolving external dependencies rather than relying
+ on files found in Debian stable packages. Requires installing Ivy
+ (using `apt-get install ivy`, `brew install ivy`, or similar) and
+ running `ant resolve` (or `ant -lib /usr/share/java resolve`).
+ Retrieved files are then copied to the `lib/` directory, except
+ for dependencies on other metrics libraries that still need to be
+ copied to the `lib/` directory manually. Current dependency
+ versions resolved by Ivy are the same as in Debian stretch with
+ few exceptions.
+
+
 # Changes in version 2.6.2 - 2019-05-29
 
  * Medium changes
diff --git a/build.xml b/build.xml
index 3066e90..f319cf0 100644
--- a/build.xml
+++ b/build.xml
@@ -4,7 +4,8 @@

 ]>
 
-
+
 
   
   
diff --git a/src/build b/src/build
index ed48192..256e619 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit ed4819215aa60cc8935f955d9404f30e83dd892b
+Subproject commit 256e6192ad0066e48c6abb0ee9ac71714c7a3a0f



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


[tor-commits] [metrics-lib/release] Remove Cobertura from the build process.

2019-09-11 Thread karsten
commit 53b16d192da4a7fa5c1987a89a60257061602882
Author: Karsten Loesing 
Date:   Mon Aug 12 09:34:04 2019 +0200

Remove Cobertura from the build process.
---
 CHANGELOG.md | 1 +
 src/build| 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 560ee96..b804ceb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
  copied to the `lib/` directory manually. Current dependency
  versions resolved by Ivy are the same as in Debian stretch with
  few exceptions.
+   - Remove Cobertura from the build process.
 
 
 # Changes in version 2.6.2 - 2019-05-29
diff --git a/src/build b/src/build
index 256e619..75cda35 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit 256e6192ad0066e48c6abb0ee9ac71714c7a3a0f
+Subproject commit 75cda35ba7375ab0f5b12fa214620c3a29917097



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


[tor-commits] [metrics-lib/release] Revert all Debian buster library upgrades.

2019-09-11 Thread karsten
commit 7032e73a6471f3a4d7782ef65fc3d4cf00bb0ac1
Author: Karsten Loesing 
Date:   Sun Jul 28 21:46:09 2019 +0200

Revert all Debian buster library upgrades.

Turns out that updating all dependencies, including those in
metrics-web and exonerator using servlets and JSPs, is much harder
than expected. We decided to revert all these changes for now, so that
we can merge patches again. We're going to investigate alternatives
like Ant + Ivy, Maven, or Gradle in the near future.
---
 CHANGELOG.md | 20 
 build.xml| 14 +++---
 src/build|  2 +-
 3 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3622e1..18d250e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,23 +1,3 @@
-# Changes in version 2.7.0 - 2019-0?-??
-
- * Medium changes
-   * Update build-time and run-time dependencies to versions found in
- Debian buster, including: commons-codec-1.11.jar,
- commons-compress-1.18.jar, jackson-annotations-2.9.8.jar,
- jackson-core-2.9.8.jar, jackson-databind-2.9.8.jar,
- logback-core-1.2.3.jar, logback-classic-1.2.3.jar,
- slf4j-api-1.7.25.jar, and xz-1.8.jar.
-   * Update Checkstyle dependencies to versions found in Debian
- buster, including: antlr-2.7.7.jar, antlr4-runtime-4.7.2.jar,
- checkstyle-8.15.jar, commons-beanutils-1.9.3.jar,
- commons-collections3-3.2.2.jar, commons-logging-1.2.jar,
- guava-19.0.jar, java-atk-wrapper.jar, and picocli-3.9.2.jar.
-   * Update Cobertura dependencies to versions found in Debian buster,
- including: asm4-5.0.4.jar, asm4-util-5.0.4.jar,
- asm4-tree-5.0.4.jar, asm4-commons-5.0.4.jar,
- asm4-analysis-5.0.4.jar, and commons-lang3-3.8.jar
-
-
 # Changes in version 2.6.2 - 2019-05-29
 
  * Medium changes
diff --git a/build.xml b/build.xml
index a163dc9..3066e90 100644
--- a/build.xml
+++ b/build.xml
@@ -14,13 +14,13 @@
   
 
   
-  
-  
-  
-  
-  
-  
-  
+  
+  
+  
+  
+  
+  
+  
   
 
   
diff --git a/src/build b/src/build
index 42ee1fc..ed48192 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit 42ee1fc086b0e86cddf56475124a547465484321
+Subproject commit ed4819215aa60cc8935f955d9404f30e83dd892b



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


[tor-commits] [metrics-lib/release] Bump version to 2.6.2-dev.

2019-09-11 Thread karsten
commit e723c065b764ecfbb3bb96d4c491e67398b7f21b
Author: Karsten Loesing 
Date:   Thu May 30 15:21:41 2019 +0200

Bump version to 2.6.2-dev.
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index e6a1dbe..3066e90 100644
--- a/build.xml
+++ b/build.xml
@@ -6,7 +6,7 @@
 
 
 
-  
+  
   
   
   



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


[tor-commits] [metrics-lib/master] Prepare for 2.7.0 release.

2019-09-11 Thread karsten
commit 0520779255dc44d30a69a25f24f5a638ae870a6e
Author: Karsten Loesing 
Date:   Fri Sep 6 08:53:14 2019 +0200

Prepare for 2.7.0 release.
---
 CHANGELOG.md | 2 +-
 build.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2fdc45b..457533e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# Changes in version 2.7.0 - 2019-0?-??
+# Changes in version 2.7.0 - 2019-09-06
 
  * Medium changes
- Use Ivy for resolving external dependencies rather than relying
diff --git a/build.xml b/build.xml
index f319cf0..04f79fd 100644
--- a/build.xml
+++ b/build.xml
@@ -7,7 +7,7 @@
 
 
-  
+  
   
   
   

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


[tor-commits] [tor/master] Merge branch 'tor-github/pr/1296'

2019-09-11 Thread dgoulet
commit 41261c3b5cd505f5a601c319eb484866903814af
Merge: 049705fc1 478141e61
Author: David Goulet 
Date:   Wed Sep 11 09:42:31 2019 -0400

Merge branch 'tor-github/pr/1296'

 changes/ticket31625   |   4 ++
 src/app/config/config.c   |  13 +++-
 src/app/config/confparse.c| 124 +++---
 src/app/config/confparse.h|   5 +-
 src/lib/conf/confmacros.h |   2 +-
 src/lib/conf/conftypes.h  |  58 ++
 src/lib/confmgt/structvar.c   |  23 ++-
 src/lib/confmgt/structvar.h   |   5 +-
 src/lib/confmgt/type_defs.c   |  22 ---
 src/lib/confmgt/typedvar.c|  29 -
 src/lib/confmgt/typedvar.h|   4 --
 src/lib/confmgt/var_type_def_st.h |  16 ++---
 src/test/include.am   |   6 +-
 src/test/test_cmdline.sh  |  48 +++
 src/test/test_config.c|  26 
 15 files changed, 269 insertions(+), 116 deletions(-)

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


[tor-commits] [tor/master] integration test for --list-torrc-options

2019-09-11 Thread dgoulet
commit 7a8ea0d3c35d73e149e4f804e517cefa10e7afc7
Author: Nick Mathewson 
Date:   Thu Sep 5 12:54:09 2019 -0400

integration test for --list-torrc-options

(This option tests our existing behavior, not necessarily the most
sensible behavior.)
---
 src/test/include.am  |  3 ++-
 src/test/test_cmdline.sh | 48 
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/src/test/include.am b/src/test/include.am
index 1ec54a286..77193d4a7 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -23,7 +23,8 @@ TESTSCRIPTS = \
src/test/test_workqueue_pipe.sh \
src/test/test_workqueue_pipe2.sh \
src/test/test_workqueue_socketpair.sh \
-   src/test/test_switch_id.sh
+   src/test/test_switch_id.sh \
+   src/test/test_cmdline.sh
 
 if USE_RUST
 TESTSCRIPTS += \
diff --git a/src/test/test_cmdline.sh b/src/test/test_cmdline.sh
new file mode 100755
index 0..cf758c385
--- /dev/null
+++ b/src/test/test_cmdline.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+umask 077
+set -e
+
+if [ $# -ge 1 ]; then
+  TOR_BINARY="${1}"
+  shift
+else
+  TOR_BINARY="${TESTING_TOR_BINARY:-./src/app/tor}"
+fi
+
+echo "TOR BINARY IS ${TOR_BINARY}"
+
+die() { echo "$1" >&2 ; exit 5; }
+
+echo "A"
+
+DATA_DIR=$(mktemp -d -t tor_cmdline_tests.XX)
+trap 'rm -rf "$DATA_DIR"' 0
+
+# 1. Test list-torrc-options.
+OUT="${DATA_DIR}/output"
+
+echo "B"
+"${TOR_BINARY}" --list-torrc-options > "$OUT"
+
+echo "C"
+
+# regular options are given.
+grep -i "SocksPort" "$OUT" >/dev/null || die "Did not find SocksPort"
+
+
+echo "D"
+
+# unlisted options are given, since they do not have the NOSET flag.
+grep -i "__SocksPort" "$OUT" > /dev/null || die "Did not find __SocksPort"
+
+echo "E"
+
+# unsettable options are not given.
+if grep -i "DisableIOCP" "$OUT"  /dev/null; then
+die "Found DisableIOCP"
+fi
+if grep -i "HiddenServiceOptions" "$OUT" /dev/null ; then
+die "Found HiddenServiceOptions"
+fi
+echo "OK"



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


[tor-commits] [tor/master] Add test_cmdline.sh to distribution.

2019-09-11 Thread dgoulet
commit 14f48cb08387d2f9df3a16fb1816b80ce1649344
Author: Nick Mathewson 
Date:   Thu Sep 5 14:19:10 2019 -0400

Add test_cmdline.sh to distribution.
---
 src/test/include.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/include.am b/src/test/include.am
index 77193d4a7..931e05498 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -413,7 +413,8 @@ EXTRA_DIST += \
src/test/test_workqueue_efd2.sh \
src/test/test_workqueue_pipe.sh \
src/test/test_workqueue_pipe2.sh \
-   src/test/test_workqueue_socketpair.sh
+   src/test/test_workqueue_socketpair.sh \
+   src/test/test_cmdline.sh
 
 test-rust:
$(TESTS_ENVIRONMENT) "$(abs_top_srcdir)/src/test/test_rust.sh"



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


[tor-commits] [tor/master] Clarify documentation on config_var_is_listable()

2019-09-11 Thread dgoulet
commit fe5033d3b0f618493ec8ffd4274352ed42835bdb
Author: Nick Mathewson 
Date:   Tue Sep 10 09:39:09 2019 -0400

Clarify documentation on config_var_is_listable()

Here we make it clear we're only looking at listable variable names,
not at whether the variables themselves are gettable.

Also, remove an extraneous h.

(This commit is not a fixup, because of rebase conflicts.)
---
 src/app/config/confparse.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index dcbad0b90..930484620 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -589,9 +589,9 @@ config_var_needs_copy(const config_var_t *var)
   return ! config_var_has_flag(var, CFLG_NOCOPY);
 }
 
-/**h
- * Return true iff variable var should appear on list of variables
- * given to the controller or the CLI.
+/**
+ * Return true iff variable var should appear on list of variable
+ * names given to the controller or the CLI.
  **/
 bool
 config_var_is_listable(const config_var_t *var)



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


[tor-commits] [tor/master] Changes file for 31625 (config flag refactor)

2019-09-11 Thread dgoulet
commit d545fe1992432004689c66372f1a61e7c3fb7899
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:54 2019 -0400

Changes file for 31625 (config flag refactor)
---
 changes/ticket31625 | 4 
 1 file changed, 4 insertions(+)

diff --git a/changes/ticket31625 b/changes/ticket31625
new file mode 100644
index 0..822a921e4
--- /dev/null
+++ b/changes/ticket31625
@@ -0,0 +1,4 @@
+  o Code simplification and refactoring:
+- Replace our ad-hoc set of flags for configuration variables and
+  configuration variable types with fine-grained orthogonal flags
+  corresponding to the actual behavior we want. Closes ticket 31625.



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


[tor-commits] [tor/master] Document inconsistent usage of config_var_is_listable()

2019-09-11 Thread dgoulet
commit 478141e617a333ac4d998e3747c073246e04b5ae
Author: Nick Mathewson 
Date:   Tue Sep 10 10:29:34 2019 -0400

Document inconsistent usage of config_var_is_listable()

See also ticket 31654.
---
 src/app/config/config.c| 7 +++
 src/app/config/confparse.c | 6 ++
 2 files changed, 13 insertions(+)

diff --git a/src/app/config/config.c b/src/app/config/config.c
index 55e82934e..72a1190b5 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2666,6 +2666,9 @@ list_torrc_options(void)
 {
   smartlist_t *vars = config_mgr_list_vars(get_options_mgr());
   SMARTLIST_FOREACH_BEGIN(vars, const config_var_t *, var) {
+/* Possibly this should check listable, rather than (or in addition to)
+ * settable. See ticket 31654.
+ */
 if (! config_var_is_settable(var)) {
   /* This variable cannot be set, or cannot be set by this name. */
   continue;
@@ -2680,6 +2683,8 @@ static void
 list_deprecated_options(void)
 {
   smartlist_t *deps = config_mgr_list_deprecated_vars(get_options_mgr());
+  /* Possibly this should check whether the variables are listable,
+   * but currently it does not.  See ticket 31654. */
   SMARTLIST_FOREACH(deps, const char *, name,
 printf("%s\n", name));
   smartlist_free(deps);
@@ -8142,6 +8147,8 @@ getinfo_helper_config(control_connection_t *conn,
   } else if (!strcmp(question, "config/defaults")) {
 smartlist_t *sl = smartlist_new();
 int dirauth_lines_seen = 0, fallback_lines_seen = 0;
+/* Possibly this should check whether the variables are listable,
+ * but currently it does not.  See ticket 31654. */
 smartlist_t *vars = config_mgr_list_vars(get_options_mgr());
 SMARTLIST_FOREACH_BEGIN(vars, const config_var_t *, var) {
   if (var->initvalue != NULL) {
diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 930484620..9f7fdc5c3 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -592,6 +592,12 @@ config_var_needs_copy(const config_var_t *var)
 /**
  * Return true iff variable var should appear on list of variable
  * names given to the controller or the CLI.
+ *
+ * (Note that this option is imperfectly obeyed. The
+ * --list-torrc-options command looks at the "settable" flag, whereas
+ * "GETINFO config/defaults" and "list_deprecated_*()" do not filter
+ * their results. It would be good for consistency to try to converge
+ * these behaviors in the future.)
  **/
 bool
 config_var_is_listable(const config_var_t *var)



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


[tor-commits] [tor/master] Extract common list of flags to use for obsolete variables.

2019-09-11 Thread dgoulet
commit e61bfd0bfd1acfdd4f5d5912c5cc2c0e8ec61b75
Author: Nick Mathewson 
Date:   Tue Sep 10 09:51:07 2019 -0400

Extract common list of flags to use for obsolete variables.
---
 src/lib/conf/confmacros.h   | 3 +--
 src/lib/conf/conftypes.h| 6 ++
 src/lib/confmgt/type_defs.c | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/conf/confmacros.h b/src/lib/conf/confmacros.h
index a32667e1a..68121891f 100644
--- a/src/lib/conf/confmacros.h
+++ b/src/lib/conf/confmacros.h
@@ -61,8 +61,7 @@
 
 #define CONFIG_VAR_OBSOLETE(varname)\
   { .member = { .name = varname, .type = CONFIG_TYPE_OBSOLETE },\
-.flags = CFLG_NOSET | CFLG_NOLIST | CFLG_NODUMP | CFLG_NOCOPY | \
- CFLG_NOCMP \
+.flags = CFLG_GROUP_OBSOLETE\
   }
 
 #endif /* !defined(TOR_LIB_CONF_CONFMACROS_H) */
diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index aabdfdce7..274065cff 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -179,6 +179,12 @@ typedef struct struct_magic_decl_t {
  */
 #define CFLG_NOREPLACE(1u<<5)
 
+/**
+ * A group of flags that should be set on all obsolete options and types.
+ **/
+#define CFLG_GROUP_OBSOLETE \
+  (CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP|CFLG_NOSET|CFLG_NOLIST)
+
 /** A variable allowed in the configuration file or on the command line. */
 typedef struct config_var_t {
   struct_member_t member; /** A struct member corresponding to this
diff --git a/src/lib/confmgt/type_defs.c b/src/lib/confmgt/type_defs.c
index a0431e4f8..324b62e56 100644
--- a/src/lib/confmgt/type_defs.c
+++ b/src/lib/confmgt/type_defs.c
@@ -739,7 +739,7 @@ static const var_type_def_t type_definitions_table[] = {
.flags=CFLG_NOREPLACE|CFLG_NOSET },
   [CONFIG_TYPE_OBSOLETE] = {
  .name="Obsolete", .fns=_fns,
- .flags=CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP|CFLG_NOSET|CFLG_NOLIST
+ .flags=CFLG_GROUP_OBSOLETE,
   }
 };
 



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


[tor-commits] [tor/master] typed_var: Make flags into an unsigned OR of bits.

2019-09-11 Thread dgoulet
commit 03e41830433268650bd9ba7184a5c2a0f80df8e9
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:38 2019 -0400

typed_var: Make flags into an unsigned OR of bits.

Using a bitfield here will enable us to unify the var_type_def_t flags
with the config_var_t flags.

(This commit does not yet do that unification, and does not yet
rename or refactor any flags.  It only changes booleans into bits.)
---
 src/lib/confmgt/type_defs.c   | 11 ---
 src/lib/confmgt/typedvar.c|  6 +++---
 src/lib/confmgt/var_type_def_st.h | 35 ---
 3 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/src/lib/confmgt/type_defs.c b/src/lib/confmgt/type_defs.c
index f8b2681aa..e311319c0 100644
--- a/src/lib/confmgt/type_defs.c
+++ b/src/lib/confmgt/type_defs.c
@@ -725,16 +725,13 @@ static const var_type_def_t type_definitions_table[] = {
   [CONFIG_TYPE_CSV_INTERVAL] = { .name="TimeInterval",
  .fns=_csv_interval_fns, },
   [CONFIG_TYPE_LINELIST] = { .name="LineList", .fns=_fns,
- .is_cumulative=true},
+ .flags=VTFLAG_CUMULATIVE },
   [CONFIG_TYPE_LINELIST_S] = { .name="Dependent", .fns=_s_fns,
-   .is_cumulative=true,
-   .is_contained=true, },
+   .flags=VTFLAG_CUMULATIVE|VTFLAG_CONTAINED },
   [CONFIG_TYPE_LINELIST_V] = { .name="Virtual", .fns=_v_fns,
-   .is_cumulative=true,
-   .is_unsettable=true },
+   .flags=VTFLAG_CUMULATIVE|VTFLAG_UNSETTABLE },
   [CONFIG_TYPE_OBSOLETE] = { .name="Obsolete", .fns=_fns,
- .is_unsettable=true,
- .is_contained=true, }
+ .flags=VTFLAG_CONTAINED|VTFLAG_UNSETTABLE }
 };
 
 /**
diff --git a/src/lib/confmgt/typedvar.c b/src/lib/confmgt/typedvar.c
index 43040e1e0..751d15827 100644
--- a/src/lib/confmgt/typedvar.c
+++ b/src/lib/confmgt/typedvar.c
@@ -233,7 +233,7 @@ typed_var_mark_fragile(void *value, const var_type_def_t 
*def)
 bool
 var_type_is_cumulative(const var_type_def_t *def)
 {
-  return def->is_cumulative;
+  return (def->flags & VTFLAG_CUMULATIVE) != 0;
 }
 
 /**
@@ -243,7 +243,7 @@ var_type_is_cumulative(const var_type_def_t *def)
 bool
 var_type_is_contained(const var_type_def_t *def)
 {
-  return def->is_contained;
+  return (def->flags & VTFLAG_CONTAINED) != 0;
 }
 
 /**
@@ -252,5 +252,5 @@ var_type_is_contained(const var_type_def_t *def)
 bool
 var_type_is_settable(const var_type_def_t *def)
 {
-  return ! def->is_unsettable;
+  return (def->flags & VTFLAG_UNSETTABLE) == 0;
 }
diff --git a/src/lib/confmgt/var_type_def_st.h 
b/src/lib/confmgt/var_type_def_st.h
index 4157cb8ff..5eb97cff1 100644
--- a/src/lib/confmgt/var_type_def_st.h
+++ b/src/lib/confmgt/var_type_def_st.h
@@ -134,6 +134,25 @@ struct var_type_fns_t {
 };
 
 /**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type can never be set directly by name.
+ **/
+#define VTFLAG_UNSETTABLE (1u<<0)
+/**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type is always contained in another
+ * variable, and as such doesn't need to be dumped or copied
+ * independently.
+ **/
+#define VTFLAG_CONTAINED (1u<<1)
+/**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type can be set more than once without
+ * destroying older values. Such variables should implement "mark_fragile".
+ */
+#define VTFLAG_CUMULATIVE (1u<<2)
+
+/**
  * A structure describing a type that can be manipulated with the typedvar_*
  * functions.
  **/
@@ -151,17 +170,11 @@ struct var_type_def_t {
* calling the functions in this type's function table.
*/
   const void *params;
-
-  /** True iff a variable of this type can never be set directly by name. */
-  bool is_unsettable;
-  /** True iff a variable of this type is always contained in another
-   * variable, and as such doesn't need to be dumped or copied
-   * independently. */
-  bool is_contained;
-  /** True iff a variable of this type can be set more than once without
-   * destroying older values. Such variables should implement "mark_fragile".
-   */
-  bool is_cumulative;
+  /**
+   * A bitwise OR of one or more VTFLAG_* values, describing properties
+   * for all values of this type.
+   **/
+  uint32_t flags;
 };
 
 #endif /* !defined(TOR_LIB_CONFMGT_VAR_TYPE_DEF_ST_H) */



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


[tor-commits] [tor/master] Test: Make sure NOLIST options are not listed.

2019-09-11 Thread dgoulet
commit 5ffe6ec0e34fdddbc56d7699ce21c3a763f22198
Author: Nick Mathewson 
Date:   Thu Sep 5 12:29:24 2019 -0400

Test: Make sure NOLIST options are not listed.
---
 src/test/test_config.c | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/src/test/test_config.c b/src/test/test_config.c
index 58e05e509..9b715b2ec 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -5983,6 +5983,31 @@ test_config_kvline_parse(void *arg)
   tor_free(enc);
 }
 
+static void
+test_config_getinfo_config_names(void *arg)
+{
+  (void)arg;
+  char *answer = NULL;
+  const char *error = NULL;
+  int rv;
+
+  rv = getinfo_helper_config(NULL, "config/names", , );
+  tt_int_op(rv, OP_EQ, 0);
+  tt_ptr_op(error, OP_EQ, NULL);
+
+  // ContactInfo should be listed.
+  tt_assert(strstr(answer, "\nContactInfo String\n"));
+
+  // V1AuthoritativeDirectory should not be listed, since it is obsolete.
+  tt_assert(! strstr(answer, "V1AuthoritativeDirectory"));
+
+  // ___UsingTestNetworkDefaults should not be listed, since it is invisible.
+  tt_assert(! strstr(answer, "UsingTestNetworkDefaults"));
+
+ done:
+  tor_free(answer);
+}
+
 #define CONFIG_TEST(name, flags)  \
   { #name, test_config_ ## name, flags, NULL, NULL }
 
@@ -6035,5 +6060,6 @@ struct testcase_t config_tests[] = {
   CONFIG_TEST(compute_max_mem_in_queues, 0),
   CONFIG_TEST(extended_fmt, 0),
   CONFIG_TEST(kvline_parse, 0),
+  CONFIG_TEST(getinfo_config_names, 0),
   END_OF_TESTCASES
 };



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


[tor-commits] [tor/master] Replace low-level {var_type, struct_var}_is_*() with flag inspection

2019-09-11 Thread dgoulet
commit 1b3b6d9f2d94e659375257a5c439d250ce0075fd
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:44 2019 -0400

Replace low-level {var_type,struct_var}_is_*() with flag inspection

Since the flags are now stored with compatible numbering, we can
just OR them together and see whether the flag we want is in the
result.

(Net code removal!)
---
 src/app/config/confparse.c  | 29 ++---
 src/lib/confmgt/structvar.c | 23 ---
 src/lib/confmgt/structvar.h |  5 ++---
 src/lib/confmgt/typedvar.c  | 29 -
 src/lib/confmgt/typedvar.h  |  4 
 5 files changed, 24 insertions(+), 66 deletions(-)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 2c8779bbe..7579d9ef8 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -512,6 +512,18 @@ config_count_options(const config_mgr_t *mgr)
 }
 
 /**
+ * Return true iff at least one bit from flag is set on var,
+ * either in var's flags, or on the flags of its type.
+ **/
+static bool
+config_var_has_flag(const config_var_t *var, uint32_t flag)
+{
+  uint32_t have_flags = var->flags | struct_var_get_flags(>member);
+
+  return (have_flags & flag) != 0;
+}
+
+/**
  * Return true if assigning a value to var replaces the previous
  * value.  Return false if assigning a value to var appends
  * to the previous value.
@@ -519,7 +531,7 @@ config_count_options(const config_mgr_t *mgr)
 static bool
 config_var_is_replaced_on_set(const config_var_t *var)
 {
-  return ! struct_var_is_cumulative(>member);
+  return ! config_var_has_flag(var, VTFLAG_CUMULATIVE);
 }
 
 /**
@@ -529,9 +541,7 @@ config_var_is_replaced_on_set(const config_var_t *var)
 bool
 config_var_is_settable(const config_var_t *var)
 {
-  if (var->flags & CVFLAG_OBSOLETE)
-return false;
-  return struct_var_is_settable(>member);
+  return ! config_var_has_flag(var, CVFLAG_OBSOLETE | VTFLAG_UNSETTABLE);
 }
 
 /**
@@ -546,7 +556,7 @@ config_var_is_gettable(const config_var_t *var)
* have compatibility effects.  For now, let's leave them alone.
*/
 
-  // return (var->flags & (CVFLAG_OBSOLETE|CFGLAGS_INVISIBLE)) == 0;
+  // return ! config_var_has_flag(var, CVFLAG_OBSOLETE|CFGLAGS_INVISIBLE);
   (void)var;
   return true;
 }
@@ -565,7 +575,7 @@ config_var_is_gettable(const config_var_t *var)
 static bool
 config_var_is_derived(const config_var_t *var)
 {
-  return struct_var_is_contained(>member);
+  return config_var_has_flag(var, VTFLAG_CONTAINED);
 }
 
 /**
@@ -603,7 +613,7 @@ config_var_needs_copy(const config_var_t *var)
 bool
 config_var_is_listable(const config_var_t *var)
 {
-  return (var->flags & CVFLAG_INVISIBLE) == 0;
+  return ! config_var_has_flag(var, CVFLAG_INVISIBLE);
 }
 
 /**
@@ -617,10 +627,7 @@ config_var_is_listable(const config_var_t *var)
 static bool
 config_var_is_dumpable(const config_var_t *var)
 {
-  if (config_var_is_derived(var)) {
-return false;
-  }
-  return (var->flags & CVFLAG_NODUMP) == 0;
+  return ! config_var_has_flag(var, VTFLAG_CONTAINED | CVFLAG_NODUMP);
 }
 
 /*
diff --git a/src/lib/confmgt/structvar.c b/src/lib/confmgt/structvar.c
index 6b725f613..cb37f540b 100644
--- a/src/lib/confmgt/structvar.c
+++ b/src/lib/confmgt/structvar.c
@@ -238,26 +238,11 @@ struct_var_get_typename(const struct_member_t *member)
   return def ? def->name : NULL;
 }
 
-bool
-struct_var_is_cumulative(const struct_member_t *member)
-{
-  const var_type_def_t *def = get_type_def(member);
-
-  return def ? var_type_is_cumulative(def) : false;
-}
-
-bool
-struct_var_is_settable(const struct_member_t *member)
-{
-  const var_type_def_t *def = get_type_def(member);
-
-  return def ? var_type_is_settable(def) : true;
-}
-
-bool
-struct_var_is_contained(const struct_member_t *member)
+/** Return all of the flags set for this struct member. */
+uint32_t
+struct_var_get_flags(const struct_member_t *member)
 {
   const var_type_def_t *def = get_type_def(member);
 
-  return def ? var_type_is_contained(def) : false;
+  return def ? def->flags : 0;
 }
diff --git a/src/lib/confmgt/structvar.h b/src/lib/confmgt/structvar.h
index e6dbc6d6e..201211f79 100644
--- a/src/lib/confmgt/structvar.h
+++ b/src/lib/confmgt/structvar.h
@@ -17,6 +17,7 @@ struct struct_member_t;
 struct config_line_t;
 
 #include 
+#include "lib/cc/torint.h"
 
 void struct_set_magic(void *object,
   const struct struct_magic_decl_t *decl);
@@ -45,9 +46,7 @@ void struct_var_mark_fragile(void *object,
 
 const char *struct_var_get_name(const struct struct_member_t *member);
 const char *struct_var_get_typename(const struct struct_member_t *member);
-bool struct_var_is_cumulative(const struct struct_member_t *member);
-bool struct_var_is_settable(const struct struct_member_t *member);
-bool struct_var_is_contained(const struct struct_member_t *member);
+uint32_t struct_var_get_flags(const struct struct_member_t *member);
 
 int struct_var_kvassign(void *object, const struct 

[tor-commits] [tor/master] Remove all VTFLAG_* usage.

2019-09-11 Thread dgoulet
commit 5ca5d196acb4b2b237b9ed4bc38fff8b6dbf2bfd
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:48 2019 -0400

Remove all VTFLAG_* usage.
---
 src/lib/conf/conftypes.h| 16 
 src/lib/confmgt/type_defs.c | 19 ++-
 2 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index d5ab4e51c..d8575f364 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -171,22 +171,6 @@ typedef struct struct_magic_decl_t {
 
 /* Aliases for old individual options. These will get removed soon. */
 #define CVFLAG_NODUMP CFLG_NODUMP
-#define VTFLAG_CUMULATIVE CFLG_NOREPLACE
-#define VTFLAG_UNSETTABLE CFLG_NOSET
-
-/**
- * Set of flags to make a variable "derived" -- so that inspecting this
- * variable inspects part of another, and changing this variable changes part
- * of another.
- *
- * Derived variables require special handling in several ways: they do not
- * need to be copied independently when we are copying a config object, since
- * copying the variable they are derived from copies them too.  Similarly,
- * they do not need to be compared independently when listing changes, since
- * comparing the variable that they are derived from compares them too.
- **/
-#define VTFLAG_CONTAINED \
-  (CFLG_NOCOPY | CFLG_NOCMP | CFLG_NODUMP)
 
 /** Set of options to make a flag invisible. */
 #define CVFLAG_INVISIBLE  \
diff --git a/src/lib/confmgt/type_defs.c b/src/lib/confmgt/type_defs.c
index e311319c0..a0431e4f8 100644
--- a/src/lib/confmgt/type_defs.c
+++ b/src/lib/confmgt/type_defs.c
@@ -725,13 +725,22 @@ static const var_type_def_t type_definitions_table[] = {
   [CONFIG_TYPE_CSV_INTERVAL] = { .name="TimeInterval",
  .fns=_csv_interval_fns, },
   [CONFIG_TYPE_LINELIST] = { .name="LineList", .fns=_fns,
- .flags=VTFLAG_CUMULATIVE },
+ .flags=CFLG_NOREPLACE },
+  /*
+   * A "linelist_s" is a derived view of a linelist_v: inspecting
+   * it gets part of a linelist_v, and setting it adds to the linelist_v.
+   */
   [CONFIG_TYPE_LINELIST_S] = { .name="Dependent", .fns=_s_fns,
-   .flags=VTFLAG_CUMULATIVE|VTFLAG_CONTAINED },
+   .flags=CFLG_NOREPLACE|
+   /* The operations we disable here are
+* handled by the linelist_v. */
+   CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP },
   [CONFIG_TYPE_LINELIST_V] = { .name="Virtual", .fns=_v_fns,
-   .flags=VTFLAG_CUMULATIVE|VTFLAG_UNSETTABLE },
-  [CONFIG_TYPE_OBSOLETE] = { .name="Obsolete", .fns=_fns,
- .flags=VTFLAG_CONTAINED|VTFLAG_UNSETTABLE }
+   .flags=CFLG_NOREPLACE|CFLG_NOSET },
+  [CONFIG_TYPE_OBSOLETE] = {
+ .name="Obsolete", .fns=_fns,
+ .flags=CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP|CFLG_NOSET|CFLG_NOLIST
+  }
 };
 
 /**



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


[tor-commits] [tor/master] Document config_var_is_dumpable and config_var_is_settable.

2019-09-11 Thread dgoulet
commit 3bf385fc4a6af34d576962ca74080bbd5d87
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:27 2019 -0400

Document config_var_is_dumpable and config_var_is_settable.
---
 src/app/config/confparse.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 3d3f4e1bb..3341ee784 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -522,6 +522,10 @@ config_var_is_replaced_on_set(const config_var_t *var)
   return ! struct_var_is_cumulative(>member);
 }
 
+/**
+ * Return true iff var may be assigned by name (e.g., via the
+ * CLI, the configuration files, or the controller API).
+ **/
 bool
 config_var_is_settable(const config_var_t *var)
 {
@@ -529,6 +533,7 @@ config_var_is_settable(const config_var_t *var)
 return false;
   return struct_var_is_settable(>member);
 }
+
 bool
 config_var_is_contained(const config_var_t *var)
 {
@@ -545,6 +550,14 @@ config_var_is_listable(const config_var_t *var)
   return (var->flags & CVFLAG_INVISIBLE) == 0;
 }
 
+/**
+ * Return true iff variable var should be written out when we
+ * are writing our configuration to disk, to a controller, or via the
+ * --dump-config command.
+ *
+ * This option may be set because a variable is hidden, or because it is
+ * derived from another variable which will already be written out.
+ **/
 bool
 config_var_is_dumpable(const config_var_t *var)
 {



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


[tor-commits] [tor/master] config: rename "contained" to "derived", and explain it better.

2019-09-11 Thread dgoulet
commit 8d685aee7c89bc0118a4550c1bb5a3c82dfb4c4c
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:32 2019 -0400

config: rename "contained" to "derived", and explain it better.

Don't use "derived" directly, but check its implications for listing
and copying.
---
 src/app/config/confparse.c | 54 +++---
 src/app/config/confparse.h |  1 -
 2 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 1923a0c1e..361500466 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -551,13 +551,52 @@ config_var_is_gettable(const config_var_t *var)
   return true;
 }
 
-bool
-config_var_is_contained(const config_var_t *var)
+/**
+ * Return true iff this is variable is "derived" from another -- that is,
+ * inspecting this variable inspects part of another, and changing this
+ * variable changes part of another.
+ *
+ * Derived variables require special handling in several ways: they do not
+ * need to be copied independently when we are copying a config object, since
+ * copying the variable they are derived from copies them too.  Similarly,
+ * they do not need to be compared independently when listing changes, since
+ * comparing the variable that they are derived from compares them too.
+ **/
+static bool
+config_var_is_derived(const config_var_t *var)
 {
   return struct_var_is_contained(>member);
 }
 
 /**
+ * Return true iff we need to check var for changes when we are
+ * comparing config options for changes.
+ *
+ * A false result might mean that the variable is a derived variable, and that
+ * comparing the variable it derives from compares this one too-- or it might
+ * mean that there is no data to compare.
+ **/
+static bool
+config_var_should_list_changes(const config_var_t *var)
+{
+  return ! config_var_is_derived(var);
+}
+
+/**
+ * Return true iff we need to copy the data for var when we are
+ * copying a config option.
+ *
+ * A false option might mean that the variable is a derived variable, and that
+ * copying the variable it derives from copies it-- or it might mean that
+ * there is no data to copy.
+ **/
+static bool
+config_var_needs_copy(const config_var_t *var)
+{
+  return ! config_var_is_derived(var);
+}
+
+/**h
  * Return true iff variable var should appear on list of variables
  * given to the controller or the CLI.
  **/
@@ -578,6 +617,9 @@ config_var_is_listable(const config_var_t *var)
 bool
 config_var_is_dumpable(const config_var_t *var)
 {
+  if (config_var_is_derived(var)) {
+return false;
+  }
   return (var->flags & CVFLAG_NODUMP) == 0;
 }
 
@@ -1037,7 +1079,7 @@ config_get_changes(const config_mgr_t *mgr,
   config_line_t *result = NULL;
   config_line_t **next = 
   SMARTLIST_FOREACH_BEGIN(mgr->all_vars, managed_var_t *, mv) {
-if (config_var_is_contained(mv->cvar)) {
+if (! config_var_should_list_changes(mv->cvar)) {
   /* something else will check this var, or it doesn't need checking */
   continue;
 }
@@ -1073,7 +1115,7 @@ config_dup(const config_mgr_t *mgr, const void *old)
 
   newopts = config_new(mgr);
   SMARTLIST_FOREACH_BEGIN(mgr->all_vars, managed_var_t *, mv) {
-if (config_var_is_contained(mv->cvar)) {
+if (! config_var_needs_copy(mv->cvar)) {
   // Something else will copy this option, or it doesn't need copying.
   continue;
 }
@@ -1140,10 +1182,6 @@ config_dump(const config_mgr_t *mgr, const void 
*default_options,
   elements = smartlist_new();
   SMARTLIST_FOREACH_BEGIN(mgr->all_vars, managed_var_t *, mv) {
 int comment_option = 0;
-if (config_var_is_contained(mv->cvar)) {
-  // Something else will dump this option, or it doesn't need dumping.
-  continue;
-}
 /* Don't save 'hidden' control variables. */
 if (! config_var_is_dumpable(mv->cvar))
   continue;
diff --git a/src/app/config/confparse.h b/src/app/config/confparse.h
index b4c32bf1b..b5d0eb3ba 100644
--- a/src/app/config/confparse.h
+++ b/src/app/config/confparse.h
@@ -190,7 +190,6 @@ const char *config_expand_abbrev(const config_mgr_t *mgr,
 void warn_deprecated_option(const char *what, const char *why);
 
 bool config_var_is_settable(const config_var_t *var);
-bool config_var_is_contained(const config_var_t *var);
 bool config_var_is_listable(const config_var_t *var);
 bool config_var_is_dumpable(const config_var_t *var);
 



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


[tor-commits] [tor/master] Remove all CVFLAG_* usage.

2019-09-11 Thread dgoulet
commit 0d6d96396cf4b56bb99b96d39d1c7366792cdbb6
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:50 2019 -0400

Remove all CVFLAG_* usage.
---
 src/app/config/config.c   |  4 ++--
 src/lib/conf/confmacros.h |  3 ++-
 src/lib/conf/conftypes.h  | 12 
 3 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/app/config/config.c b/src/app/config/config.c
index 9c93198a4..55e82934e 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -267,10 +267,10 @@ DUMMY_TYPECHECK_INSTANCE(or_options_t);
 
 #define VAR_NODUMP(varname,conftype,member,initvalue) \
   CONFIG_VAR_ETYPE(or_options_t, varname, conftype, member,   \
-   CVFLAG_NODUMP, initvalue)
+   CFLG_NODUMP, initvalue)
 #define VAR_INVIS(varname,conftype,member,initvalue)  \
   CONFIG_VAR_ETYPE(or_options_t, varname, conftype, member,   \
-   CVFLAG_NODUMP|CVFLAG_INVISIBLE, initvalue)
+   CFLG_NODUMP | CFLG_NOSET | CFLG_NOLIST, initvalue)
 
 #define V(member,conftype,initvalue)\
   VAR(#member, conftype, member, initvalue)
diff --git a/src/lib/conf/confmacros.h b/src/lib/conf/confmacros.h
index 2a15f09aa..a32667e1a 100644
--- a/src/lib/conf/confmacros.h
+++ b/src/lib/conf/confmacros.h
@@ -61,7 +61,8 @@
 
 #define CONFIG_VAR_OBSOLETE(varname)\
   { .member = { .name = varname, .type = CONFIG_TYPE_OBSOLETE },\
-.flags = CVFLAG_OBSOLETE\
+.flags = CFLG_NOSET | CFLG_NOLIST | CFLG_NODUMP | CFLG_NOCOPY | \
+ CFLG_NOCMP \
   }
 
 #endif /* !defined(TOR_LIB_CONF_CONFMACROS_H) */
diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index d8575f364..1f6120670 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -169,18 +169,6 @@ typedef struct struct_magic_decl_t {
  */
 #define CFLG_NOREPLACE(1u<<5)
 
-/* Aliases for old individual options. These will get removed soon. */
-#define CVFLAG_NODUMP CFLG_NODUMP
-
-/** Set of options to make a flag invisible. */
-#define CVFLAG_INVISIBLE  \
-  (CFLG_NODUMP | CFLG_NOSET | CFLG_NOLIST)
-/**
- * Set of flags to indicate that a configuration option is obsolete.
- **/
-#define CVFLAG_OBSOLETE \
-  (CFLG_NOSET | CFLG_NOLIST | CFLG_NODUMP | CFLG_NOCOPY | CFLG_NOCMP)
-
 /** A variable allowed in the configuration file or on the command line. */
 typedef struct config_var_t {
   struct_member_t member; /** A struct member corresponding to this



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


[tor-commits] [tor/master] Re-number VTFLAG_* values so they don't conflict with CVFLAG_*

2019-09-11 Thread dgoulet
commit 4b92f4c83a27149696e148412e09ae814f96b2eb
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:42 2019 -0400

Re-number VTFLAG_* values so they don't conflict with CVFLAG_*
---
 src/lib/conf/conftypes.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index 6d1ce967a..290b5831e 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -153,20 +153,20 @@ typedef struct struct_magic_decl_t {
  * Flag for var_type_def_t.
  * Set iff a variable of this type can never be set directly by name.
  **/
-#define VTFLAG_UNSETTABLE (1u<<0)
+#define VTFLAG_UNSETTABLE (1u<<3)
 /**
  * Flag for var_type_def_t.
  * Set iff a variable of this type is always contained in another
  * variable, and as such doesn't need to be dumped or copied
  * independently.
  **/
-#define VTFLAG_CONTAINED (1u<<1)
+#define VTFLAG_CONTAINED (1u<<4)
 /**
  * Flag for var_type_def_t.
  * Set iff a variable of this type can be set more than once without
  * destroying older values. Such variables should implement "mark_fragile".
  */
-#define VTFLAG_CUMULATIVE (1u<<2)
+#define VTFLAG_CUMULATIVE (1u<<5)
 
 /** A variable allowed in the configuration file or on the command line. */
 typedef struct config_var_t {



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


[tor-commits] [tor/master] Revise documentation on CFLG_* flags

2019-09-11 Thread dgoulet
commit bbd40e690ee596af60fb38c5e89dec92f6091b1d
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:52 2019 -0400

Revise documentation on CFLG_* flags
---
 src/lib/conf/conftypes.h | 46 --
 1 file changed, 28 insertions(+), 18 deletions(-)

diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index 1f6120670..aabdfdce7 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -132,40 +132,50 @@ typedef struct struct_magic_decl_t {
 } struct_magic_decl_t;
 
 /**
- * Flag to indicate that an option is undumpable. An undumpable option is
- * never saved to disk.
+ * Flag to indicate that an option or type is "undumpable". An
+ * undumpable option is never saved to disk.
  *
- * For historical reasons it is prefixed with __ but not with ___.
+ * For historical reasons its name is usually is prefixed with __.
  **/
 #define CFLG_NODUMP(1u<<0)
 /**
- * Flag to indicate that an option is "invisible". An invisible option
- * is always undumpable, and we don't tell the controller about it.
- * For historical reasons it is prefixed with ___.
+ * Flag to indicate that an option or type is "unlisted".
+ *
+ * We don't tell the controller about unlisted options when it asks for a
+ * list of them.
  **/
 #define CFLG_NOLIST (1u<<1)
-
 /**
- * Flag for var_type_def_t.
- * Set iff a variable of this type can never be set directly by name.
+ * Flag to indicate that an option or type is "unsettable".
+ *
+ * An unsettable option can never be set directly by name.
  **/
 #define CFLG_NOSET (1u<<2)
 /**
- * Flag for var_type_def_t.
- * Set iff a variable of this type is does not need to be copied when copying
- * the structure that contains it.
+ * Flag to indicate that an option or type does not need to be copied when
+ * copying the structure that contains it.
+ *
+ * (Usually, if an option does not need to be copied, then either it contains
+ * no data, or the data that it does contain is completely contained within
+ * another option.)
  **/
 #define CFLG_NOCOPY (1u<<3)
 /**
- * Flag for var_type_def_t.
- * Set iff a variable of this type does not need to be compared when comparing
- * two objects that contain it.
+ * Flag to indicate that an option or type does not need to be compared
+ * when telling the controller about the differences between two
+ * configurations.
+ *
+ * (Usually, if an option does not need to be compared, then either it
+ * contains no data, or the data that it does contain is completely contained
+ * within another option.)
  **/
 #define CFLG_NOCMP (1u<<4)
 /**
- * Flag for var_type_def_t.
- * Set iff a variable of this type can be set more than once without
- * destroying older values. Such variables should implement "mark_fragile".
+ * Flag to indicate that an option or type should not be replaced when setting
+ * it.
+ *
+ * For most options, setting them replaces their old value.  For some options,
+ * however, setting them appends to their old value.
  */
 #define CFLG_NOREPLACE(1u<<5)
 



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


[tor-commits] [tor/master] confparse, conftypes: Replace flags with their new names.

2019-09-11 Thread dgoulet
commit 9b571d4729f0a6a6c1040ad9cb3e452ff0a5cee6
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:46 2019 -0400

confparse, conftypes: Replace flags with their new names.

The old names remain as #defines that cause variables to get one or
more flags.

Now every flag-testing function in confparse.c tests exactly one flag.
---
 src/app/config/confparse.c | 29 +--
 src/lib/conf/conftypes.h   | 59 ++
 2 files changed, 50 insertions(+), 38 deletions(-)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 7579d9ef8..dcbad0b90 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -531,7 +531,7 @@ config_var_has_flag(const config_var_t *var, uint32_t flag)
 static bool
 config_var_is_replaced_on_set(const config_var_t *var)
 {
-  return ! config_var_has_flag(var, VTFLAG_CUMULATIVE);
+  return ! config_var_has_flag(var, CFLG_NOREPLACE);
 }
 
 /**
@@ -541,7 +541,7 @@ config_var_is_replaced_on_set(const config_var_t *var)
 bool
 config_var_is_settable(const config_var_t *var)
 {
-  return ! config_var_has_flag(var, CVFLAG_OBSOLETE | VTFLAG_UNSETTABLE);
+  return ! config_var_has_flag(var, CFLG_NOSET);
 }
 
 /**
@@ -562,23 +562,6 @@ config_var_is_gettable(const config_var_t *var)
 }
 
 /**
- * Return true iff this is variable is "derived" from another -- that is,
- * inspecting this variable inspects part of another, and changing this
- * variable changes part of another.
- *
- * Derived variables require special handling in several ways: they do not
- * need to be copied independently when we are copying a config object, since
- * copying the variable they are derived from copies them too.  Similarly,
- * they do not need to be compared independently when listing changes, since
- * comparing the variable that they are derived from compares them too.
- **/
-static bool
-config_var_is_derived(const config_var_t *var)
-{
-  return config_var_has_flag(var, VTFLAG_CONTAINED);
-}
-
-/**
  * Return true iff we need to check var for changes when we are
  * comparing config options for changes.
  *
@@ -589,7 +572,7 @@ config_var_is_derived(const config_var_t *var)
 static bool
 config_var_should_list_changes(const config_var_t *var)
 {
-  return ! config_var_is_derived(var);
+  return ! config_var_has_flag(var, CFLG_NOCMP);
 }
 
 /**
@@ -603,7 +586,7 @@ config_var_should_list_changes(const config_var_t *var)
 static bool
 config_var_needs_copy(const config_var_t *var)
 {
-  return ! config_var_is_derived(var);
+  return ! config_var_has_flag(var, CFLG_NOCOPY);
 }
 
 /**h
@@ -613,7 +596,7 @@ config_var_needs_copy(const config_var_t *var)
 bool
 config_var_is_listable(const config_var_t *var)
 {
-  return ! config_var_has_flag(var, CVFLAG_INVISIBLE);
+  return ! config_var_has_flag(var, CFLG_NOLIST);
 }
 
 /**
@@ -627,7 +610,7 @@ config_var_is_listable(const config_var_t *var)
 static bool
 config_var_is_dumpable(const config_var_t *var)
 {
-  return ! config_var_has_flag(var, VTFLAG_CONTAINED | CVFLAG_NODUMP);
+  return ! config_var_has_flag(var, CFLG_NODUMP);
 }
 
 /*
diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index 290b5831e..d5ab4e51c 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -132,41 +132,70 @@ typedef struct struct_magic_decl_t {
 } struct_magic_decl_t;
 
 /**
- * Flag to indicate that an option is obsolete. Any attempt to set or
- * fetch this option should produce a warning.
- **/
-#define CVFLAG_OBSOLETE  (1u<<0)
-/**
  * Flag to indicate that an option is undumpable. An undumpable option is
- * never saved to disk. For historical reasons it is prefixed with __ but
- * not with ___.
+ * never saved to disk.
+ *
+ * For historical reasons it is prefixed with __ but not with ___.
  **/
-#define CVFLAG_NODUMP(1u<<1)
+#define CFLG_NODUMP(1u<<0)
 /**
  * Flag to indicate that an option is "invisible". An invisible option
  * is always undumpable, and we don't tell the controller about it.
  * For historical reasons it is prefixed with ___.
  **/
-#define CVFLAG_INVISIBLE (1u<<2)
+#define CFLG_NOLIST (1u<<1)
 
 /**
  * Flag for var_type_def_t.
  * Set iff a variable of this type can never be set directly by name.
  **/
-#define VTFLAG_UNSETTABLE (1u<<3)
+#define CFLG_NOSET (1u<<2)
 /**
  * Flag for var_type_def_t.
- * Set iff a variable of this type is always contained in another
- * variable, and as such doesn't need to be dumped or copied
- * independently.
+ * Set iff a variable of this type is does not need to be copied when copying
+ * the structure that contains it.
  **/
-#define VTFLAG_CONTAINED (1u<<4)
+#define CFLG_NOCOPY (1u<<3)
+/**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type does not need to be compared when comparing
+ * two objects that contain it.
+ **/
+#define CFLG_NOCMP (1u<<4)
 /**
  * Flag for var_type_def_t.
  * Set iff a variable of this type can be set more than once without
  * destroying 

[tor-commits] [tor/master] config: make config_var_is_dumpable static.

2019-09-11 Thread dgoulet
commit 7171ce2a2a4d51db5b39908b7b4d4eb0e4c28a30
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:34 2019 -0400

config: make config_var_is_dumpable static.
---
 src/app/config/confparse.c | 2 +-
 src/app/config/confparse.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 361500466..2c8779bbe 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -614,7 +614,7 @@ config_var_is_listable(const config_var_t *var)
  * This option may be set because a variable is hidden, or because it is
  * derived from another variable which will already be written out.
  **/
-bool
+static bool
 config_var_is_dumpable(const config_var_t *var)
 {
   if (config_var_is_derived(var)) {
diff --git a/src/app/config/confparse.h b/src/app/config/confparse.h
index b5d0eb3ba..054348d8d 100644
--- a/src/app/config/confparse.h
+++ b/src/app/config/confparse.h
@@ -191,7 +191,6 @@ void warn_deprecated_option(const char *what, const char 
*why);
 
 bool config_var_is_settable(const config_var_t *var);
 bool config_var_is_listable(const config_var_t *var);
-bool config_var_is_dumpable(const config_var_t *var);
 
 /* Helper macros to compare an option across two configuration objects */
 #define CFG_EQ_BOOL(a,b,opt) ((a)->opt == (b)->opt)



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


[tor-commits] [tor/master] Move VTFLAG_* declarations to conftypes.h

2019-09-11 Thread dgoulet
commit c650ab8061202cdccb5361b4bf9c53836c46d03a
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:40 2019 -0400

Move VTFLAG_* declarations to conftypes.h
---
 src/lib/conf/conftypes.h  | 19 +++
 src/lib/confmgt/var_type_def_st.h | 19 ---
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index 4609564b3..6d1ce967a 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -149,6 +149,25 @@ typedef struct struct_magic_decl_t {
  **/
 #define CVFLAG_INVISIBLE (1u<<2)
 
+/**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type can never be set directly by name.
+ **/
+#define VTFLAG_UNSETTABLE (1u<<0)
+/**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type is always contained in another
+ * variable, and as such doesn't need to be dumped or copied
+ * independently.
+ **/
+#define VTFLAG_CONTAINED (1u<<1)
+/**
+ * Flag for var_type_def_t.
+ * Set iff a variable of this type can be set more than once without
+ * destroying older values. Such variables should implement "mark_fragile".
+ */
+#define VTFLAG_CUMULATIVE (1u<<2)
+
 /** A variable allowed in the configuration file or on the command line. */
 typedef struct config_var_t {
   struct_member_t member; /** A struct member corresponding to this
diff --git a/src/lib/confmgt/var_type_def_st.h 
b/src/lib/confmgt/var_type_def_st.h
index 5eb97cff1..f1131ff11 100644
--- a/src/lib/confmgt/var_type_def_st.h
+++ b/src/lib/confmgt/var_type_def_st.h
@@ -134,25 +134,6 @@ struct var_type_fns_t {
 };
 
 /**
- * Flag for var_type_def_t.
- * Set iff a variable of this type can never be set directly by name.
- **/
-#define VTFLAG_UNSETTABLE (1u<<0)
-/**
- * Flag for var_type_def_t.
- * Set iff a variable of this type is always contained in another
- * variable, and as such doesn't need to be dumped or copied
- * independently.
- **/
-#define VTFLAG_CONTAINED (1u<<1)
-/**
- * Flag for var_type_def_t.
- * Set iff a variable of this type can be set more than once without
- * destroying older values. Such variables should implement "mark_fragile".
- */
-#define VTFLAG_CUMULATIVE (1u<<2)
-
-/**
  * A structure describing a type that can be manipulated with the typedvar_*
  * functions.
  **/



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


[tor-commits] [tor/master] struct_var: refactor struct_var_is*() functions to delegate

2019-09-11 Thread dgoulet
commit 4f6b592691b0057dca55ce92beefc6b7e671a4ae
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:36 2019 -0400

struct_var: refactor struct_var_is*() functions to delegate

Previously they checked the individual flags inside var_type_def_t;
now they call the appropriate var_type_is_*() functions.

(These functions will be removed entirely by the end of this branch.)
---
 src/lib/confmgt/structvar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/confmgt/structvar.c b/src/lib/confmgt/structvar.c
index 32f616c21..6b725f613 100644
--- a/src/lib/confmgt/structvar.c
+++ b/src/lib/confmgt/structvar.c
@@ -243,7 +243,7 @@ struct_var_is_cumulative(const struct_member_t *member)
 {
   const var_type_def_t *def = get_type_def(member);
 
-  return def ? def->is_cumulative : false;
+  return def ? var_type_is_cumulative(def) : false;
 }
 
 bool
@@ -251,7 +251,7 @@ struct_var_is_settable(const struct_member_t *member)
 {
   const var_type_def_t *def = get_type_def(member);
 
-  return def ? !def->is_unsettable : true;
+  return def ? var_type_is_settable(def) : true;
 }
 
 bool
@@ -259,5 +259,5 @@ struct_var_is_contained(const struct_member_t *member)
 {
   const var_type_def_t *def = get_type_def(member);
 
-  return def ? def->is_contained : false;
+  return def ? var_type_is_contained(def) : false;
 }



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


[tor-commits] [tor/master] config: Introduce the concept of an "ungettable" variable.

2019-09-11 Thread dgoulet
commit 668e3a77090b031bec8254dfc6d816f5f4add54d
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:29 2019 -0400

config: Introduce the concept of an "ungettable" variable.

We had though to make all obsolete and invisible variables
ungettable, so that GETCONF would reject them.  But it turns out
that this isn't the current behavior of GETCONF with those
variables.  So for now, I'm leaving the current behavior unchanged.
(See ticket 31647 for a proposal to change the behavior.)
---
 src/app/config/confparse.c | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 3341ee784..1923a0c1e 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -534,6 +534,23 @@ config_var_is_settable(const config_var_t *var)
   return struct_var_is_settable(>member);
 }
 
+/**
+ * Return true iff the controller is allowed to fetch the value of
+ * var.
+ **/
+static bool
+config_var_is_gettable(const config_var_t *var)
+{
+  /* Arguably, invisible or obsolete options should not be gettable.  However,
+   * they have been gettable for a long time, and making them ungettable could
+   * have compatibility effects.  For now, let's leave them alone.
+   */
+
+  // return (var->flags & (CVFLAG_OBSOLETE|CFGLAGS_INVISIBLE)) == 0;
+  (void)var;
+  return true;
+}
+
 bool
 config_var_is_contained(const config_var_t *var)
 {
@@ -776,6 +793,11 @@ config_get_assigned_option(const config_mgr_t *mgr, const 
void *options,
 log_warn(LD_CONFIG, "Unknown option '%s'.  Failing.", key);
 return NULL;
   }
+  if (! config_var_is_gettable(var->cvar)) {
+log_warn(LD_CONFIG, "Option '%s' is obsolete or unfetchable. Failing.",
+ key);
+return NULL;
+  }
   const void *object = config_mgr_get_obj(mgr, options, var->object_idx);
 
   result = struct_var_kvencode(object, >cvar->member);



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


[tor-commits] [tor/master] config: Invert sense of _is_invisible, and rename to is_listable()

2019-09-11 Thread dgoulet
commit 16cf9424c1480aea2443f6995d1056e8f04ba5e3
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:25 2019 -0400

config: Invert sense of _is_invisible, and rename to is_listable()
---
 src/app/config/config.c|  2 +-
 src/app/config/confparse.c | 10 --
 src/app/config/confparse.h |  2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/app/config/config.c b/src/app/config/config.c
index 0cbc223d0..9c93198a4 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -8128,7 +8128,7 @@ getinfo_helper_config(control_connection_t *conn,
 smartlist_t *vars = config_mgr_list_vars(get_options_mgr());
 SMARTLIST_FOREACH_BEGIN(vars, const config_var_t *, var) {
   /* don't tell controller about invisible options */
-  if (config_var_is_invisible(var))
+  if (! config_var_is_listable(var))
 continue;
   const char *type = struct_var_get_typename(>member);
   if (!type)
diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 633fc4f8b..3d3f4e1bb 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -534,11 +534,17 @@ config_var_is_contained(const config_var_t *var)
 {
   return struct_var_is_contained(>member);
 }
+
+/**
+ * Return true iff variable var should appear on list of variables
+ * given to the controller or the CLI.
+ **/
 bool
-config_var_is_invisible(const config_var_t *var)
+config_var_is_listable(const config_var_t *var)
 {
-  return (var->flags & CVFLAG_INVISIBLE) != 0;
+  return (var->flags & CVFLAG_INVISIBLE) == 0;
 }
+
 bool
 config_var_is_dumpable(const config_var_t *var)
 {
diff --git a/src/app/config/confparse.h b/src/app/config/confparse.h
index 7edbbe3c0..b4c32bf1b 100644
--- a/src/app/config/confparse.h
+++ b/src/app/config/confparse.h
@@ -191,7 +191,7 @@ void warn_deprecated_option(const char *what, const char 
*why);
 
 bool config_var_is_settable(const config_var_t *var);
 bool config_var_is_contained(const config_var_t *var);
-bool config_var_is_invisible(const config_var_t *var);
+bool config_var_is_listable(const config_var_t *var);
 bool config_var_is_dumpable(const config_var_t *var);
 
 /* Helper macros to compare an option across two configuration objects */



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


[tor-commits] [tor/master] config: replace config_var_is_cumulative with is_replaced_on_set()

2019-09-11 Thread dgoulet
commit 22e7d33735805799a31949a58f64ce634e47477f
Author: Nick Mathewson 
Date:   Thu Sep 5 11:48:23 2019 -0400

config: replace config_var_is_cumulative with is_replaced_on_set()

This change replaces the higher-level property check to match our
intended flag factoring.
---
 src/app/config/confparse.c | 17 -
 src/app/config/confparse.h |  1 -
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 0e941bab6..633fc4f8b 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -511,11 +511,17 @@ config_count_options(const config_mgr_t *mgr)
   return smartlist_len(mgr->all_vars);
 }
 
-bool
-config_var_is_cumulative(const config_var_t *var)
+/**
+ * Return true if assigning a value to var replaces the previous
+ * value.  Return false if assigning a value to var appends
+ * to the previous value.
+ **/
+static bool
+config_var_is_replaced_on_set(const config_var_t *var)
 {
-  return struct_var_is_cumulative(>member);
+  return ! struct_var_is_cumulative(>member);
 }
+
 bool
 config_var_is_settable(const config_var_t *var)
 {
@@ -650,7 +656,8 @@ config_assign_line(const config_mgr_t *mgr, void *options,
   if (!strlen(c->value)) {
 /* reset or clear it, then return */
 if (!clear_first) {
-  if (config_var_is_cumulative(cvar) && c->command != CONFIG_LINE_CLEAR) {
+  if (! config_var_is_replaced_on_set(cvar) &&
+  c->command != CONFIG_LINE_CLEAR) {
 /* We got an empty linelist from the torrc or command line.
As a special case, call this an error. Warn and ignore. */
 log_warn(LD_CONFIG,
@@ -671,7 +678,7 @@ config_assign_line(const config_mgr_t *mgr, void *options,
 // LCOV_EXCL_STOP
   }
 
-  if (options_seen && ! config_var_is_cumulative(cvar)) {
+  if (options_seen && config_var_is_replaced_on_set(cvar)) {
 /* We're tracking which options we've seen, and this option is not
  * supposed to occur more than once. */
 tor_assert(var_index >= 0);
diff --git a/src/app/config/confparse.h b/src/app/config/confparse.h
index 6a7a56727..7edbbe3c0 100644
--- a/src/app/config/confparse.h
+++ b/src/app/config/confparse.h
@@ -189,7 +189,6 @@ const char *config_expand_abbrev(const config_mgr_t *mgr,
  int command_line, int warn_obsolete);
 void warn_deprecated_option(const char *what, const char *why);
 
-bool config_var_is_cumulative(const config_var_t *var);
 bool config_var_is_settable(const config_var_t *var);
 bool config_var_is_contained(const config_var_t *var);
 bool config_var_is_invisible(const config_var_t *var);



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


[tor-commits] [tor/master] Merge branch 'bug31615_041' into bug31615_master

2019-09-11 Thread dgoulet
commit 987768b07766e752d7aa7234916abe1e8e2feb87
Merge: 796a9b37e f1c57cd1e
Author: teor 
Date:   Tue Sep 10 09:03:37 2019 +1000

Merge branch 'bug31615_041' into bug31615_master

Merged modified lines from bug31615_041, and unmodified lines
from master.

 changes/bug31615 |  5 +
 src/app/main/subsystem_list.c| 38 --
 src/lib/err/torerr_sys.c |  5 -
 src/lib/log/log_sys.c|  2 ++
 src/lib/net/network_sys.c|  4 +++-
 src/lib/process/winprocess_sys.c |  2 ++
 src/lib/thread/compat_threads.c  |  2 ++
 src/lib/time/time_sys.c  |  4 +++-
 src/lib/wallclock/approx_time.c  |  4 +++-
 9 files changed, 44 insertions(+), 22 deletions(-)

diff --cc src/app/main/subsystem_list.c
index 95d96f78d,989b0d6f8..d525708e7
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@@ -33,33 -32,33 +33,35 @@@
  
  /**
   * Global list of the subsystems in Tor, in the order of their initialization.
+  * Want to know the exact level numbers?
+  * We'll implement a level dump command in #31614.
   **/
  const subsys_fns_t *tor_subsystems[] = {
-   _winprocess, /* -100 */
-   _torerr, /* -100 */
-   _wallclock, /* -99 */
-   _threads, /* -95 */
-   _logging, /* -90 */
-   _time, /* -90 */
-   _network, /* -90 */
-   _compress, /* -70 */
-   _crypto, /* -60 */
-   _tortls, /* -50 */
-   _process, /* -35 */
+   _winprocess,
+   _torerr,
+   _wallclock,
+   _threads,
+   _logging,
+   _time,
+   _network,
+   _compress,
+   _crypto,
+   _tortls,
+   _process,
  
-   _orconn_event, /* -33 */
-   _ocirc_event, /* -32 */
-   _btrack, /* -30 */
+   _orconn_event,
+   _ocirc_event,
+   _btrack,
  
 +  _evloop, /* -20 */
 +
-   _mainloop, /* 5 */
-   _or, /* 20 */
+   _mainloop,
+   _or,
  
-   _relay, /* 50 */
+   _relay,
  
  #ifdef HAVE_MODULE_DIRAUTH
-   _dirauth, /* 70 */
+   _dirauth,
  #endif
  };
  



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


[tor-commits] [tor/master] Merge branch 'tor-github/pr/1311'

2019-09-11 Thread dgoulet
commit 049705fc1c9d1c0cee120dc8cbd1a719c6e45e85
Merge: 3b32f2508 39c7f46d3
Author: David Goulet 
Date:   Wed Sep 11 09:36:28 2019 -0400

Merge branch 'tor-github/pr/1311'

 changes/bug31615 |  5 +
 src/app/main/subsystem_list.c| 43 ++--
 src/lib/err/torerr_sys.c |  5 -
 src/lib/log/log_sys.c|  2 ++
 src/lib/net/network_sys.c|  4 +++-
 src/lib/process/winprocess_sys.c |  2 ++
 src/lib/thread/compat_threads.c  |  2 ++
 src/lib/time/time_sys.c  |  4 +++-
 src/lib/wallclock/approx_time.c  |  4 +++-
 9 files changed, 48 insertions(+), 23 deletions(-)

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


[tor-commits] [tor/master] main: add some newlines to the subsystem list, for readability

2019-09-11 Thread dgoulet
commit 39c7f46d363d8a0b0ccb29bc967004160a477dda
Author: teor 
Date:   Tue Sep 10 09:06:36 2019 +1000

main: add some newlines to the subsystem list, for readability
---
 src/app/main/subsystem_list.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index 67cb12363..1af9340c1 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -39,11 +39,14 @@
 const subsys_fns_t *tor_subsystems[] = {
   _winprocess,
   _torerr,
+
   _wallclock,
   _threads,
   _logging,
+
   _time,
   _network,
+
   _compress,
   _crypto,
   _tortls,



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


[tor-commits] [tor/master] main: remove level number comments from the subsystem list (0.4.1)

2019-09-11 Thread dgoulet
commit f1c57cd1e5d8ae88f28f764fef7f17081ebf2961
Author: teor 
Date:   Tue Sep 10 08:44:35 2019 +1000

main: remove level number comments from the subsystem list (0.4.1)

Part of 31615.
---
 src/app/main/subsystem_list.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index c63788715..989b0d6f8 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -52,13 +52,13 @@ const subsys_fns_t *tor_subsystems[] = {
   _ocirc_event,
   _btrack,
 
-  _mainloop, /* 5 */
-  _or, /* 20 */
+  _mainloop,
+  _or,
 
-  _relay, /* 50 */
+  _relay,
 
 #ifdef HAVE_MODULE_DIRAUTH
-  _dirauth, /* 70 */
+  _dirauth,
 #endif
 };
 



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


[tor-commits] [tor/master] main: remove level number comments from the subsystem list (master)

2019-09-11 Thread dgoulet
commit 5fa75a6cd45d81476d5648665717d46a406845bf
Author: teor 
Date:   Tue Sep 10 09:04:38 2019 +1000

main: remove level number comments from the subsystem list (master)

Part of 31615.
---
 src/app/main/subsystem_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index d525708e7..67cb12363 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -53,7 +53,7 @@ const subsys_fns_t *tor_subsystems[] = {
   _ocirc_event,
   _btrack,
 
-  _evloop, /* -20 */
+  _evloop,
 
   _mainloop,
   _or,



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


[tor-commits] [tor/master] subsys: Make the subsystem init order match the module dependencies

2019-09-11 Thread dgoulet
commit 612b0a41399d0ddf260f4f6dd989fcc97d069fbd
Author: teor 
Date:   Wed Sep 4 15:40:57 2019 +1000

subsys: Make the subsystem init order match the module dependencies

Fix levels for subsystems that depend on log/err
* winprocess (security) doesn't use err:
  * call windows process security APIs as early as possible
  * init err after winprocess
  * move wallclock so it's still after err
* network and time depend on log:
  * make sure that network and time can use logging.
  * init network and time after log

Add comments explaining the module init order.

Fixes bug 31615; bugfix on 0.4.0.1-alpha.
---
 changes/bug31615 | 5 +
 src/lib/err/torerr_sys.c | 5 -
 src/lib/log/log_sys.c| 2 ++
 src/lib/net/network_sys.c| 4 +++-
 src/lib/process/winprocess_sys.c | 2 ++
 src/lib/thread/compat_threads.c  | 2 ++
 src/lib/time/time_sys.c  | 4 +++-
 src/lib/wallclock/approx_time.c  | 4 +++-
 8 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/changes/bug31615 b/changes/bug31615
new file mode 100644
index 0..49b13bea9
--- /dev/null
+++ b/changes/bug31615
@@ -0,0 +1,5 @@
+  o Minor bugfixes (subsystems):
+- Make the subsystem init order match the subsystem module dependencies.
+  Call windows process security APIs as early as possible. Init log before
+  network and time, so that network and time can use logging.
+  Fixes bug 31615; bugfix on 0.4.0.1-alpha.
diff --git a/src/lib/err/torerr_sys.c b/src/lib/err/torerr_sys.c
index 3ab1b3c4e..34f70f1f0 100644
--- a/src/lib/err/torerr_sys.c
+++ b/src/lib/err/torerr_sys.c
@@ -33,7 +33,10 @@ subsys_torerr_shutdown(void)
 
 const subsys_fns_t sys_torerr = {
   .name = "err",
-  .level = -100,
+  /* Low-level error handling is a diagnostic feature, we want it to init
+   * right after windows process security, and shutdown last.
+   * (Security never shuts down.) */
+  .level = -99,
   .supported = true,
   .initialize = subsys_torerr_initialize,
   .shutdown = subsys_torerr_shutdown
diff --git a/src/lib/log/log_sys.c b/src/lib/log/log_sys.c
index d1080f226..826358546 100644
--- a/src/lib/log/log_sys.c
+++ b/src/lib/log/log_sys.c
@@ -29,6 +29,8 @@ subsys_logging_shutdown(void)
 const subsys_fns_t sys_logging = {
   .name = "log",
   .supported = true,
+  /* Logging depends on threads, approx time, raw logging, and security.
+   * Most other lib modules depend on logging. */
   .level = -90,
   .initialize = subsys_logging_initialize,
   .shutdown = subsys_logging_shutdown,
diff --git a/src/lib/net/network_sys.c b/src/lib/net/network_sys.c
index 9dfdb2b45..e0a2625d7 100644
--- a/src/lib/net/network_sys.c
+++ b/src/lib/net/network_sys.c
@@ -37,7 +37,9 @@ subsys_network_shutdown(void)
 
 const subsys_fns_t sys_network = {
   .name = "network",
-  .level = -90,
+  /* Network depends on logging, and a lot of other modules depend on network.
+   */
+  .level = -80,
   .supported = true,
   .initialize = subsys_network_initialize,
   .shutdown = subsys_network_shutdown,
diff --git a/src/lib/process/winprocess_sys.c b/src/lib/process/winprocess_sys.c
index 1266babca..407eeaaee 100644
--- a/src/lib/process/winprocess_sys.c
+++ b/src/lib/process/winprocess_sys.c
@@ -58,6 +58,8 @@ subsys_winprocess_initialize(void)
 
 const subsys_fns_t sys_winprocess = {
   .name = "winprocess",
+  /* HeapEnableTerminationOnCorruption and setdeppolicy() are security
+   * features, we want them to run first. */
   .level = -100,
   .supported = WINPROCESS_SYS_ENABLED,
   .initialize = subsys_winprocess_initialize,
diff --git a/src/lib/thread/compat_threads.c b/src/lib/thread/compat_threads.c
index 35cfeba64..1c4a5c4e3 100644
--- a/src/lib/thread/compat_threads.c
+++ b/src/lib/thread/compat_threads.c
@@ -122,6 +122,8 @@ subsys_threads_initialize(void)
 const subsys_fns_t sys_threads = {
   .name = "threads",
   .supported = true,
+  /* Threads is used by logging, which is a diagnostic feature, we want it to
+   * init right after low-level error handling and approx time. */
   .level = -95,
   .initialize = subsys_threads_initialize,
 };
diff --git a/src/lib/time/time_sys.c b/src/lib/time/time_sys.c
index b3feb7b46..8b9aa2856 100644
--- a/src/lib/time/time_sys.c
+++ b/src/lib/time/time_sys.c
@@ -20,7 +20,9 @@ subsys_time_initialize(void)
 
 const subsys_fns_t sys_time = {
   .name = "time",
-  .level = -90,
+  /* Monotonic time depends on logging, and a lot of other modules depend on
+   * monotonic time. */
+  .level = -80,
   .supported = true,
   .initialize = subsys_time_initialize,
 };
diff --git a/src/lib/wallclock/approx_time.c b/src/lib/wallclock/approx_time.c
index 7b3280402..77eeddaf5 100644
--- a/src/lib/wallclock/approx_time.c
+++ b/src/lib/wallclock/approx_time.c
@@ -54,6 +54,8 @@ subsys_wallclock_initialize(void)
 const subsys_fns_t sys_wallclock = {
   .name = "wallclock",
   .supported = true,
-  .level = -99,
+  /* Approximate time is a 

[tor-commits] [tor/master] main: remove level number comments from the subsystem list (0.4.0)

2019-09-11 Thread dgoulet
commit 2e2a35b6943810257b6917648db90ed5d46505e1
Author: teor 
Date:   Tue Sep 10 08:35:56 2019 +1000

main: remove level number comments from the subsystem list (0.4.0)

These levels get out of date really easily: we'll implement a level
dump command in tor in 31614.

They also cause conflicts and inconsistencies when merging forward
level changes.

Part of 31615.
---
 src/app/main/subsystem_list.c | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index 383417618..81b58cf70 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -27,23 +27,25 @@
 
 /**
  * Global list of the subsystems in Tor, in the order of their initialization.
+ * Want to know the exact level numbers?
+ * We'll implement a level dump command in #31614.
  **/
 const subsys_fns_t *tor_subsystems[] = {
-  _winprocess, /* -100 */
-  _torerr, /* -100 */
-  _wallclock, /* -99 */
-  _threads, /* -95 */
-  _logging, /* -90 */
-  _time, /* -90 */
-  _network, /* -90 */
-  _compress, /* -70 */
-  _crypto, /* -60 */
-  _tortls, /* -50 */
-  _process, /* -35 */
+  _winprocess,
+  _torerr,
+  _wallclock,
+  _threads,
+  _logging,
+  _time,
+  _network,
+  _compress,
+  _crypto,
+  _tortls,
+  _process,
 
-  _orconn_event, /* -33 */
-  _ocirc_event, /* -32 */
-  _btrack, /* -30 */
+  _orconn_event,
+  _ocirc_event,
+  _btrack,
 };
 
 const unsigned n_tor_subsystems = ARRAY_LENGTH(tor_subsystems);



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


[tor-commits] [tor/master] Merge branch 'bug31615_040' into bug31615_041

2019-09-11 Thread dgoulet
commit 7e22d9934658c27ba0d45455959f46207a190649
Merge: 4596ead2f 2e2a35b69
Author: teor 
Date:   Tue Sep 10 08:43:13 2019 +1000

Merge branch 'bug31615_040' into bug31615_041

Merged modified lines from bug31615_040, and unmodified lines
from maint-0.4.1.

 changes/bug31615 |  5 +
 src/app/main/subsystem_list.c| 32 +---
 src/lib/err/torerr_sys.c |  5 -
 src/lib/log/log_sys.c|  2 ++
 src/lib/net/network_sys.c|  4 +++-
 src/lib/process/winprocess_sys.c |  2 ++
 src/lib/thread/compat_threads.c  |  2 ++
 src/lib/time/time_sys.c  |  4 +++-
 src/lib/wallclock/approx_time.c  |  4 +++-
 9 files changed, 41 insertions(+), 19 deletions(-)

diff --cc src/app/main/subsystem_list.c
index f59579623,81b58cf70..c63788715
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@@ -32,32 -27,25 +32,34 @@@
  
  /**
   * Global list of the subsystems in Tor, in the order of their initialization.
+  * Want to know the exact level numbers?
+  * We'll implement a level dump command in #31614.
   **/
  const subsys_fns_t *tor_subsystems[] = {
-   _winprocess, /* -100 */
-   _torerr, /* -100 */
-   _wallclock, /* -99 */
-   _threads, /* -95 */
-   _logging, /* -90 */
-   _time, /* -90 */
-   _network, /* -90 */
-   _compress, /* -70 */
-   _crypto, /* -60 */
-   _tortls, /* -50 */
-   _process, /* -35 */
- 
-   _orconn_event, /* -33 */
-   _ocirc_event, /* -32 */
-   _btrack, /* -30 */
+   _winprocess,
+   _torerr,
+   _wallclock,
+   _threads,
+   _logging,
+   _time,
+   _network,
+   _compress,
+   _crypto,
+   _tortls,
+   _process,
+ 
+   _orconn_event,
+   _ocirc_event,
+   _btrack,
 +
 +  _mainloop, /* 5 */
 +  _or, /* 20 */
 +
 +  _relay, /* 50 */
 +
 +#ifdef HAVE_MODULE_DIRAUTH
 +  _dirauth, /* 70 */
 +#endif
  };
  
  const unsigned n_tor_subsystems = ARRAY_LENGTH(tor_subsystems);



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


[tor-commits] [tor/master] build: The is now deprecated on Linux

2019-09-11 Thread asn
commit 409df19b5a0053175f05851086e6ef35c5bce2c0
Author: David Goulet 
Date:   Mon Sep 9 11:55:33 2019 -0400

build: The  is now deprecated on Linux

Closes #31673
---
 changes/ticket31673   | 3 +++
 src/lib/meminfo/meminfo.c | 7 ---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/changes/ticket31673 b/changes/ticket31673
new file mode 100644
index 0..3b2bb4a46
--- /dev/null
+++ b/changes/ticket31673
@@ -0,0 +1,3 @@
+  o New system requirements (build system):
+- Do not include the deprecated  on Linux or Windows system.
+  Closes 31673;
diff --git a/src/lib/meminfo/meminfo.c b/src/lib/meminfo/meminfo.c
index f23318889..f4fa45167 100644
--- a/src/lib/meminfo/meminfo.c
+++ b/src/lib/meminfo/meminfo.c
@@ -18,9 +18,6 @@
 #include "lib/log/log.h"
 #include "lib/malloc/malloc.h"
 
-#ifdef HAVE_SYS_SYSCTL_H
-#include 
-#endif
 #ifdef HAVE_FCNTL_H
 #include 
 #endif
@@ -36,6 +33,10 @@
 #endif
 #include 
 
+#if defined(HAVE_SYS_SYSCTL_H) && !defined(_WIN32) && !defined(__linux__)
+#include 
+#endif
+
 DISABLE_GCC_WARNING(aggregate-return)
 /** Call the platform malloc info function, and dump the results to the log at
  * level severity.  If no such function exists, do nothing. */



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


[tor-commits] [tor/master] Merge branch 'tor-github/pr/1307'

2019-09-11 Thread asn
commit 3b32f2508ca320e63956a3bb746729e1a4fb0190
Merge: e7565855c 409df19b5
Author: George Kadianakis 
Date:   Wed Sep 11 16:19:21 2019 +0300

Merge branch 'tor-github/pr/1307'

 changes/ticket31673   | 3 +++
 src/lib/meminfo/meminfo.c | 7 ---
 2 files changed, 7 insertions(+), 3 deletions(-)

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


[tor-commits] [tor/master] Practracker: only consider files under "src/"

2019-09-11 Thread dgoulet
commit 651bbe8a0d5fbff261a98314b56f57314ea394cd
Author: Nick Mathewson 
Date:   Mon Sep 2 15:31:31 2019 -0400

Practracker: only consider files under "src/"
---
 changes/ticket31578   |  6 ++
 scripts/maint/practracker/practracker.py  |  5 -
 scripts/maint/practracker/test_practracker.sh |  1 +
 scripts/maint/practracker/util.py | 12 +---
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/changes/ticket31578 b/changes/ticket31578
new file mode 100644
index 0..220efffa6
--- /dev/null
+++ b/changes/ticket31578
@@ -0,0 +1,6 @@
+  o Minor bugfixes (practracker):
+- When running check-best-practices, only consider files in the
+  src subdirectory.  Previously we had recursively considered
+  all subdirectories, which made us get confused by the
+  temporary directories made by "make distcheck".  Fixes bug
+  31578; bugfix on 0.4.1.1-alpha.
diff --git a/scripts/maint/practracker/practracker.py 
b/scripts/maint/practracker/practracker.py
index 6483b88da..537f755c8 100755
--- a/scripts/maint/practracker/practracker.py
+++ b/scripts/maint/practracker/practracker.py
@@ -195,6 +195,9 @@ def main(argv):
 help="Maximum lines per function")
 parser.add_argument("--max-dependency-violations", 
default=MAX_DEP_VIOLATIONS,
 help="Maximum number of dependency violations to 
allow")
+parser.add_argument("--include-dir", action="append",
+default=["src"],
+help="A directory (under topdir) to search for source")
 parser.add_argument("topdir", default=".", nargs="?",
 help="Top-level directory for the tor source")
 args = parser.parse_args(argv[1:])
@@ -216,7 +219,7 @@ def main(argv):
 filt.addThreshold(problem.DependencyViolationItem("*", 
int(args.max_dependency_violations)))
 
 # 1) Get all the .c files we care about
-files_list = util.get_tor_c_files(TOR_TOPDIR)
+files_list = util.get_tor_c_files(TOR_TOPDIR, args.include_dir)
 
 # 2) Initialize problem vault and load an optional exceptions file so that
 # we don't warn about the past
diff --git a/scripts/maint/practracker/test_practracker.sh 
b/scripts/maint/practracker/test_practracker.sh
index c878ca558..78e96ba47 100755
--- a/scripts/maint/practracker/test_practracker.sh
+++ b/scripts/maint/practracker/test_practracker.sh
@@ -25,6 +25,7 @@ DATA="${PRACTRACKER_DIR}/testdata"
 
 run_practracker() {
 "${PYTHON:-python}" "${PRACTRACKER_DIR}/practracker.py" \
+--include-dir "" \
 --max-include-count=0 --max-file-size=0 --max-function-size=0 --terse \
 "${DATA}/" "$@";
 }
diff --git a/scripts/maint/practracker/util.py 
b/scripts/maint/practracker/util.py
index 695668f56..854d369f7 100644
--- a/scripts/maint/practracker/util.py
+++ b/scripts/maint/practracker/util.py
@@ -3,22 +3,28 @@ import os
 # We don't want to run metrics for unittests, automatically-generated C files,
 # external libraries or git leftovers.
 EXCLUDE_SOURCE_DIRS = {"src/test/", "src/trunnel/", "src/rust/",
-   "src/ext/", ".git/"}
+   "src/ext/" }
 
 EXCLUDE_FILES = {"orconfig.h"}
 
 def _norm(p):
 return os.path.normcase(os.path.normpath(p))
 
-def get_tor_c_files(tor_topdir):
+def get_tor_c_files(tor_topdir, include_dirs=None):
 """
 Return a list with the .c and .h filenames we want to get metrics of.
 """
 files_list = []
 exclude_dirs = { _norm(os.path.join(tor_topdir, p)) for p in 
EXCLUDE_SOURCE_DIRS }
 
+if include_dirs is None:
+topdirs = [ tor_topdir ]
+else:
+topdirs = [ os.path.join(tor_topdir, inc) for inc in include_dirs ]
 
-for root, directories, filenames in os.walk(tor_topdir):
+# TO THE REVIEWER: I will fix this indentation shortly. -nm
+for topdir in topdirs:
+  for root, directories, filenames in os.walk(topdir):
 # Remove all the directories that are excluded.
 directories[:] = [ d for d in directories
if _norm(os.path.join(root,d)) not in exclude_dirs ]



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


[tor-commits] [tor/master] Merge branch 'ticket31578' into ticket31578_merged

2019-09-11 Thread dgoulet
commit e7565855c0105836857acf9c67363d1f6948e4ac
Merge: 796a9b37e 03040903e
Author: Nick Mathewson 
Date:   Wed Sep 11 08:59:29 2019 -0400

Merge branch 'ticket31578' into ticket31578_merged

 changes/ticket31578   |  6 
 scripts/maint/practracker/metrics.py  |  1 +
 scripts/maint/practracker/practracker.py  |  5 +++-
 scripts/maint/practracker/test_practracker.sh | 10 +--
 scripts/maint/practracker/util.py | 43 +++
 5 files changed, 42 insertions(+), 23 deletions(-)

diff --cc scripts/maint/practracker/practracker.py
index 78003fb78,537f755c8..ce9c5f5d8
--- a/scripts/maint/practracker/practracker.py
+++ b/scripts/maint/practracker/practracker.py
@@@ -218,11 -216,10 +221,11 @@@ def main(argv)
  filt.addThreshold(problem.FileSizeItem("*.h", int(args.max_h_file_size)))
  filt.addThreshold(problem.IncludeCountItem("*.h", 
int(args.max_h_include_count)))
  filt.addThreshold(problem.FunctionSizeItem("*.c", 
int(args.max_function_size)))
 -filt.addThreshold(problem.DependencyViolationItem("*", 
int(args.max_dependency_violations)))
 +filt.addThreshold(problem.DependencyViolationItem("*.c", 
int(args.max_dependency_violations)))
 +filt.addThreshold(problem.DependencyViolationItem("*.h", 
int(args.max_dependency_violations)))
  
  # 1) Get all the .c files we care about
- files_list = util.get_tor_c_files(TOR_TOPDIR)
+ files_list = util.get_tor_c_files(TOR_TOPDIR, args.include_dir)
  
  # 2) Initialize problem vault and load an optional exceptions file so that
  # we don't warn about the past
diff --cc scripts/maint/practracker/test_practracker.sh
index 4f8b7e204,78e96ba47..bfbd0c656
--- a/scripts/maint/practracker/test_practracker.sh
+++ b/scripts/maint/practracker/test_practracker.sh
@@@ -25,9 -25,8 +25,13 @@@ DATA="${PRACTRACKER_DIR}/testdata
  
  run_practracker() {
  "${PYTHON:-python}" "${PRACTRACKER_DIR}/practracker.py" \
- --max-include-count=0 --max-file-size=0 \
- --max-h-include-count=0 --max-h-file-size=0 \
- --max-function-size=0 --terse \
+ --include-dir "" \
 ---max-include-count=0 --max-file-size=0 --max-function-size=0 --terse 
\
++--max-file-size=0 \
++--max-function-size=0 \
++--max-h-file-size=0 \
++--max-h-include-count=0 \
++--max-include-count=0 \
++--terse \
  "${DATA}/" "$@";
  }
  compare() {

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


[tor-commits] [tor/master] practracker: handle empty files.

2019-09-11 Thread dgoulet
commit 03040903e677172ce46319b83f9d00bafb33fad7
Author: Nick Mathewson 
Date:   Mon Sep 2 15:33:59 2019 -0400

practracker: handle empty files.

Previously practracker would fail on a file with no lines.
---
 scripts/maint/practracker/metrics.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/maint/practracker/metrics.py 
b/scripts/maint/practracker/metrics.py
index 9f69b2ac1..4c62bc242 100644
--- a/scripts/maint/practracker/metrics.py
+++ b/scripts/maint/practracker/metrics.py
@@ -8,6 +8,7 @@ import re
 
 def get_file_len(f):
 """Get file length of file"""
+i = -1
 for i, l in enumerate(f):
 pass
 return i + 1



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


[tor-commits] [tor/master] practracker: Fix indentation in util.py

2019-09-11 Thread dgoulet
commit 3a2964577e397319fe89cbba5393818beab665bd
Author: Nick Mathewson 
Date:   Mon Sep 2 15:40:03 2019 -0400

practracker: Fix indentation in util.py

This commit only changes whitespace and removes a temporary comment.
---
 scripts/maint/practracker/util.py | 33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/scripts/maint/practracker/util.py 
b/scripts/maint/practracker/util.py
index 854d369f7..4b4256552 100644
--- a/scripts/maint/practracker/util.py
+++ b/scripts/maint/practracker/util.py
@@ -22,23 +22,22 @@ def get_tor_c_files(tor_topdir, include_dirs=None):
 else:
 topdirs = [ os.path.join(tor_topdir, inc) for inc in include_dirs ]
 
-# TO THE REVIEWER: I will fix this indentation shortly. -nm
 for topdir in topdirs:
-  for root, directories, filenames in os.walk(topdir):
-# Remove all the directories that are excluded.
-directories[:] = [ d for d in directories
-   if _norm(os.path.join(root,d)) not in exclude_dirs ]
-directories.sort()
-filenames.sort()
-for filename in filenames:
-# We only care about .c and .h files
-if not (filename.endswith(".c") or filename.endswith(".h")):
-continue
-if filename in EXCLUDE_FILES:
-continue
-
-full_path = os.path.join(root,filename)
-
-files_list.append(full_path)
+for root, directories, filenames in os.walk(topdir):
+# Remove all the directories that are excluded.
+directories[:] = [ d for d in directories
+   if _norm(os.path.join(root,d)) not in 
exclude_dirs ]
+directories.sort()
+filenames.sort()
+for filename in filenames:
+# We only care about .c and .h files
+if not (filename.endswith(".c") or filename.endswith(".h")):
+continue
+if filename in EXCLUDE_FILES:
+continue
+
+full_path = os.path.join(root,filename)
+
+files_list.append(full_path)
 
 return files_list



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


[tor-commits] [translation/tor-launcher-network-settings] https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-network-settings

2019-09-11 Thread translation
commit 2e8cbf09637c4117087054a57dfebfa85e50d67a
Author: Translation commit bot 
Date:   Wed Sep 11 12:22:57 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-network-settings
---
 zh_TW/network-settings.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/zh_TW/network-settings.dtd b/zh_TW/network-settings.dtd
index 520eba104..3fff34e92 100644
--- a/zh_TW/network-settings.dtd
+++ b/zh_TW/network-settings.dtd
@@ -55,8 +55,8 @@
 
 
 
-
-
+
+
 
 
-
+

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


[tor-commits] [translation/tor-launcher-properties_completed] https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-properties_completed

2019-09-11 Thread translation
commit dfcfff37e396dbc39de9cfdede5cead18dfef2e3
Author: Translation commit bot 
Date:   Wed Sep 11 12:22:52 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-properties_completed
---
 zh_TW/torlauncher.properties | 158 +--
 1 file changed, 79 insertions(+), 79 deletions(-)

diff --git a/zh_TW/torlauncher.properties b/zh_TW/torlauncher.properties
index 12f03d97d..c5c638305 100644
--- a/zh_TW/torlauncher.properties
+++ b/zh_TW/torlauncher.properties
@@ -1,94 +1,94 @@
 ### Copyright (c) 2016, The Tor Project, Inc.
 ### See LICENSE for licensing information.
 
-torlauncher.error_title=洋蔥路由啟動工具
+# torlauncher.error_title=Tor Launcher
 
-torlauncher.tor_exited_during_startup=洋蔥路由程式在啟動過程中意外終止。這可能是由
 torcc 設定檔的錯誤、洋蔥路由程式、å…
¶ä»–系統程式的漏洞或是硬體缺陷造成。必須å…
ˆè§£æ±ºæ½›åœ¨çš„問題並重啟洋蔥路由程式,洋蔥路由瀏覽器才能å¤
 å•Ÿå‹•ã€‚
-torlauncher.tor_exited=洋蔥路由程式意外地中止了。這有可能是洋蔥路由本身的程式錯誤、您系統上的å
…¶å®ƒç¨‹å¼æˆ–是硬體故
障。除非您重新啟動洋蔥路由,否則洋蔥路由瀏覽器將無法連接上任何網站。如果此問題持續發生,請發複製並發送您的洋蔥路由歷程紀錄到支援團隊。
-torlauncher.tor_exited2=重新啟動洋蔥路由將不會關閉您瀏覽器的分é
 ã€‚
-torlauncher.tor_controlconn_failed=無法連接至洋蔥路由控制連接埠
。
-torlauncher.tor_failed_to_start=洋蔥路由無法啟動。
-torlauncher.tor_control_failed=無法控制洋蔥路由。
-torlauncher.tor_bootstrap_failed=洋蔥路由系統無法建立起通往洋蔥路由網路的連線。
-torlauncher.tor_bootstrap_failed_details=%1$S 失敗 (%2$S)。
+# torlauncher.tor_exited_during_startup=Tor exited during startup. This might 
be due to an error in your torrc file, a bug in Tor or another program on your 
system, or faulty hardware. Until you fix the underlying problem and restart 
Tor, Tor Browser will not start.
+# torlauncher.tor_exited=Tor unexpectedly exited. This might be due to a bug 
in Tor itself, another program on your system, or faulty hardware. Until you 
restart Tor, the Tor Browser will not able to reach any websites. If the 
problem persists, please send a copy of your Tor Log to the support team.
+# torlauncher.tor_exited2=Restarting Tor will not close your browser tabs.
+# torlauncher.tor_controlconn_failed=Could not connect to Tor control port.
+# torlauncher.tor_failed_to_start=Tor failed to start.
+# torlauncher.tor_control_failed=Failed to take control of Tor.
+# torlauncher.tor_bootstrap_failed=Tor failed to establish a Tor network 
connection.
+# torlauncher.tor_bootstrap_failed_details=%1$S failed (%2$S).
 
-torlauncher.unable_to_start_tor=無法啟動洋蔥路由。\n\n%S
-torlauncher.tor_missing=洋蔥路由可執行檔遺失。
-torlauncher.torrc_missing=洋蔥路由的é…
ç½®æ–‡ä»¶éºå¤±è€Œä¸”無法創建。
-torlauncher.datadir_missing=洋蔥路由的資料路徑並不存在,且無法被創建。
-torlauncher.password_hash_missing=無法取得雜湊過的密碼。
+# torlauncher.unable_to_start_tor=Unable to start Tor.\n\n%S
+# torlauncher.tor_missing=The Tor executable is missing.
+# torlauncher.torrc_missing=The torrc file is missing and could not be created.
+# torlauncher.datadir_missing=The Tor data directory does not exist and could 
not be created.
+# torlauncher.password_hash_missing=Failed to get hashed password.
 
-torlauncher.failed_to_get_settings=無法擷取洋蔥路由設定。\n\n%S
-torlauncher.failed_to_save_settings=無法儲存洋蔥路由的設定。\n\n%S
-torlauncher.ensure_tor_is_running=請確定洋蔥路由正在執行。
+# torlauncher.failed_to_get_settings=Unable to retrieve Tor settings.\n\n%S
+# torlauncher.failed_to_save_settings=Unable to save Tor settings.\n\n%S
+# torlauncher.ensure_tor_is_running=Please ensure that Tor is running.
 
-torlauncher.error_proxy_addr_missing=您必須指定一個 IP 
位址或主機名稱以及連接埠號碼,才能夠
讓洋蔥路由使用代理伺服器來存取網路。
-torlauncher.error_proxy_type_missing=您必須選擇代理伺服器類型。
-torlauncher.error_bridges_missing=您必須指定一個或多個橋接。
-torlauncher.error_default_bridges_type_missing=您必é 
ˆç‚ºè©²æ©‹æŽ¥å™¨é¸æ“‡ä¸€ç¨®å‚³è¼¸é¡žåž‹ã€‚
-torlauncher.error_bridgedb_bridges_missing=請請求一個bridge
-torlauncher.error_bridge_bad_default_type=沒有提供傳輸類型為 %S 
的橋接器。請調整您的設定。
+# torlauncher.error_proxy_addr_missing=You must specify both an IP address or 
hostname and a port number to configure Tor to use a proxy to access the 
Internet.
+# torlauncher.error_proxy_type_missing=You must select the proxy type.
+# torlauncher.error_bridges_missing=You must specify one or more bridges.
+# 

[tor-commits] [translation/tor-launcher-properties] https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-properties

2019-09-11 Thread translation
commit 340d64d48711fc6e714b641b912a92241a5d5816
Author: Translation commit bot 
Date:   Wed Sep 11 12:22:45 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-properties
---
 zh_TW/torlauncher.properties | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/zh_TW/torlauncher.properties b/zh_TW/torlauncher.properties
index 12f03d97d..47124e52b 100644
--- a/zh_TW/torlauncher.properties
+++ b/zh_TW/torlauncher.properties
@@ -15,7 +15,7 @@ torlauncher.tor_bootstrap_failed_details=%1$S 失敗 (%2$S)。
 torlauncher.unable_to_start_tor=無法啟動洋蔥路由。\n\n%S
 torlauncher.tor_missing=洋蔥路由可執行檔遺失。
 torlauncher.torrc_missing=洋蔥路由的é…
ç½®æ–‡ä»¶éºå¤±è€Œä¸”無法創建。
-torlauncher.datadir_missing=洋蔥路由的資料路徑並不存在,且無法被創建。
+torlauncher.datadir_missing=洋蔥路由的資料夾不存在,且無法被創建。
 torlauncher.password_hash_missing=無法取得雜湊過的密碼。
 
 torlauncher.failed_to_get_settings=無法擷取洋蔥路由設定。\n\n%S
@@ -26,20 +26,20 @@ torlauncher.error_proxy_addr_missing=您必須指定一個 
IP 位址或主機名
 torlauncher.error_proxy_type_missing=您必須選擇代理伺服器類型。
 torlauncher.error_bridges_missing=您必須指定一個或多個橋接。
 torlauncher.error_default_bridges_type_missing=您必é 
ˆç‚ºè©²æ©‹æŽ¥å™¨é¸æ“‡ä¸€ç¨®å‚³è¼¸é¡žåž‹ã€‚
-torlauncher.error_bridgedb_bridges_missing=請請求一個bridge
+torlauncher.error_bridgedb_bridges_missing=請請求一個橋接
 torlauncher.error_bridge_bad_default_type=沒有提供傳輸類型為 %S 
的橋接器。請調整您的設定。
 
 torlauncher.bridge_suffix.meek-amazon=(能在中國使用)
 torlauncher.bridge_suffix.meek-azure=(能在中國使用)
 
-torlauncher.request_a_bridge=請求一個bridge...
-torlauncher.request_a_new_bridge=請求一個新的bridge...
-torlauncher.contacting_bridgedb=連接到BridgeDB, 請等待。
+torlauncher.request_a_bridge=請求一個橋接...
+torlauncher.request_a_new_bridge=請求一個新的橋接...
+torlauncher.contacting_bridgedb=正在連接到 BridgeDB,請稍等。
 torlauncher.captcha_prompt=解決驗證碼來請求橋接
 torlauncher.bad_captcha_solution=解答不正確。請再試一次。
 torlauncher.unable_to_get_bridge=無法從 BridgeDB 獲得橋接。\n\n%S
 torlauncher.no_meek=此瀏覽器沒有設定好 
meek,獲得橋接需要使用它。
-torlauncher.no_bridges_available=抱歉,現在沒有可以使用的bridge
+torlauncher.no_bridges_available=抱歉,現在沒有可以使用的橋接。
 
 torlauncher.connect=連線
 torlauncher.restart_tor=重新啟動洋蔥路由

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


[tor-commits] [translation/snowflake-website-indexhtml] https://gitweb.torproject.org/translation.git/commit/?h=snowflake-website-indexhtml

2019-09-11 Thread translation
commit c9b5f9895bedb910952e970feb51b5f9d82db5f8
Author: Translation commit bot 
Date:   Wed Sep 11 12:17:17 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=snowflake-website-indexhtml
---
 zh_TW/index.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/zh_TW/index.html b/zh_TW/index.html
index 628572a4b..81af30698 100644
--- a/zh_TW/index.html
+++ b/zh_TW/index.html
@@ -62,11 +62,11 @@
   to let us know how which part of the Snowflake system is experiencing
   problems.
 
-  EMBED
+  嵌入
 
-  It is now possible to embed the Snowflake badge on any website:
+  現在可以嵌入 Snowflake 徽章到任何網站:
 
-  iframe 
src="https://snowflake.torproject.org/embed.html; width="320px" height="200px" 
frameborder="0" scrolling="no"/iframeWhich looks like 
this:
+  iframe 
src="https://snowflake.torproject.org/embed.html; width="320px" height="200px" 
frameborder="0" 
scrolling="no"/iframe看起來像這樣:
 
   
 

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


[tor-commits] [translation/orfox-stringsxml_completed] https://gitweb.torproject.org/translation.git/commit/?h=orfox-stringsxml_completed

2019-09-11 Thread translation
commit 44c982059348f3fa52687ff10c9199a3c717118e
Author: Translation commit bot 
Date:   Wed Sep 11 12:16:54 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=orfox-stringsxml_completed
---
 zh-TW/strings.xml | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/zh-TW/strings.xml b/zh-TW/strings.xml
index 04bd0f2fd..cb5acbb4f 100644
--- a/zh-TW/strings.xml
+++ b/zh-TW/strings.xml
@@ -1,9 +1,2 @@
 
-OrfoxRIP
-試試洋蔥路由瀏覽器
-Orfox 現在是用於 Android 
的洋蔥路由瀏覽器。
-從您偏好的來源來獲取:
-前往 F-DROID
-前往 GOOGLE PLAY
-下載 .APK
-
+

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


[tor-commits] [translation/orfox-stringsxml] https://gitweb.torproject.org/translation.git/commit/?h=orfox-stringsxml

2019-09-11 Thread translation
commit 3142ae9d3718d4f87a615abe777ac997cbf7ffe8
Author: Translation commit bot 
Date:   Wed Sep 11 12:16:48 2019 +

https://gitweb.torproject.org/translation.git/commit/?h=orfox-stringsxml
---
 zh-TW/strings.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/zh-TW/strings.xml b/zh-TW/strings.xml
index dfc0fb036..a7d502a13 100644
--- a/zh-TW/strings.xml
+++ b/zh-TW/strings.xml
@@ -6,4 +6,5 @@
 前往 F-DROID
 前往 GOOGLE PLAY
 下載 .APK
-
+匯出書籤
+

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


[tor-commits] [translation/tor-launcher-network-settings] https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-network-settings

2019-09-11 Thread translation
commit fb723de5b4e05277f8c628b4e9101f6b7bd0ea4a
Author: Translation commit bot 
Date:   Wed Sep 11 11:53:37 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-network-settings
---
 zh_TW/network-settings.dtd | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/zh_TW/network-settings.dtd b/zh_TW/network-settings.dtd
index 464c60a76..520eba104 100644
--- a/zh_TW/network-settings.dtd
+++ b/zh_TW/network-settings.dtd
@@ -1,5 +1,5 @@
 
-
+
 
 
 
@@ -10,7 +10,7 @@
 
 
 
-
+
 
 
 
@@ -36,12 +36,12 @@
 
 
 
-
+
 
 
 
-
-
+
+
 
 
 

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


[tor-commits] [translation/tor-launcher-network-settings_completed] https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-network-settings_completed

2019-09-11 Thread translation
commit b38d32dd14fa53219be2a2a85c99bc37c76e3223
Author: Translation commit bot 
Date:   Wed Sep 11 11:53:44 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=tor-launcher-network-settings_completed
---
 zh_TW/network-settings.dtd | 104 ++---
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/zh_TW/network-settings.dtd b/zh_TW/network-settings.dtd
index 464c60a76..1e0a75666 100644
--- a/zh_TW/network-settings.dtd
+++ b/zh_TW/network-settings.dtd
@@ -1,62 +1,62 @@
-
-
-
-
+
+
+
+
 
 
-
-
+
+
 
 
 
-
-
-
-
+
+
+
+
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
-
+

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


[tor-commits] [translation/torbutton-torbuttondtd_completed] https://gitweb.torproject.org/translation.git/commit/?h=torbutton-torbuttondtd_completed

2019-09-11 Thread translation
commit 022b710d8baf444e4d89904642dedb31639c1453
Author: Translation commit bot 
Date:   Wed Sep 11 11:52:12 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=torbutton-torbuttondtd_completed
---
 zh-TW/torbutton.dtd | 82 ++---
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/zh-TW/torbutton.dtd b/zh-TW/torbutton.dtd
index 7868343e3..4a80e6d6c 100644
--- a/zh-TW/torbutton.dtd
+++ b/zh-TW/torbutton.dtd
@@ -1,41 +1,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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


[tor-commits] [translation/torbutton-torbuttondtd] https://gitweb.torproject.org/translation.git/commit/?h=torbutton-torbuttondtd

2019-09-11 Thread translation
commit 3312176eee391473cf738e868657efed13fe0e4c
Author: Translation commit bot 
Date:   Wed Sep 11 11:52:03 2019 +


https://gitweb.torproject.org/translation.git/commit/?h=torbutton-torbuttondtd
---
 zh-TW/torbutton.dtd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/zh-TW/torbutton.dtd b/zh-TW/torbutton.dtd
index 7868343e3..2839961a1 100644
--- a/zh-TW/torbutton.dtd
+++ b/zh-TW/torbutton.dtd
@@ -34,8 +34,8 @@
 
 
 
-
-
+
+
 
 
 

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


[tor-commits] [tpo/master] Fix "Steate" to "State of MA"

2019-09-11 Thread emmapeel
commit d585f84c6471f89219384d155a9abb6ea1b10a13
Author: Gustavo Gus 
Date:   Wed Sep 11 08:18:33 2019 +

Fix "Steate" to "State of MA"

Second issue on #29945
---
 content/about/reports/2013-form-pc/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/about/reports/2013-form-pc/contents.lr 
b/content/about/reports/2013-form-pc/contents.lr
index 25717ed..b24caac 100644
--- a/content/about/reports/2013-form-pc/contents.lr
+++ b/content/about/reports/2013-form-pc/contents.lr
@@ -6,7 +6,7 @@ date: 2013
 ---
 tags: AUDIT
 ---
-title: 2013 Steate of MA Form PC
+title: 2013 State of MA Form PC
 ---
 _hidden: yes
 ---



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


[tor-commits] [tpo/master] Fix typo "Steate" to "State of MA"

2019-09-11 Thread emmapeel
commit 9e8bd6e134899443baf61d5c7101950dacc2bc18
Merge: 0c73159 d585f84
Author: emma peel 
Date:   Wed Sep 11 13:10:36 2019 +0200

Fix typo "Steate" to "State of MA"

 content/about/reports/2013-form-pc/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [tpo/master] Fix typo "Steate" to "State of MA"

2019-09-11 Thread emmapeel
commit 0c73159f2762b2babded3572cf1125dd871cdd4d
Merge: a6c4f52 b04d1a6
Author: emma peel 
Date:   Wed Sep 11 13:05:21 2019 +0200

Fix typo "Steate" to "State of MA"

 content/about/reports/2012-form-pc/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [tpo/master] Fix "Steate" to "State of MA"

2019-09-11 Thread emmapeel
commit b04d1a69cb5b80bb3e0ed825500f694f1a4d5da8
Author: Gustavo Gus 
Date:   Wed Sep 11 08:20:14 2019 +

Fix "Steate" to "State of MA"

Fix second issue on #29945
---
 content/about/reports/2012-form-pc/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/about/reports/2012-form-pc/contents.lr 
b/content/about/reports/2012-form-pc/contents.lr
index 7a4ac7b..4adebdc 100644
--- a/content/about/reports/2012-form-pc/contents.lr
+++ b/content/about/reports/2012-form-pc/contents.lr
@@ -6,7 +6,7 @@ date: 2012
 ---
 tags: AUDIT
 ---
-title: 2012 Steate of MA Form PC
+title: 2012 State of MA Form PC
 ---
 _hidden: yes
 ---



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


[tor-commits] [tor-browser-build/master] Merge remote-tracking branch 'gk/bug_31596'

2019-09-11 Thread boklm
commit 4e92d40f4cee86426752aa21f7ddbb102be9d0c9
Merge: f08dbd5 3ea80a4
Author: Nicolas Vigier 
Date:   Wed Sep 11 13:02:09 2019 +0200

Merge remote-tracking branch 'gk/bug_31596'

 projects/mingw-w64-clang/31567_1.patch | 33 --
 projects/mingw-w64-clang/31567_2.patch | 82 --
 projects/mingw-w64-clang/build |  3 +-
 projects/mingw-w64-clang/config|  4 +-
 projects/mingw-w64/config  |  2 +-
 5 files changed, 3 insertions(+), 121 deletions(-)

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


[tor-commits] [tor-browser-build/master] Bug 31596: Bump mingw-w64 version for fix for #31567

2019-09-11 Thread boklm
commit 3ea80a42a85edc5e931cd241218cc5f0f2ff5b57
Author: Georg Koppen 
Date:   Tue Sep 3 06:22:58 2019 +

Bug 31596: Bump mingw-w64 version for fix for #31567
---
 projects/mingw-w64-clang/31567_1.patch | 33 --
 projects/mingw-w64-clang/31567_2.patch | 82 --
 projects/mingw-w64-clang/build |  3 +-
 projects/mingw-w64-clang/config|  4 +-
 projects/mingw-w64/config  |  2 +-
 5 files changed, 3 insertions(+), 121 deletions(-)

diff --git a/projects/mingw-w64-clang/31567_1.patch 
b/projects/mingw-w64-clang/31567_1.patch
deleted file mode 100644
index be316ee..000
--- a/projects/mingw-w64-clang/31567_1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From d9c7a5aa3ac8d29b98f28af71d862c2d3931e7d8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= 
-Date: Sun, 1 Sep 2019 06:05:40 +
-Subject: [PATCH 1/2] This function was moved from inline in header to a
- statically linked one in 52a34d52d6f5f1789d329abd4e, where the use of this
- define was dropped.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-As this function is statically linked, the caller can't control
-and change the behaviour of the function by defining
-UCRTBASE_PRINTF_DEFAULT_WIDE in the calling translation unit,
-but we should at least use the headers' default value (which currently
-is zero).
-
-Signed-off-by: Martin Storsjö 
-
-diff --git a/mingw-w64-crt/stdio/ucrt__vsnwprintf.c 
b/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
-index bf9f4de2..c505c31e 100644
 a/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
-+++ b/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
-@@ -10,6 +10,6 @@
- 
- int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const 
wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- {
--  return 
__stdio_common_vswprintf(UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, 
_Dest, _Count, _Format, NULL, _Args);
-+  return __stdio_common_vswprintf(UCRTBASE_PRINTF_DEFAULT_WIDE | 
UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, 
_Args);
- }
- int __cdecl (*__MINGW_IMP_SYMBOL(_vsnwprintf))(wchar_t *__restrict__, size_t, 
const wchar_t *__restrict__, va_list) = _vsnwprintf;
--- 
-2.23.0.rc1
-
diff --git a/projects/mingw-w64-clang/31567_2.patch 
b/projects/mingw-w64-clang/31567_2.patch
deleted file mode 100644
index 12070aa..000
--- a/projects/mingw-w64-clang/31567_2.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 44d0691f6fa51d2b3a0df911652c801635424e4e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= 
-Date: Sun, 1 Sep 2019 06:08:24 +
-Subject: [PATCH 2/2] When __USE_MINGW_ANSI_STDIO is defined, we still call the
- custom implementation bundled in libmingwex, which has the C99 standard
- semantics for %s in wide format strings.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This matches how the wide stdio functions behave both when using
-msvcrt.dll, and in all versions of MSVC, even the modern ones that
-use ucrt.
-
-Signed-off-by: Martin Storsjö 
-
-diff --git a/mingw-w64-headers/crt/conio.h b/mingw-w64-headers/crt/conio.h
-index 363203c3..a92ee059 100644
 a/mingw-w64-headers/crt/conio.h
-+++ b/mingw-w64-headers/crt/conio.h
-@@ -21,12 +21,13 @@
- #define UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS(0x0002)
- #define UCRTBASE_SCANF_LEGACY_MSVCRT_COMPATIBILITY   (0x0004)
- 
--// Default wide printfs and scanfs to the standard mode
-+// Default wide printfs and scanfs to the legacy wide mode. Only code built
-+// with -D__USE_MINGW_ANSI_STDIO=1 will expect the standard behaviour.
- #ifndef UCRTBASE_PRINTF_DEFAULT_WIDE
--#define UCRTBASE_PRINTF_DEFAULT_WIDE 0
-+#define UCRTBASE_PRINTF_DEFAULT_WIDE UCRTBASE_PRINTF_LEGACY_WIDE_SPECIFIERS
- #endif
- #ifndef UCRTBASE_SCANF_DEFAULT_WIDE
--#define UCRTBASE_SCANF_DEFAULT_WIDE 0
-+#define UCRTBASE_SCANF_DEFAULT_WIDE UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS
- #endif
- #endif
- 
-diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
-index e183236d..e8d3c857 100644
 a/mingw-w64-headers/crt/stdio.h
-+++ b/mingw-w64-headers/crt/stdio.h
-@@ -147,12 +147,13 @@ extern FILE (* __MINGW_IMP_SYMBOL(_iob))[];  /* A 
pointer to an array of FILE */
- #define UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS(0x0002)
- #define UCRTBASE_SCANF_LEGACY_MSVCRT_COMPATIBILITY   (0x0004)
- 
--// Default wide printfs and scanfs to the standard mode
-+// Default wide printfs and scanfs to the legacy wide mode. Only code built
-+// with -D__USE_MINGW_ANSI_STDIO=1 will expect the standard behaviour.
- #ifndef UCRTBASE_PRINTF_DEFAULT_WIDE
--#define UCRTBASE_PRINTF_DEFAULT_WIDE 0
-+#define UCRTBASE_PRINTF_DEFAULT_WIDE UCRTBASE_PRINTF_LEGACY_WIDE_SPECIFIERS
- #endif
- #ifndef UCRTBASE_SCANF_DEFAULT_WIDE
--#define UCRTBASE_SCANF_DEFAULT_WIDE 0
-+#define UCRTBASE_SCANF_DEFAULT_WIDE UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS
- #endif
- 

[tor-commits] [tor-browser/tor-browser-68.1.0esr-9.0-2] fixup! TB4: Tor Browser's Firefox preference overrides.

2019-09-11 Thread gk
commit e489c5048b762b3226db23b6ea9ffc440617615e
Author: Alex Catarineu 
Date:   Mon Sep 9 17:49:40 2019 +0200

fixup! TB4: Tor Browser's Firefox preference overrides.

Bug 31601: Disable recommended extensions again
---
 browser/app/profile/000-tor-browser.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/browser/app/profile/000-tor-browser.js 
b/browser/app/profile/000-tor-browser.js
index 81352dcbaece..b2cecfdb1a82 100644
--- a/browser/app/profile/000-tor-browser.js
+++ b/browser/app/profile/000-tor-browser.js
@@ -273,8 +273,9 @@ pref("xpinstall.whitelist.add", "");
 pref("xpinstall.whitelist.add.36", "");
 // We don't know what extensions Mozilla is advertising to our users and we
 // don't want to have some random Google Analytics script running either on the
-// about:addons page, see bug 22073 and 22900.
+// about:addons page, see bug 22073, 22900 and 31601.
 pref("extensions.getAddons.showPane", false);
+pref("extensions.htmlaboutaddons.recommendations.enabled", false);
 // Show our legacy extensions directly on about:addons and get rid of the
 // warning for the default theme.
 pref("extensions.legacy.exceptions", 
"{972ce4c6-7e08-4474-a285-3208198ce6fd},torbut...@torproject.org");

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


[tor-commits] [tpo/master] Replace link to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit a6c4f524daf95ab11ed17e81551dc0ea2c98931e
Merge: 83b23b6 d83f7be
Author: emma peel 
Date:   Wed Sep 11 12:56:43 2019 +0200

Replace link to "How to report bugs or feedback"

 content/download/alpha/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [tpo/master] Find and replace all links to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit d83f7beb07eece2cbd221abd92dae295e7b15de8
Author: sabita <35147757+sabita...@users.noreply.github.com>
Date:   Sat Sep 7 12:33:49 2019 +0530

Find and replace all links to "How to report bugs or feedback"

Fixes part of https://dip.torproject.org/web/support/issues/39
---
 content/download/alpha/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/download/alpha/contents.lr 
b/content/download/alpha/contents.lr
index 7f490e2..415cbef 100644
--- a/content/download/alpha/contents.lr
+++ b/content/download/alpha/contents.lr
@@ -13,4 +13,4 @@ title: Download Tor Browser Alpha
 body:
 
 Before we release a stable version of our software, we release an alpha 
version to test features and find bugs.
-Please only download an alpha if you are okay with some things not working 
properly, want to help us find and [report 
bugs](https://trac.torproject.org/projects/tor/wiki/doc/community/HowToReportBugFeedback),
 and are not putting yourself at risk.
+Please only download an alpha if you are okay with some things not working 
properly, want to help us find and [report 
bugs](https://support.torproject.org/misc/bug-or-feedback/), and are not 
putting yourself at risk.



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


[tor-commits] [tpo/master] Replace link to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit 83b23b6e9e43c7ef8308ea404dc790910319836a
Merge: 003b828 0dc1c2c
Author: emma peel 
Date:   Wed Sep 11 12:53:49 2019 +0200

Replace link to "How to report bugs or feedback"

 templates/macros/question.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [tpo/master] Find and replace all links to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit 0dc1c2c7aaf8c7a62f6112e087646509305c1339
Author: sabita <35147757+sabita...@users.noreply.github.com>
Date:   Sat Sep 7 12:35:53 2019 +0530

Find and replace all links to "How to report bugs or feedback"

Fixes part of https://dip.torproject.org/web/support/issues/39
---
 templates/macros/question.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/macros/question.html b/templates/macros/question.html
index 1b5fa59..4de15ac 100644
--- a/templates/macros/question.html
+++ b/templates/macros/question.html
@@ -12,7 +12,7 @@
  
  
https://github.com/torproject/tpo/edit/master/content{{ 
item.path }}/contents.lr">{{ _("Edit this page") }} -
-   https://trac.torproject.org/projects/tor/wiki/doc/community/HowToReportBugFeedback;>{{
 _("Suggest Feedback") }} -
+   https://support.torproject.org/misc/bug-or-feedback/;>{{ 
_("Suggest Feedback") }} -
{{ 
_("Permalink") }}
   




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


[tor-commits] [tpo/master] replace link to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit 003b8280668fdc791a07dcb3dc56d291977345eb
Merge: 4f51cb4 6368b1b
Author: emma peel 
Date:   Wed Sep 11 12:51:31 2019 +0200

replace link to "How to report bugs or feedback"

 templates/macros/footer.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [tpo/master] Update trademark FAQ link in footer

2019-09-11 Thread emmapeel
commit 6368b1b91f9cf373048c9f13d1af091c5389f72d
Author: sabita <35147757+sabita...@users.noreply.github.com>
Date:   Sun Sep 8 07:37:56 2019 +0530

Update trademark FAQ link in footer

will-fix https://dip.torproject.org/web/tpo/issues/39 partly
---
 templates/macros/footer.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/macros/footer.html b/templates/macros/footer.html
index 90b9dfd..e3c90c8 100644
--- a/templates/macros/footer.html
+++ b/templates/macros/footer.html
@@ -1,3 +1,3 @@
 {% macro render_faq() %}
-  https://www.torproject.org/docs/trademark-faq; target="_blank" 
class="text-primary text-light">FAQ
+  https://www.torproject.org/about/trademark/; target="_blank" 
class="text-primary text-light">FAQ
 {% endmacro %}



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


[tor-commits] [tpo/master] replace link to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit 4f51cb429be74696ddfa54aba40e53cac1f672e7
Merge: 4bdc8bb cce3a1c
Author: emma peel 
Date:   Wed Sep 11 12:50:09 2019 +0200

replace link to "How to report bugs or feedback"
close https://github.com/torproject/tpo/pull/57

 templates/contact.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [tpo/master] Find and replace all links to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit cce3a1c4e978c767ed1d5ce90876a89815beb758
Author: sabita <35147757+sabita...@users.noreply.github.com>
Date:   Sat Sep 7 12:50:18 2019 +0530

Find and replace all links to "How to report bugs or feedback"

Fixes part of https://dip.torproject.org/web/support/issues/39
---
 templates/contact.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/contact.html b/templates/contact.html
index bd87b90..7860217 100644
--- a/templates/contact.html
+++ b/templates/contact.html
@@ -60,7 +60,7 @@
 
   
   
-https://trac.torproject.org/projects/tor/wiki/doc/community/HowToReportBugFeedback;
 target="_blank">{{ _('Report a bug or give feedback.') }}
+https://support.torproject.org/misc/bug-or-feedback/; target="_blank">{{ 
_('Report a bug or give feedback.') }}
 {{ _('Tor relies on the support of users and 
volunteers around the world to help us improve our software and resources, so 
your feedback is extremely valuable to us (and to all Tor users).') }}
   
   



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


[tor-commits] [tpo/master] Add links to download Tor Browser for Android

2019-09-11 Thread hiro
commit 2da1ff9871a74767905b60eb42ba5b069d53
Author: RotationMatrix <52428419+rotationmat...@users.noreply.github.com>
Date:   Fri Sep 6 11:42:19 2019 -0400

Add links to download Tor Browser for Android
---
 databags/download-tb-for-android-alpha.ini | 14 ++
 templates/download-options.html| 18 ++
 2 files changed, 32 insertions(+)

diff --git a/databags/download-tb-for-android-alpha.ini 
b/databags/download-tb-for-android-alpha.ini
new file mode 100644
index 000..5006897
--- /dev/null
+++ b/databags/download-tb-for-android-alpha.ini
@@ -0,0 +1,14 @@
+[Google Play]
+url = 
https://play.google.com/store/apps/details?id=org.torproject.torbrowser_alpha
+
+[arch64]
+url = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-aarch64-multi.apk
+sig = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-aarch64-multi.apk.asc
+
+[arm]
+url = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-armv7-multi.apk
+sig = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-armv7-multi.apk.asc
+
+[x86]
+url = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-x86-multi.apk
+sig = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-x86-multi.apk.asc
diff --git a/templates/download-options.html b/templates/download-options.html
index 8698e73..c515669 100644
--- a/templates/download-options.html
+++ b/templates/download-options.html
@@ -36,4 +36,22 @@
   
 
   
+  
+
+  
+
+  Tor Browser for Android Alpha
+
+  
+  
+{% for id, item in bag('download-tb-for-android-alpha').items() %}
+  
+
+  {{ id }}{% if item.sig %} (sig){% endif %}
+
+  
+{% endfor %}
+  
+
+  
 



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


[tor-commits] [tpo/master] Merge remote-tracking branch 'rotmatrix/fix-34-android-alpha-downloads'

2019-09-11 Thread hiro
commit 4bdc8bbc052a2d5e8ab89e9fcc800048122004ef
Merge: b23afc4 7d80531
Author: hiro 
Date:   Wed Sep 11 12:38:28 2019 +0200

Merge remote-tracking branch 'rotmatrix/fix-34-android-alpha-downloads'
Add links to download Tor Browser for Android Alpha

 templates/download-options.html | 32 
 templates/macros/downloads.html |  7 +++
 2 files changed, 39 insertions(+)

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


[tor-commits] [tpo/master] Replace databag with macro

2019-09-11 Thread hiro
commit 7d805317583586b4c2006c8972c4c235a1caebe5
Author: RotationMatrix <52428419+rotationmat...@users.noreply.github.com>
Date:   Sat Sep 7 08:15:45 2019 -0400

Replace databag with macro

Generate Android links with a macro instead of hard-coding in a databag.
---
 databags/download-tb-for-android-alpha.ini | 14 --
 templates/download-options.html| 28 +---
 templates/macros/downloads.html|  7 +++
 3 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/databags/download-tb-for-android-alpha.ini 
b/databags/download-tb-for-android-alpha.ini
deleted file mode 100644
index 5006897..000
--- a/databags/download-tb-for-android-alpha.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[Google Play]
-url = 
https://play.google.com/store/apps/details?id=org.torproject.torbrowser_alpha
-
-[arch64]
-url = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-aarch64-multi.apk
-sig = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-aarch64-multi.apk.asc
-
-[arm]
-url = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-armv7-multi.apk
-sig = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-armv7-multi.apk.asc
-
-[x86]
-url = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-x86-multi.apk
-sig = 
https://dip.torproject.org/web/tpo/master/tor-browser-9.0a6-android-x86-multi.apk.asc
diff --git a/templates/download-options.html b/templates/download-options.html
index c515669..e0edd8e 100644
--- a/templates/download-options.html
+++ b/templates/download-options.html
@@ -44,13 +44,27 @@
 
   
   
-{% for id, item in bag('download-tb-for-android-alpha').items() %}
-  
-
-  {{ id }}{% if item.sig %} (sig){% endif %}
-
-  
-{% endfor %}
+
+  
+https://play.google.com/store/apps/details?id=org.torproject.torbrowser_alpha;>Google
 Play
+  
+
+{% from "macros/downloads.html" import render_android %}
+
+  
+{{ render_android(t.version, "aarch64") }}
+  
+
+
+  
+{{ render_android(t.version, "armv7") }}
+  
+
+
+  
+{{ render_android(t.version, "x86") }}
+  
+
   
 
   
diff --git a/templates/macros/downloads.html b/templates/macros/downloads.html
index d743245..7581aca 100644
--- a/templates/macros/downloads.html
+++ b/templates/macros/downloads.html
@@ -49,6 +49,13 @@
   32-bit (sig) / 64-bit 
(sig)
 {% endmacro %}
 
+{% macro render_android(version, arch) %}
+  {% set download_link = 'https://dist.torproject.org/torbrowser/' + version + 
'/' + 'tor-browser-' + version + '-android-' + arch + '-multi.apk' %}
+  {% set sig_link = download_link + '.asc' %}
+
+  {{ arch }} (sig)
+{% endmacro %}
+
 {% macro render_fdroid() %}
   S00N
 {% endmacro %}



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


[tor-commits] [community/master] typo.

2019-09-11 Thread emmapeel
commit bcc60b133cc2b06259261e061eb1b116a00463b6
Merge: ee0a98f 4bffa96
Author: emma peel 
Date:   Wed Sep 11 12:32:06 2019 +0200

typo.
closes https://github.com/torproject/community/pull/10

 .../relay-operations/technical-setup/guard/freebsd/updates/contents.lr  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[tor-commits] [community/master] Ops! Small typo

2019-09-11 Thread emmapeel
commit 4bffa9619e6e50badc26e9659c59b00649ef724d
Author: Gustavo Gus 
Date:   Thu Sep 5 17:30:39 2019 -0400

Ops! Small typo
---
 .../relay-operations/technical-setup/guard/freebsd/updates/contents.lr  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/content/relay-operations/technical-setup/guard/freebsd/updates/contents.lr 
b/content/relay-operations/technical-setup/guard/freebsd/updates/contents.lr
index 86c1638..241a967 100644
--- a/content/relay-operations/technical-setup/guard/freebsd/updates/contents.lr
+++ b/content/relay-operations/technical-setup/guard/freebsd/updates/contents.lr
@@ -1,6 +1,6 @@
 _model: page
 ---
-title: BSD*
+title: *BSD
 ---
 color: primary
 ---



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


[tor-commits] [tor-browser-build/master] Bug 31621: Add --verbose flag to mach again

2019-09-11 Thread boklm
commit 5648e1499c10d2565e2cd9ca23599b532df8cff4
Author: Georg Koppen 
Date:   Wed Sep 4 18:53:58 2019 +

Bug 31621: Add --verbose flag to mach again

The underlying node bug got worked around in Mozilla's bug 1500436
and we cherry-pick that patch onto our esr68 branches. Thanks to a
cypherpunk for finding that bugfix.
---
 projects/firefox/build | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/projects/firefox/build b/projects/firefox/build
index 1450576..1a7893d 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -104,9 +104,7 @@ rm -f js/src/configure
 # Android does not support --enable-bundled-fonts option
 ./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %] 
--with-distribution-id=org.torproject --enable-update-channel=[% 
c("var/torbrowser_update_channel") %] [% IF ! c("var/android") 
%]--enable-bundled-fonts[% END -%] --with-branding=[% 
c("var/branding_directory") %]
 
-# Don't build with --verbose anymore or otherwise Stylo compilation breaks on
-# Linux. See: #30321 for details.
-./mach build
+./mach build --verbose
 
 [% IF c("var/android") %]
   # Building a multi-locale .apk



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


[tor-commits] [tor-browser-build/master] Merge remote-tracking branch 'gk/bug_31621'

2019-09-11 Thread boklm
commit f08dbd57ed76faa08007608130da50c4f80a9d64
Merge: 873865a 5648e14
Author: Nicolas Vigier 
Date:   Wed Sep 11 12:26:32 2019 +0200

Merge remote-tracking branch 'gk/bug_31621'

 projects/firefox/build | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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


[tor-commits] [community/master] Find and replace all links to "How to report bugs or feedback"

2019-09-11 Thread emmapeel
commit 341445db0f6a8ae8b6517bab285ce2a9fd99d0d4
Author: sabita <35147757+sabita...@users.noreply.github.com>
Date:   Sat Sep 7 12:24:56 2019 +0530

Find and replace all links to "How to report bugs or feedback"

Fixes part of https://dip.torproject.org/web/support/issues/39
---
 content/localization/translation-problem/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/localization/translation-problem/contents.lr 
b/content/localization/translation-problem/contents.lr
index 6194625..56eb26d 100644
--- a/content/localization/translation-problem/contents.lr
+++ b/content/localization/translation-problem/contents.lr
@@ -19,6 +19,6 @@ body:
 ### Reporting an error with a translation
 
 * If you are already a [Tor translator](becoming-tor-translator), you can 
simply find the string and fix it in 
[transifex](https://www.transifex.com/otf/torproject/).
-* If you don't know how to find the string to fix, you can [open a ticket on 
our 
Bugtracker](https://trac.torproject.org/projects/tor/wiki/doc/community/HowToReportBugFeedback),
 under the **Community/Translations** component.
+* If you don't know how to find the string to fix, you can [open a ticket on 
our Bugtracker](https://support.torproject.org/misc/bug-or-feedback/), under 
the **Community/Translations** component.
 * You can report such issues on [irc](https://webchat.oftc.net/), on the 
#tor-l10n channel (you may need to be registered to log in).
 * You can send an email to the [tor localization mailing 
list](https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-l10n).



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


  1   2   >