Commit Graph

5947 Commits

Author SHA1 Message Date
Daira Hopwood
e1a3a2001f setup.py: look for a tag named after APPNAME, not necessarily "allmydata-tahoe". refs #1146
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-11-21 08:41:45 +00:00
Daira Hopwood
2eeb8ee6f5 setup.py: set distribution.metadata.version from _version.py if we couldn't find it from git.
This simplifies reporting when we don't have the version. Also print the normalized version. refs #2340

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-11-21 08:38:37 +00:00
Daira Hopwood
b43447003e setup.py: use constant for _version.py filename.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-11-21 07:56:21 +00:00
Daira Hopwood
8e0ec757e7 setup.py: improve error reporting when git commands fail. refs #2340
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-11-21 05:29:09 +00:00
Brian Warner
5218e87ed1 test-osx-pkg.py: remove unused import 2014-10-26 11:56:57 -07:00
Brian Warner
a5daf73361 Merge branch '1159-notac-4' 2014-10-26 11:56:05 -07:00
Daira Hopwood
fc886a7d02 Improve error reporting and help for start/stop/etc. commands.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-21 19:15:32 +01:00
Daira Hopwood
13ae872ace startstop_node.py: rename internal command and twistd plugin class used to start tahoe nodes.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-21 19:04:14 +01:00
Brian Warner
87a6894e62 'tahoe start': stop using the contents of .tac files
Instead of constructing a sys.argv for 'twistd' that reads the node's
.tac file, we construct arguments that tell twistd to use a special
in-memory-only plugin that creates the desired node instance directly.

We still use the name of the .tac file to decide which kind of instance
to make (Client, IntroducerNode, KeyGenerator, StatsGatherer), but never
actually read the contents of the .tac file. Later improvements could
change this to look inside the tahoe.cfg for a nodetype= directive, etc.

This also makes it easy to have "tahoe start BASEDIR" pass the rest of
its arguments on to twistd, so e.g. "tahoe start BASEDIR --nodaemon
--profile=prof.out" does what you'd expect "twistd --nodaemon
--profile=prof.out" to do. "tahoe run BASEDIR" is thus simply aliased to
"tahoe start BASEDIR --nodaemon". This removes the need to special-case
--profile and --syslog.

I also removed some of the default logging behavior:

 before:
  'tahoe start' = 'twistd --logfile BASEDIR logs/twistd.log'
  'tahoe start --profile' adds '--profile=profiling_results.prof --savestats'
  'tahoe run' = 'twistd --nodaemon --logfile BASEDIR/logs/tahoesvc.log'

 after:
  'tahoe start' = 'twistd --logfile BASEDIR logs/twistd.log'
     unless --logfile, --nodaemon, or --syslog are passed
  'tahoe start --profile' invalid, use 'tahoe start --profile=OUTPUT'
  'tahoe run' = 'twistd --nodaemon'
     so log messages go to stdout

This finally enables 'tahoe run' to work with all node types, including
the key-generator and stats-gatherer.

It gets 'tahoe start' one step closer to accepting --reactor= . To
actually accomplish this will require this file, the enclosing
__init_.py files, and everything they import to avoid importing the
reactor. (if anything imports twisted.internet.reactor before
startstop_node.start() gets to run, then --reactor= comes too late).
That will take a lot of work, and requires lazy-loading of many core
libraries (foolscap.logging in particular), and removing a lot of code
from src/allmydata/__init__.py .
2014-10-21 19:02:25 +01:00
Daira Hopwood
e870bceb9a Merge pull request #122 from tahoe-lafs/182-osx-packaging-6
182 osx packaging 6
2014-10-21 16:11:05 +01:00
Daira Hopwood
f4d40ffcbf misc/build_helpers/test-osx-pkg.py: script to test the OS X pkg.
After extracting the contents of the package, this script looks at the
output of 'tahoe --version-and-path' to see if the modules are installed
and invoked from the right path.

