Rename distribution from allmydata-tahoe to tahoe-lafs. fixes ticket:2011

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2016-03-25 19:16:01 +00:00
parent c3d54e0221
commit 0598c830ed
9 changed files with 32 additions and 84 deletions

View File

@ -10,7 +10,7 @@ PYFLAKES=pyflakes
export PYFLAKES
SOURCES=src/allmydata static misc setup.py
APPNAME=allmydata-tahoe
APPNAME=tahoe-lafs
# This is necessary only if you want to automatically produce a new
# _version.py file from the current git history (without doing a build).

View File

@ -6,12 +6,12 @@
- CREDITS
- docs/known_issues.rst
- [ ] change docs/quickstart.rst to point to just the current
allmydata-tahoe-X.Y.Z.zip source code file, or else to point to a
directory which contains only allmydata-tahoe-X.Y.Z.* source code files
tahoe-lafs-X.Y.Z.zip source code file, or else to point to a
directory which contains only tahoe-lafs-X.Y.Z.* source code files
- [ ] git pull
- [ ] git tag -s -u 68666A7A allmydata-tahoe-X.Y.Z
- [ ] git tag -s -u 68666A7A tahoe-lafs-X.Y.Z
- produces a "signed tag"
- tag body: allmydata-tahoe-X.Y.Z
- tag body: tahoe-lafs-X.Y.Z
- [ ] build locally to make sure the release is reporting itself as the
intended version
- [ ] make sure buildbot is green

View File

@ -30,7 +30,7 @@ def read_version_py(infname):
VERSION_PY_FILENAME = 'src/allmydata/_version.py'
version = read_version_py(VERSION_PY_FILENAME)
APPNAME='allmydata-tahoe'
APPNAME='tahoe-lafs'
APPNAMEFILE = os.path.join('src', 'allmydata', '_appname.py')
APPNAMEFILESTR = "__appname__ = '%s'" % (APPNAME,)
try:

View File

