Commit Graph

1999 Commits

Author SHA1 Message Date
robk-tahoe
68c2d54c0b add mac native build
This patch adds support for a mac native build.

At the moment it's a fairly simple .app - i.e. so simple as to be unacceptable
for a shipping product, but ok for testing and experiment at this point.

notably once launched, the app's ui does not respond at all, although its dock
icon does allow it to be force-quit.

this produces a single .app bundle, which when run will look for a node basedir
in ~/.tahoe.  If one is not found, one will be created in ~/Library/Application
Support/Allmydata Tahoe, and that will be symlinked to ~/.tahoe

if the basedir is lacking basic config (introducer.furl and root_dir.cap) then
the wx config wizard will be launched to log into an account and to set up
those files.

if a webport file is not found, the default value of 8123 will be written into
it.

once the node has started running, a webbrowser will be opened to the webish
interface at the users root_dir

note that, once configured, the node runs as the main thread of the .app,
no daemonisation is done, twistd is not involved.

the binary itself, from within the .app bundle, i.e.
"Allmydata Tahoe.app/Contents/MacOS/Allmydata Tahoe"
can be used from the command line and functions as the 'tahoe' executable
would in a unix environment, with one exception - when launched with no args
it triggers the default behaviour of running a node, and if necessary config
wizard, as if the user had launched the .app

one other gotcha to be aware of is that symlinking to this binary from some
other place in ones $PATH will most likely not work. when I tried this,
something - wx I believe - exploded, since it seems to use argv[0] to figure
out where necessary libraries reside and fails if argv[0] isn't in the .app
bundle.  it's pretty easy to set up a script a la
    #!/bin/bash
    /Blah/blah/blah/Allmydata\ Tahoe.app/Contents/MacOS/Allmydata\ Tahoe "${@}"
2008-01-22 19:32:26 -07:00
robk-tahoe
6ef4606534 tweak webish to use resource_filename to find css and html files
using sibpath to find web template files relative to source code is functional
when running from source environments, but not especially flexible when running
from bundled built environments.  the more 'orthodox' mechanism, pkg_resources,
in theory at least, knows how to find resource files in various environments.

this makes the 'web' directory in allmydata into an actual allmydata.web module
(since pkg_resources looks for files relative to a named module, and that module
must be importable) and uses pkg_resources.resource_filename to find the files
therein.
2008-01-22 17:44:58 -07:00
Zooko O'Whielacronx
284c1652a9 setup: make find_trial self-contained so that we don't have a bootstrapping problem -- if allmydata can't be imported we still want to be able to run find_trial 2008-01-23 10:04:26 -07:00
Zooko O'Whielacronx
49dccbd466 setup: loosen requirement on simplejson from 1.7.3 to 1.7.1
Since apparently 1.7.1 is what we use on tahoecs2, and it works.
2008-01-23 09:54:20 -07:00
Zooko O'Whielacronx
e00b5daff7 docs: edit install.html to point to about.html 2008-01-23 08:08:10 -07:00
Zooko O'Whielacronx
18d3b2bf96 setup: src/allmydata/_auto_deps.py is boring 2008-01-22 17:37:22 -07:00
Zooko O'Whielacronx
7e41893db7 setup: loosen our version requirement on zfec to require >= 1.1 instead of >= 1.3
I see that we have .deb's only for v1.1.
2008-01-22 17:35:38 -07:00
Zooko O'Whielacronx
348eecd615 setup: require specific versions of dependencies, both at run-time (if pkg_resources is available) and at build-time, and make there be only once place where we specify those versions
Using pkg_resources.require() like this also apparently allows people to install multiple different versions of packages on their system and tahoe (if pkg_resources is available to it) will import the version of the package that it requires.  I haven't tested this feature.
2008-01-22 17:24:33 -07:00
Zooko O'Whielacronx
8fc26ea4c4 setup: for reasons that I do not understand "show-eggspath" gives me a GNUmake error unless I move it down a couple of stanzas (until after the stanza that sets PYTHONPATH) 2008-01-22 17:22:38 -07:00
Zooko O'Whielacronx
eaed7a0690 setup: use setuptools (if it is present) at run-time to give a specific error message on startup if a too-old version of a dependency is installed 2008-01-22 17:42:54 -07:00
Zooko O'Whielacronx
33daaf651b setup: remove some things from .darcs-boringfile which are no longer boring since we no longer use them 2008-01-22 17:40:23 -07:00
Zooko O'Whielacronx
50daad4a27 setup: remove the --always-copy option, because it causes setuptools to ignore system and development apps 2008-01-22 14:05:04 -07:00
Zooko O'Whielacronx
5188929e72 setup: remove the hatch-eggs make script since the setup.cfg accomplishes it, and make windows-exe depend on .built 2008-01-22 13:47:48 -07:00
Zooko O'Whielacronx
c433f42337 setup: add a setup.cfg file which instructs setuptools to install all eggs in unzipped form and to always copy them into the target directory (even if they are already installed somewhere else on the path that setuptools searches, which includes the CWD) 2008-01-22 13:46:47 -07:00
Zooko O'Whielacronx
faad785859 setup: include cli.exe in the bootstrap setptools egg so that it will work on Windows (also include gui.exe just in case) 2008-01-22 12:33:55 -07:00
robk-tahoe
d1de1f180a offloaded: reinstate fix for windows tests
in a discussion the other day, brian had asked me to try removing this fix, since
it leads to double-closing the reader.  since on my windows box, the test failures
I'd experienced were related to the ConnectionLost exception problem, and this
close didn't see to make a difference to test results, I agreed.