Author: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-20 17:52:46 +01:00
Ramakrishnan Muthukrishnan
b07446ffc6 Distribution.xml file and scripts for building the OSX package. 2014-10-20 17:52:46 +01:00
Ramakrishnan Muthukrishnan
fad766a885 clean target should remove the pkg file. 2014-10-20 17:52:46 +01:00
Daira Hopwood
74689af7a1 New make target for OS X package creation.
Author: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-20 17:52:46 +01:00
Daira Hopwood
e0c9088757 Delete the obsolete misc/build_helpers/test_mac_diskimage.py script.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-13 18:50:01 +01:00
Daira Hopwood
69d78712b3 Update CREDITS.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-13 18:50:01 +01:00
Daira Hopwood
b14f509eeb bin/tahoe @python should always invoke the same Python that ran bin/tahoe.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-13 18:50:01 +01:00
Daira Hopwood
323cff5b56 Remove an unused import.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-10 20:39:18 +01:00
Daira Hopwood
346b5c4c3d Don't call filenode.get_size() twice. refs #1634
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-10 20:36:08 +01:00
zooko
200492760a Merge pull request #120 from zancas/1634-dont-return-none_5
1634 dont return none 5
2014-10-10 19:16:12 +00:00
zancas
425b9049ea Do not report 'size' metadata if get_size returns None 2014-10-10 11:27:28 -06:00
zancas
1545e14076 exercise all branches of new helper "get_filenode_metadata"
Note fix following issues from origial commit:

refactor unittests, fix style, add test

(0) use CommonFixture as mixin to increase DRYness
(1) self.failUnlessIn('size', metadata.keys()) --> self.failUnlessIn('size', metdata)
(2) test_size_is_not_None --> test_size_is_0 AND test_size_is_1000
2014-10-10 11:27:27 -06:00
zancas
0baa744411 refactor get_filenode_metadata(...) into common.py 2014-10-10 11:19:25 -06:00
Daira Hopwood
5bd76005a6 Correct a comment about which version of Twisted introduces a pywin32 dependency (12.3.0, not 13.0).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-08 12:57:31 +01:00
Daira Hopwood
b0b76a7c5b Improve comments in _auto_deps.py. refs #2249, #2028, #2193, #2005, #1258
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 21:04:40 +01:00
Daira Hopwood
3ff7f9bea3 Specify the setuptools egg filename explicitly rather than globbing for it.
(Note that if the version changes in future, this will fail loudly so we'll know we have to change it.)

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:28:53 +01:00
Daira Hopwood
dff955a46a .travis.yml: remove workaround to install Twisted 13.0 which should no longer be needed.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:23 +01:00
Daira Hopwood
680559d58e _auto_deps.py cosmetics and cleanup.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:23 +01:00
Daira Hopwood
18ffc29f49 Only allow pyOpenSSL >= 0.14 if it is already installed. fixes #2193
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:13 +01:00
Daira Hopwood
ec188d254c Make dependencies different for Windows and non-Windows. fixes #2249
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:00 +01:00
Daira Hopwood
b2e897c2a9 Move require_more() to top-level.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:06:14 +01:00
Daira Hopwood
ea09305987 Refactoring to move the not_import_versionable and ignorable package lists to _auto_deps.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-02 16:42:44 +01:00
Daira Hopwood
db64bb9dc1 Rename zetuptoolz egg to reflect new version number.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-02 16:42:44 +01:00
Daira Hopwood
789247bdd4 Bump zetuptoolz version number.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-02 16:42:44 +01:00
Daira Hopwood
f69c9f2a0e Improve zetuptoolz' logging of what it is doing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-02 16:42:44 +01:00
Daira Hopwood
d29e956a0f Delete obsolete Trove classifiers.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-02 16:26:47 +01:00
Daira Hopwood
fc6d237044 Merge pull request #114 from zooko/2305-remove-obsolete-tools-from-misc
remove all the unused scripts from build_helpers
2014-10-02 16:01:03 +01:00
Zooko
f0ef82bfac remove all the unused scripts from build_helpers
Fixes #2305.
2014-09-30 03:54:55 +00:00
Brian Warner
e80f075347 travis: remove the os.statvfs debug command
According to https://github.com/travis-ci/travis-ci/issues/2788 (which
was WONTFIXED), roughly half the travis-ci buildserver fleet runs off
tmpfs volumes, which have different notions of space-free and space-used
than real filesystems. We've adapted our tests to avoid relying upon
space-used>0, and no longer need this call to investigate the problem.

