PP=PYTHONPATH="$(SRCPATH)$(PATHSEP)$(EGGSPATH)$(PATHSEP)$(PYTHONPATH)"
.PHONY: make-version build
+# N.B.: the first argument to make-version.py is used to find darcs tags that
+# represent released versions, so it needs to match whatever release
+# conventions are in use.
make-version:
$(PYTHON) misc/make-version.py "allmydata-tahoe" "src/allmydata/_version.py"
build:
$(PYTHON) ./setup.py build_ext -i
- chmod +x bin/allmydata-tahoe
+ chmod +x bin/tahoe
# 'make install' will do the following:
# build+install tahoe (probably to /usr/lib/pythonN.N/site-packages)
check-speed: .built
if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi
- $(PYTHON) bin/allmydata-tahoe start $(TESTCLIENTDIR)
+ $(PYTHON) bin/tahoe start $(TESTCLIENTDIR)
sleep 5
$(PYTHON) src/allmydata/test/check_speed.py $(TESTCLIENTDIR)
- $(PYTHON) bin/allmydata-tahoe stop $(TESTCLIENTDIR)
+ $(PYTHON) bin/tahoe stop $(TESTCLIENTDIR)
test-darcs-boringfile:
$(MAKE)
3. Build Tahoe by running "make".
- 4. Once you've built it then you can execute "./bin/allmydata-tahoe". (When
- the allmydata-tahoe script is in a Tahoe source distribution, it adds
- the necessary directory to the Python "sys.path". It also looks for any
- dependencies that you installed by "make build-deps" and includes them
- in the sys.path.) See the RUNNING section, below.
+ 4. Once you've built it then you can execute "./bin/tahoe". (When the tahoe
+ script is in a Tahoe source distribution, it adds the necessary
+ directory to the Python "sys.path". It also looks for any dependencies
+ that you installed by "make build-deps" and includes them in the
+ sys.path.) See the RUNNING section, below.
The Debian Way:
slow computers. There are a lot of tests and some of them do a lot of
public-key cryptography.)
- Executing the allmydata-tahoe script from the "bin" subdirectory will work
- only if Tahoe itself is installed, either because it is installed into the
- local subdirectory (as per "The Running-In-Place Way") or because it is
- installed into your system (as per the other three ways of installing).
+ Executing the tahoe script from the "bin" subdirectory will work only if
+ Tahoe itself is installed, either because it is installed into the local
+ subdirectory (as per "The Running-In-Place Way") or because it is installed
+ into your system (as per the other three ways of installing).
RUNNING:
- Run the "allmydata-tahoe" executable.
+ Run the "tahoe" executable.
If you installed "The Running-In-Place Way", then it is in your source tree,
in the "bin" subdirectory thereof. If you installed in one of the other
filesystem, perhaps in "/usr/bin" on Unix, or in "C:\Python25\Scripts" on
Window.
- The "allmydata-tahoe" utility is used to create, start, and stop nodes.
- Each node lives in a separate base directory, inside of which you can add
- files to configure and control the node. Nodes also read and write files
- within that directory.
+ The "tahoe" utility is used to create, start, and stop nodes. Each node
+ lives in a separate base directory, inside of which you can add files to
+ configure and control the node. Nodes also read and write files within that
+ directory.
A grid consists of a single central 'introducer and vdrive' node and one or
more 'client' nodes. If you are joining an existing grid, the
create both an introducer-and-vdrive and a client (and then invite other
people to create their own client nodes and join your grid).
- The introducer (-and-vdrive) node is constructed by running 'allmydata-tahoe
- create-introducer --basedir $HERE'. Once constructed, you can start the
- introducer by running 'allmydata-tahoe start --basedir $HERE' (or, if you
- are already in the introducer's base directory, just type 'allmydata-tahoe
- start'). Inside that base directory, there will be a pair of files
- 'introducer.furl' and 'vdrive.furl'. Make a copy of these, as they'll be
- needed on the client nodes.
+ The introducer (-and-vdrive) node is constructed by running 'tahoe
+ create-introducer --basedir $HERE'. Once constructed, you can start the
+ introducer by running 'tahoe start --basedir $HERE' (or, if you are already
+ in the introducer's base directory, just type 'tahoe start'). Inside that
+ base directory, there will be a pair of files 'introducer.furl' and
+ 'vdrive.furl'. Make a copy of these, as they'll be needed on the client
+ nodes.
To construct a client node, pick a new working directory for it, then run
- 'allmydata-tahoe create-client --basedir $HERE'. Copy the two .furl files
- from the introducer into this new directory, then run 'allmydata-tahoe start
- --basedir $HERE'. After that, the client node should be off and running.
- The first thing it will do is connect to the introducer and introduce itself
- to all other nodes on the grid. You can follow its progress by looking at
- the $HERE/logs/twistd.log file.
+ 'tahoe create-client --basedir $HERE'. Copy the two .furl files from the
+ introducer into this new directory, then run 'tahoe start --basedir $HERE'.
+ After that, the client node should be off and running. The first thing it
+ will do is connect to the introducer and introduce itself to all other nodes
+ on the grid. You can follow its progress by looking at the
+ $HERE/logs/twistd.log file.
To actually use the client, enable the web interface by writing a port
number (like "8123") into a file named $HERE/webport and then restarting the
- node with 'allmydata-tahoe restart --basedir $HERE'. This will prompt the
- client node to run a webserver on the desired port, through which you can
- view, upload, download, and delete files. This 'webport' file is actually a
- "strports specification", defined in
+ node with 'tahoe restart --basedir $HERE'. This will prompt the client node
+ to run a webserver on the desired port, through which you can view, upload,
+ download, and delete files. This 'webport' file is actually a "strports
+ specification", defined in
http://twistedmatrix.com/documents/current/api/twisted.application.strports.html
, so you can have it only listen on a local interface by writing
"tcp:8123:interface=127.0.0.1" to this file, or make it use SSL by writing
-This file exists so the preamble in bin/allmydata-tahoe can find its source
-tree.
+This file exists so the preamble in bin/tahoe can find its source tree.
+++ /dev/null
-#!/usr/bin/env python
-
-# This preamble is adapted from Twisted. If we're being run from a source
-# tree, add that tree's libdir to our path, so tahoe can be run from source
-# without a lot of tedious PYTHONPATH changes.
-import sys, os.path
-where = os.path.realpath(sys.argv[0]).split(os.sep)
-
-# look for Tahoe.home . Two cases:
-# ...(not BASE)/allmydata-tahoe
-# .../(BASE)/bin/allmydata-tahoe
-if len(where) >= 2 and where[-2] == "bin":
- base = os.sep.join(where[:-2])
-
- if os.path.exists(os.path.join(base, "Tahoe.home")):
- # we've found our home. Put the tahoe source at the front of sys.path
- srcdir = os.path.join(base, "src")
- sys.path.insert(0, srcdir)
- # and put any support eggs at the end of sys.path
- if sys.platform == "win32":
- supportdir = os.path.join(base, "support", "Lib", "site-packages")
- else:
- supportdir = os.path.join(base, "support",
- "lib",
- "python%d.%d" % sys.version_info[:2],
- "site-packages")
- support_eggs = []
- if os.path.exists(supportdir):
- for fn in os.listdir(supportdir):
- if fn.endswith(".egg"):
- support_eggs.append(os.path.join(supportdir, fn))
-
- sys.path.extend(support_eggs)
-
- # also update PYTHONPATH so that child processes (like twistd) will
- # use this too
- pp = os.environ.get("PYTHONPATH")
- if pp:
- pp = os.pathsep.join([srcdir] + pp.split(os.pathsep) + support_eggs)
- else:
- pp = os.pathsep.join([srcdir] + support_eggs)
- os.environ["PYTHONPATH"] = pp
-
-from allmydata.scripts import runner
-runner.run()
--- /dev/null
+#!/usr/bin/env python
+
+# This preamble is adapted from Twisted. If we're being run from a source
+# tree, add that tree's libdir to our path, so tahoe can be run from source
+# without a lot of tedious PYTHONPATH changes.
+import sys, os.path
+where = os.path.realpath(sys.argv[0]).split(os.sep)
+
+# look for Tahoe.home . Two cases:
+# ...(not BASE)/allmydata-tahoe
+# .../(BASE)/bin/allmydata-tahoe
+if len(where) >= 2 and where[-2] == "bin":
+ base = os.sep.join(where[:-2])
+
+ if os.path.exists(os.path.join(base, "Tahoe.home")):
+ # we've found our home. Put the tahoe source at the front of sys.path
+ srcdir = os.path.join(base, "src")
+ sys.path.insert(0, srcdir)
+ # and put any support eggs at the end of sys.path
+ if sys.platform == "win32":
+ supportdir = os.path.join(base, "support", "Lib", "site-packages")
+ else:
+ supportdir = os.path.join(base, "support",
+ "lib",
+ "python%d.%d" % sys.version_info[:2],
+ "site-packages")
+ support_eggs = []
+ if os.path.exists(supportdir):
+ for fn in os.listdir(supportdir):
+ if fn.endswith(".egg"):
+ support_eggs.append(os.path.join(supportdir, fn))
+
+ sys.path.extend(support_eggs)
+
+ # also update PYTHONPATH so that child processes (like twistd) will
+ # use this too
+ pp = os.environ.get("PYTHONPATH")
+ if pp:
+ pp = os.pathsep.join([srcdir] + pp.split(os.pathsep) + support_eggs)
+ else:
+ pp = os.pathsep.join([srcdir] + support_eggs)
+ os.environ["PYTHONPATH"] = pp
+
+from allmydata.scripts import runner
+runner.run()
client.tac : this file defines the client, by constructing the actual Client
instance each time the node is started. It is used by the 'twistd'
daemonization program (in the "-y" mode), which is run internally by the
-"allmydata-tahoe start" command. This file is created by the "allmydata-tahoe
-create-client" command.
+"tahoe start" command. This file is created by the "tahoe create-client"
+command.
control.furl : this file contains a FURL that provides access to a control
port on the client node, from which files can be uploaded and downloaded.
STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
-# we overwrite the setuptools-generated /usr/bin/allmydata-tahoe with our
-# package's original version, because the setuptools form (using "entry
-# points") insists upon .egg-info -visible forms of dependent packages to be
+# we overwrite the setuptools-generated /usr/bin/tahoe with our package's
+# original version, because the setuptools form (using "entry points")
+# insists upon .egg-info -visible forms of dependent packages to be
# installed. For a debian package, we rely upon the dependencies that are
# declared in debian/control .
#
install/allmydata-tahoe::
mkdir -pm755 $(STAGING_DIR)
python setup.py install --root=$(STAGING_DIR)
- cp bin/allmydata-tahoe $(STAGING_DIR)/usr/bin/
+ cp bin/tahoe $(STAGING_DIR)/usr/bin/
dh_pycentral
STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
-# we overwrite the setuptools-generated /usr/bin/allmydata-tahoe with our
-# package's original version, because the setuptools form (using "entry
-# points") insists upon .egg-info -visible forms of dependent packages to be
+# we overwrite the setuptools-generated /usr/bin/tahoe with our package's
+# original version, because the setuptools form (using "entry points")
+# insists upon .egg-info -visible forms of dependent packages to be
# installed. For a debian package, we rely upon the dependencies that are
# declared in debian/control .
#
install/allmydata-tahoe::
mkdir -pm755 $(STAGING_DIR)
python setup.py install --root=$(STAGING_DIR)
- cp bin/allmydata-tahoe $(STAGING_DIR)/usr/bin/
+ cp bin/tahoe $(STAGING_DIR)/usr/bin/
dh_pycentral
test_suite="allmydata.test",
install_requires=install_requires,
dependency_links=dependency_links,
- entry_points = { 'console_scripts': [ 'allmydata-tahoe = allmydata.scripts.runner:run' ] },
+ entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
ext_modules=[
Extension("allmydata.Crypto.Cipher.AES",
include_dirs=["src/allmydata/Crypto"],
# now we can kill it. TODO: On a slow machine, the node might kill
# itself before we get a chance too, especially if spawning the
- # 'allmydata-tahoe stop' command takes a while.
+ # 'tahoe stop' command takes a while.
def _stop(res):
open(HOTLINE_FILE, "w").write("")
self.failUnless(os.path.exists(TWISTD_PID_FILE))