[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r22119: {projects} Add Linux Browser Bundle to GetTor (in projects/gettor: . lib/gettor)
Author: kaner
Date: 2010-04-05 10:37:13 +0000 (Mon, 05 Apr 2010)
New Revision: 22119
Modified:
projects/gettor/GetTor.py
projects/gettor/TODO
projects/gettor/lib/gettor/constants.py
projects/gettor/lib/gettor/packages.py
projects/gettor/lib/gettor/utils.py
Log:
Add Linux Browser Bundle to GetTor
Modified: projects/gettor/GetTor.py
===================================================================
--- projects/gettor/GetTor.py 2010-04-05 01:52:28 UTC (rev 22118)
+++ projects/gettor/GetTor.py 2010-04-05 10:37:13 UTC (rev 22119)
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
__program__ = 'GetTor.py'
-__url__ = 'https://tor-svn.freehaven.net/svn/tor/trunk/contrib/gettor/'
+__url__ = 'https://svn.torproject.org/svn/projects/gettor'
__author__ = 'Jacob Appelbaum <jacob@xxxxxxxxxxxxx>, Christian Fromme <kaner@xxxxxxxxxx>'
__copyright__ = 'Copyright (c) 2008, 2009, The Tor Project'
__license__ = 'See LICENSE for licensing information'
Modified: projects/gettor/TODO
===================================================================
--- projects/gettor/TODO 2010-04-05 01:52:28 UTC (rev 22118)
+++ projects/gettor/TODO 2010-04-05 10:37:13 UTC (rev 22119)
@@ -1,5 +1,7 @@
These are planned changes to the gettor system.
+- Write up how and when and for how long we block requests by users on
+ blacklists, e.g. write up what our spam prevention technology is
- Split (at least) tiger bundle into several smaller archives to avoid ~20MB
- React in some way if the user requested a split download but no split
downloads are available for that specific package (maybe send out the non-
Modified: projects/gettor/lib/gettor/constants.py
===================================================================
--- projects/gettor/lib/gettor/constants.py 2010-04-05 01:52:28 UTC (rev 22118)
+++ projects/gettor/lib/gettor/constants.py 2010-04-05 10:37:13 UTC (rev 22119)
@@ -20,7 +20,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
Please reply to this mail (to gettor), and tell me
@@ -73,7 +74,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
ÙØØÙ ØÙ ØØØ ØÙÙ ÙØÙ ØÙØØØÙØ (ØÙÙ gettor@xxxxxxxxxxxxxx)Ø ÙØØØØÙÙ
@@ -127,7 +129,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
ÙØÙØ ØÙ ØÛÙ ÙØÙÙ ÙØØØ ØØØÙ ( ØÙ ØØØØ gettor@xxxxxxxxxxxxxx ) Ù ØØ ÙØÙØÛ ØØ
@@ -178,7 +181,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
Vennligst svar til denne eposten (til gettor@xxxxxxxxxxxxxx), og nevn
@@ -231,7 +235,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
Por favor responda a esta email (para gettor@xxxxxxxxxxxxxx), e diga qual o
@@ -282,7 +287,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
ÐÐÐÐÐÑÐÑÑÐ ÑÐÑÐÐÑÐÑÑ Ñ ÐÐÐÐ ÐÐ ÑÑÐÐ ÑÐÐÑÑÐÐÐÐÐ ÐÐÑÑÐ
@@ -339,8 +345,9 @@
(Tor for MacOS)
macosx-ppc-bundle
(Tor for MacOS on PowerPC )
- tor-im-browser-bundle
- (Tor+Pidginèåèåçå+Firefoxæèå)
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
+ (Tor for Linux)
source-bundle
(æçå)
@@ -429,7 +436,8 @@
tor-browser-bundle
macosx-i386-bundle
macosx-ppc-bundle
- tor-im-browser-bundle
+ linux-i386-browser-bundle
+ linux-x86_64-browser-bundle
source-bundle
"""
Modified: projects/gettor/lib/gettor/packages.py
===================================================================
--- projects/gettor/lib/gettor/packages.py 2010-04-05 01:52:28 UTC (rev 22118)
+++ projects/gettor/lib/gettor/packages.py 2010-04-05 10:37:13 UTC (rev 22119)
@@ -12,6 +12,7 @@
'''
import os
+import shutil
import zipfile
import subprocess
import gettor.gtlog
@@ -55,6 +56,32 @@
"windows-bundle": ("vidalia-bundle-.*.exe$", "vidalia-bundle-.*_split"),
"macosx-ppc-bundle": ("vidalia-bundle-.*-ppc.dmg$", "vidalia-bundle-.*-ppc_split"),
"macosx-i386-bundle": ("vidalia-bundle-.*-i386.dmg$", "vidalia-bundle-.*-universal_split"),
+ "linux-browser-bundle-i386": ("i386-tor-browser-gnu-linux-.*-en-US.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_en": ("i386-tor-browser-gnu-linux-.*-en-US.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_ar": ("i386-tor-browser-gnu-linux-.*-ar.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_de": ("i386-tor-browser-gnu-linux-.*-de.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_es-ES": ("i386-tor-browser-gnu-linux-.*-es-ES.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_fa": ("i386-tor-browser-gnu-linux-.*-fa.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_fr": ("i386-tor-browser-gnu-linux-.*-fr.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_it": ("i386-tor-browser-gnu-linux-.*-it.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_nl": ("i386-tor-browser-gnu-linux-.*-nl.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_pl": ("i386-tor-browser-gnu-linux-.*-pl.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_pt_PT": ("i386-tor-browser-gnu-linux-.*-pt_PT.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_ru": ("i386-tor-browser-gnu-linux-.*-ru.tar.gz$", "not available"),
+ "linux-browser-bundle-i386_zh_CN": ("i386-tor-browser-gnu-linux-.*-zh-CN.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64": ("x86_64-tor-browser-gnu-linux-.*-en-US.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_en": ("x86_64-tor-browser-gnu-linux-.*-en-US.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_ar": ("x86_64-tor-browser-gnu-linux-.*-ar.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_de": ("x86_64-tor-browser-gnu-linux-.*-de.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_es-ES": ("x86_64-tor-browser-gnu-linux-.*-es-ES.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_fa": ("x86_64-tor-browser-gnu-linux-.*-fa.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_fr": ("x86_64-tor-browser-gnu-linux-.*-fr.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_it": ("x86_64-tor-browser-gnu-linux-.*-it.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_nl": ("x86_64-tor-browser-gnu-linux-.*-nl.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_pl": ("x86_64-tor-browser-gnu-linux-.*-pl.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_pt_PT": ("x86_64-tor-browser-gnu-linux-.*-pt_PT.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_ru": ("x86_64-tor-browser-gnu-linux-.*-ru.tar.gz$", "not available"),
+ "linux-browser-bundle-x86_64_zh_CN": ("x86_64-tor-browser-gnu-linux-.*-zh-CN.tar.gz$", "not available"),
# Mike won't sign Torbutton; He doesn't get gettor support
#"torbutton": "torbutton-current.xpi$",
}
@@ -95,6 +122,24 @@
del self.packageList[key]
return self.packageList
+ def preparePackages(self):
+ # Move some stuff around the way we need it: GetTor expects a flat
+ # file system after rsync is finished
+ log.info("Preparing Linux Bundles..")
+ # Prepare Linux Bundles: Move them from linux/i386/* to
+ # ./i386-* and from linux/x86_64/* to ./x86_64-*
+ tbbdir = os.path.join(self.distDir, "_tbb")
+ lxdir = os.path.join(tbbdir, "linux")
+ if os.path.isdir(lxdir):
+ # Loop through linux/i386 and linux/x86_64 and whatever might
+ # come in the future
+ for archdir in os.listdir(lxdir):
+ lxarchdir = os.path.join(lxdir, archdir)
+ for srcfile in os.listdir(lxarchdir):
+ renameTo = archdir + "-" + srcfile
+ destfile = os.path.join(tbbdir, renameTo)
+ shutil.move(os.path.join(lxarchdir, srcfile), destfile)
+
def buildPackages(self):
for (pack, (regex_single, regex_split)) in self.packageRegex.items():
for dirname in os.listdir(self.distDir):
Modified: projects/gettor/lib/gettor/utils.py
===================================================================
--- projects/gettor/lib/gettor/utils.py 2010-04-05 01:52:28 UTC (rev 22118)
+++ projects/gettor/lib/gettor/utils.py 2010-04-05 10:37:13 UTC (rev 22119)
@@ -134,6 +134,7 @@
except IOError:
log.error("Error initiating package list.")
return False
+ packs.preparePackages()
if not packs.buildPackages():
log.error("Building packages failed.")
return False
@@ -301,6 +302,38 @@
return True
+def getVersionStringFromFile(filename):
+ regex = "[a-z-]*-([0-9]*\.[0-9]*\.[0-9]*)"
+ match = re.match(regex, filename)
+ if match:
+ return match.group(1)
+ else:
+ return None
+
+def isNewTorVersion(old, new):
+ oldsplit = old.split(".")
+ newsplit = new.split(".")
+ if len(oldsplit) != 3 or len(newsplit) != 3:
+ log.error("Tor version length fail")
+ return False
+ if oldsplit[0] > newsplit[0]:
+ return False
+ if oldsplit[0] < newsplit[0]:
+ return True
+ if oldsplit[0] == newsplit[0]:
+ if oldsplit[1] > newsplit[1]:
+ return False
+ if oldsplit[1] < newsplit[1]:
+ return True
+ if oldsplit[1] == newsplit[1]:
+ if oldsplit[2] > newsplit[2]:
+ return False
+ if oldsplit[2] < newsplit[2]:
+ return True
+ if oldsplit[2] == newsplit[2]:
+ # Same version
+ return False
+
# Helper routines go here ####################################################
def installMo(poFile, targetDir):