refs ticket:2290
2014-09-29 08:43:20 -07:00
Daira Hopwood
62a0ec0820 Merge pull request #112 from Lcstyle/master
Fix 1901 - the "Download!" button on the Welcome page leads to the file displayed in-browser instead of downloaded/saved.
2014-09-26 23:16:49 +01:00
Loose Cannon
7bfa9c64fb 1901 - Fix Welcome Page
Solution was very simple to implement, no content disposition header was
necessary.
Tested with both Firefox and Chrome, using binary image file stored in
folder, as well as with text data using LIT cap.
2014-09-26 17:02:14 -04:00
Daira Hopwood
a55164673b Change python.org link (https, main download page); editing.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-25 18:16:23 +01:00
Zooko
c84ebd3259 reflow to fill-column 77
and add comment informing your text editor that fill-column=77
2014-09-25 16:47:19 +00:00
amontero
b58c354f36 Add pkg-config directory to .gitignore 2014-09-13 21:00:02 -07:00
Daira Hopwood
d91170a7ac Merge pull request #109 from warner/2023-caution
Avoid Popen() of executables that don't exist
2014-09-13 10:58:55 +01:00
Brian Warner
d27a57cb49 Avoid Popen() of executables that don't exist
The stdlib 'subprocess' module in python-2.7.4 through 2.7.7 suffers
from http://bugs.python.org/issue18851 which causes unrelated file
descriptors to be closed when `subprocess.call()` fails the `exec()`,
such as when the executable being invoked does not actually exist. There
appears to be some randomness involved. This was fixed in python-2.7.8.

Tahoe's iputil.py uses subprocess.call on many different "ifconfig"-type
executables, most of which don't exist on any given platform (added in
git commit 8e31d66cd0). This results in a lot of file-descriptor
closing, which (at least during unit tests) tends to clobber important
things like Tub TCP sockets. This seems to be the root cause behind
ticket:2121, in which normal code tries to close already-closed sockets,
crashing the unit tests. Since different platforms have different
ifconfigs, some platforms will experience more failed execs than others,
so this bug could easily behave differently on linux vs freebsd, as well
as working normally on python-2.7.8 or 2.7.4.

This patch inserts a guard to make sure that os.path.isfile() is true
before allowing Popen.call() to try executing the target. This ought to
be enough to avoid the bug. It changes both iputil.py and
allmydata.__init__ (which uses Popen for calling "lsb_release"), which
are all the places where 'subprocess' is used outside of unit tests.

Other potential fixes: use the 'subprocess32' module from PyPI (which is
a bug-free backport of the Python3 stdlib subprocess module, but would
introduce a new dependency), or require python >= 2.7.8 (but this would
rule out development/deployment on the current OS-X 10.9 release, which
ships with 2.7.5, as well as other distributions like Ubuntu 14.04 LTS).

I believe this closes ticket:2121, and given the apparent relationship
between 2121 and 2023, I think it also closes ticket:2023 (although
since 2023 doesn't have copies of the failing log files, it's hard to
tell). I'm hoping that this will tide us over until 1.11 is released, at
which point we can execute on the plan to remove iputil.py entirely by
changing the way that nodes learn their externally-facing IP address.
2014-09-12 13:01:56 -07:00
Brian Warner
38668c9e35 test_disk_stats: tolerate used==0 for a Travis worker bug
Some Travis-CI workers report persistently empty disks, causing spurious
test failures. It's not really that important to assert used>0, so this
relaxes the test.

Closes ticket:2290
2014-09-12 12:55:52 -07:00
Brian Warner
3a75a75f95 travis: show os.statvfs before build, to investigate #2290 2014-09-12 12:14:29 -07:00
Brian Warner
528364a421 welcome.xhtml: explain MDMF too 2014-09-11 21:32:27 -07:00
Scott Arciszewski
62a4b2721c Update welcome.xhtml
Add a tooltip to explain what SDMF means. Cannot find a definition for MDMF; I presume "Medium" but at the risk of being wrong, I don't want to just blindly make that suggested change.
2014-09-11 21:29:13 -07:00