@ -1,10 +1,23 @@
import os, sys
from allmydata.scripts.common import BasedirOptions, NoDefaultBasedirOptions
from allmydata.scripts.default_nodedir import _default_nodedir
from allmydata.util.assertutil import precondition
from allmydata.util.encodingutil import listdir_unicode, argv_to_unicode, quote_local_unicode_path
import allmydata
from allmydata.util import fileutil
dummy_tac = """
import sys
print("Nodes created by Tahoe-LAFS v1.11.0 or later cannot be run by")
print("releases of Tahoe-LAFS before v1.10.0.")
sys.exit(1)
"""
def write_tac(basedir, nodetype):
fileutil.write(os.path.join(basedir, "tahoe-%s.tac" % (nodetype,)), dummy_tac)
class _CreateBaseOptions(BasedirOptions):
optParameters = [
@ -41,36 +54,6 @@ class CreateIntroducerOptions(NoDefaultBasedirOptions):
description = "Create a Tahoe-LAFS introducer."
client_tac = """
# -*- python -*-
import pkg_resources
pkg_resources.require('%s')
pkg_resources.require('twisted')
from allmydata import client
from twisted.application import service
c = client.Client()
application = service.Application("allmydata_client")
c.setServiceParent(application)
""" % (allmydata.__appname__,)
introducer_tac = """
# -*- python -*-
import pkg_resources
pkg_resources.require('%s')
pkg_resources.require('twisted')
from allmydata import introducer
from twisted.application import service
c = introducer.IntroducerNode()
application = service.Application("allmydata_introducer")
c.setServiceParent(application)
""" % (allmydata.__appname__,)
def write_node_config(c, config):
# this is shared between clients and introducers
c.write("# -*- mode: conf; coding: utf-8 -*-\n")
@ -116,9 +99,7 @@ def create_node(config, out=sys.stdout, err=sys.stderr):
# we're willing to use an empty directory
else:
os.mkdir(basedir)
f = open(os.path.join(basedir, "tahoe-client.tac"), "w")
f.write(client_tac)
f.close()
write_tac(basedir, "client")
c = open(os.path.join(basedir, "tahoe.cfg"), "w")
@ -192,9 +173,7 @@ def create_introducer(config, out=sys.stdout, err=sys.stderr):
# we're willing to use an empty directory
else:
os.mkdir(basedir)
f = open(os.path.join(basedir, "tahoe-introducer.tac"), "w")
f.write(introducer_tac)
f.close()
write_tac(basedir, "introducer")
c = open(os.path.join(basedir, "tahoe.cfg"), "w")
write_node_config(c, config)

View File

@ -1,6 +1,8 @@
import os, sys
from allmydata.scripts.common import NoDefaultBasedirOptions
from allmydata.scripts.create_node import write_tac
from allmydata.util.assertutil import precondition
from allmydata.util.encodingutil import listdir_unicode, quote_output
@ -9,24 +11,6 @@ class CreateKeyGeneratorOptions(NoDefaultBasedirOptions):
subcommand_name = "create-key-generator"
keygen_tac = """
# -*- python -*-
import pkg_resources
pkg_resources.require('allmydata-tahoe')
from allmydata import key_generator
from twisted.application import service
k = key_generator.KeyGeneratorService(default_key_size=2048)
#k.key_generator.verbose = False
#k.key_generator.pool_size = 16
#k.key_generator.pool_refresh_delay = 6
application = service.Application("allmydata_key_generator")
k.setServiceParent(application)
"""
def create_key_generator(config, out=sys.stdout, err=sys.stderr):
basedir = config['basedir']
# This should always be called with an absolute Unicode basedir.
@ -41,9 +25,7 @@ def create_key_generator(config, out=sys.stdout, err=sys.stderr):
# we're willing to use an empty directory
else:
os.mkdir(basedir)
f = open(os.path.join(basedir, "tahoe-key-generator.tac"), "wb")
f.write(keygen_tac)
f.close()
write_tac(basedir, "key-generator")
return 0
subCommands = [

View File

@ -1,6 +1,8 @@
import os, sys
from allmydata.scripts.common import NoDefaultBasedirOptions
from allmydata.scripts.create_node import write_tac
from allmydata.util.assertutil import precondition
from allmydata.util.encodingutil import listdir_unicode, quote_output
@ -9,20 +11,6 @@ class CreateStatsGathererOptions(NoDefaultBasedirOptions):
subcommand_name = "create-stats-gatherer"
stats_gatherer_tac = """
# -*- python -*-
from allmydata import stats
from twisted.application import service
verbose = True
g = stats.StatsGathererService(verbose=verbose)
application = service.Application('allmydata_stats_gatherer')
g.setServiceParent(application)
"""
def create_stats_gatherer(config, out=sys.stdout, err=sys.stderr):
basedir = config['basedir']
# This should always be called with an absolute Unicode basedir.
@ -37,9 +25,7 @@ def create_stats_gatherer(config, out=sys.stdout, err=sys.stderr):
# we're willing to use an empty directory
else:
os.mkdir(basedir)
f = open(os.path.join(basedir, "tahoe-stats-gatherer.tac"), "wb")
f.write(stats_gatherer_tac)
f.close()
write_tac(basedir, "stats-gatherer")
return 0
subCommands = [

View File

@ -13,6 +13,7 @@ from allmydata.scripts import runner
from allmydata.client import Client
from allmydata.test import common_util
import allmydata
from allmydata._appname import __appname__
timeout = 240
@ -74,7 +75,7 @@ class RunBinTahoeMixin:
self.assertEqual(rc_or_sig, 0, res)
lines = out.splitlines()
tahoe_pieces = lines[0].split()
self.assertEqual(tahoe_pieces[0], "allmydata-tahoe:", (tahoe_pieces, res))
self.assertEqual(tahoe_pieces[0], "%s:" % (__appname__,), (tahoe_pieces, res))
CACHED_IMPORT_PATH[bintahoe] = tahoe_pieces[-1].strip("()")
returnValue(CACHED_IMPORT_PATH[bintahoe])

View File

@ -101,7 +101,7 @@ class CheckRequirement(unittest.TestCase):
res = cross_check({}, [])
self.failUnlessEqual(res, [])
res = cross_check({}, [("allmydata-tahoe", ("1.0", "", "blah"))])
res = cross_check({}, [("tahoe-lafs", ("1.0", "", "blah"))])
self.failUnlessEqual(res, [])
res = cross_check({"foo": ("unparseable", "")}, [])

View File

@ -175,7 +175,7 @@ class FakeDisplayableServer(StubServer):
def __init__(self, serverid, nickname, connected,
last_connect_time, last_loss_time, last_rx_time):
StubServer.__init__(self, serverid)
self.announcement = {"my-version": "allmydata-tahoe-fake",
self.announcement = {"my-version": "tahoe-lafs-fake",
"service-name": "storage",
"nickname": nickname}
self.connected = connected