turns out that the buildbot's environment does fail without this fix, even with
the exception fix, as I'd kind of expected.

it makes sense, because the reader (specifically the file handle) must be closed
before it can be unlinked. at any rate, I'm reinstating this, in order to fix the
windows build
2008-01-21 15:25:15 -07:00
robk-tahoe
7b990cc9af UNDO: offloaded: close reader before removing its file
unlinking a file before closing it is not portable. it works on unix, but fails
since an open file holds a lock on windows.

this closes the reader before trying to unlink the encoding file within the 
CHKUploadHelper.
2008-01-17 17:36:28 -07:00
robk-tahoe
fc91837f69 update confwiz to include account creation ui
this changes the confwiz so that hitting the 'create account' button, rather than
opening a webbrowser to the register page, instead provides a simple account creation
ui directly, along with changes to the backend (native_client.php) to support that.

also added a 'connecting...' message so the user sees a response when they hit
login or create account, since the getBasedir call can sometimes take up to ~5min
(which is unacceptable for a user product, but this at least somewhat ameliorates
the issue of the ui locking up and not giving the user any feedback while it's
happening)
2008-01-21 15:13:10 -07:00
Zooko O'Whielacronx
b1152860cd setup: bundle setuptools_darcs-1.1.7
fixes #263
2008-01-22 11:01:36 -07:00
Zooko O'Whielacronx
a8b14a5cd2 setup: use a customized version of ez_setup.py which bootstraps from Python-version-agnostic setuptools bootstrap eggs 2008-01-22 11:00:56 -07:00
Zooko O'Whielacronx
451ca7792e setup: add a setuptools bootstrap egg that works on all versions of Python
For versions of Python >= 2.3.
2008-01-22 11:00:12 -07:00
Zooko O'Whielacronx
84289b2446 setup: update some docs, metadata, and docstrings 2008-01-22 10:22:51 -07:00
Zooko O'Whielacronx
c740da9b6d setup: it is okay to leave src/allmydata_tahoe.egg-info in place
This directory allows programs to programmatically identify tahoe and its version number while "running from source" -- i.e. using ./setup.py develop.
2008-01-22 09:35:54 -07:00
Zooko O'Whielacronx
1f2e3fc912 setup: simplify the setup by removing the "tahoe dependencies" fake project
Now we use "./setup.py develop" to ensure that changes to our source code are immediately used without requiring a "make" step.  This simplification will hopefully pave the way for easier py2exe and py2app, solving the "Unit tests test the installed version" bug (#145), and perhaps also #164 and #176.

This patch also conditionalizes the use of setuptools_darcs on the absence of a PKG-INFO file, which is part of fixing #263.
2008-01-22 08:35:38 -07:00
Zooko O'Whielacronx
f3a9a47420 docs: about.html: edit thanks to nej 2008-01-21 21:52:01 -07:00
Zooko O'Whielacronx
6c0e894134 doc: architecture.txt: start updating architecture.txt
I chose to remove mention of non-convergent encoding, not because I dislike non-convergent encoding, but because that option isn't currently expressed in the API and in order to shorten architecture.txt.  I renamed "URI" to "Capability".  I did some editing, including updating a few places that treated all capabilities as CHK-capabilities and that mentioned that distributed SSKs were not yet implemented.
2008-01-21 17:53:03 -07:00
Zooko O'Whielacronx
2148903125 docs: architecture.txt: reflow to 77 cols
Experiment showed that reflowing to 77 cols changed the fewest lines.
2008-01-21 17:26:28 -07:00
Zooko O'Whielacronx
cce2dbfe80 doc: fix typos and otherwise edit about.html 2008-01-21 15:54:43 -07:00
Zooko O'Whielacronx
20aaefc3f0 doc: add an overview to about.html
Hopefully this overview has the right combination of generality and precision to satisfy The Norm Hardy Request:
http://allmydata.org/pipermail/tahoe-dev/2007-November/000222.html
2008-01-21 15:19:25 -07:00
robk-tahoe
7c34658438 offloaded: fix failure in unit test on windows
in trying to test my fix for the failure of the offloaded unit test on windows
(by closing the reader before unlinking the encoding file - which, perhaps
disturbingly doesn't actually make a difference in my windows environment)
I was unable too because the unit test failed every time with a connection lost
error.

after much more time than I'd like to admit it took, I eventually managed to
track that down to a part of the unit test which is supposed to be be dropping
a connection.   it looks like the exceptions that get thrown on unix, or at
least all the specific environments brian tested in, for that dropped 
connection are different from what is thrown on my box (which is running py2.4
and twisted 2.4.0, for reference)  adding ConnectionLost to the list of
expected exceptions makes the test pass.

though curiously still my test logs a NotEnoughWritersError error, and I'm not
currently able to fathom why that exception isn't leading to any overall 
failure of the unit test itself.

for general interest, a large part of the time spent trying to track this down
was lost to the state of logging.  I added a whole bunch of logging to try
and track down where the tests were failing, but then spent a bunch of time
searching in vain for that log output.  as far as I can tell at this point
the unit tests are themselves logging to foolscap's log module, but that isn't
being directed anywhere, so all the test's logging is being black holed.
2008-01-17 20:57:29 -07:00
robk-tahoe
46154beace offloaded: close reader before removing its file
unlinking a file before closing it is not portable. it works on unix, but fails
since an open file holds a lock on windows.

this closes the reader before trying to unlink the encoding file within the 
CHKUploadHelper.
2008-01-17 17:36:28 -07:00
Brian Warner
e9307d3fda offloaded: close the local filehandle after encoding is done, otherwise windows fails 2008-01-17 01:52:33 -07:00
Brian Warner
fd0dc3013c offloaded: update unit tests: assert that interrupt/resume works, and that the helper deletes tempfiles 2008-01-17 01:18:10 -07:00
Brian Warner
6b08c28f5d upload.py: make it easier to have an IUploadable that overrides encoding parameters: just set an attribute instead of subclassing 2008-01-17 01:17:42 -07:00
Brian Warner
812383a369 offloaded: upload.py: handle forward skips, to allow resumed uploads to send less than all the data. We still read all the data (to hash it, 'paranoid mode'), but we don't send it over the wire 2008-01-17 01:16:56 -07:00
Brian Warner
0e3b218e7d offloaded.py: delete encoding tempfile when upload is complete 2008-01-17 01:15:54 -07:00
Brian Warner
41cbd1e3a7 offloaded.py: when resuming, append new data to incoming file, rather than overwrite it. 2008-01-17 01:15:32 -07:00
Brian Warner
8386b0226b offloaded.py: remove dead/redundant code 2008-01-17 01:14:45 -07:00
Brian Warner
c597e67c2b offloaded: improve logging across the board 2008-01-17 01:11:35 -07:00
Brian Warner
51321944f0 megapatch: overhaul encoding_parameters handling: now it comes from the Uploadable, or the Client. Removed options= too. Also move helper towards resumability. 2008-01-16 03:03:35 -07:00
Brian Warner
547375a488 node.py: when calling os.abort(), announce it to stdout as well as the log 2008-01-16 03:01:32 -07:00
robk-tahoe
7443121a9c simplify buildbot upload of windows installer
since the installer upload got more complex (needing to chmod files before
rsyncing) I promoted it to a makefile target, simplifying the buildbot steps
involved
2008-01-16 20:29:30 -07:00
robk-tahoe
6e8fe30859 add winfuse plugin to installer
this adds the latest build of mike's winfuse plugins, now also running as
a windows service (and using the node.url, private/root_dir.cap files from
the noderoot specified by the registry) into the install process.
2008-01-16 19:15:35 -07:00
nejucomo
eaba225e1f Wouldn't it be nice to reuse the allmydata library? 2008-01-12 21:41:26 -07:00
nejucomo
0b5f9ff5c3 Support url-encoding in caps. 2008-01-12 21:41:07 -07:00
nejucomo
dc7e794ee8 Make my contrib/README look like the allmydata.org version. 2008-01-12 21:00:13 -07:00
nejucomo
a339ba6feb The start of unit tests for tahoe_fuse.py. 2008-01-12 19:56:03 -07:00
nejucomo
52fc80a54b Formatting changes and a few FIXMEs for tahoe_fuse.py 2008-01-12 19:55:38 -07:00
nejucomo
19fdb20bac Remove redundant docs from tahoe_fuse.py docstrings which are in the README. Add implementation-specific notes in the doc strings. 2008-01-12 19:54:33 -07:00
nejucomo
ddeb5eab54 Change the name of tahoe_fuse.py to something importable. 2008-01-12 18:50:53 -07:00