fileutil.write: accept mode=, and use it in Node.write_config

I want mode="w" (i.e. text, with newline conversion) for code that
writes newline-terminated strings (which should also be human readable)
to files. I like to use things like "cat .tahoe/permutation-seed"
without seeing the seed jammed together with the next command prompt.
introducer.client: use integer seqnums, not time-based. Closes #1767.

This stores the sequence number in BASEDIR/announcement-seqnum, and
increments it each time any service is published (every service
announcement is regenerated with the new sequence number). As everyone
knows, time is an illusion, and occasionally goes backwards, so a
counter is generally safer (and reveals less information about the
node).

Later, we'll improve the introducer client to tolerate rollbacks (where,
perhaps due to a VM being restarted from an earlier checkpoint, the
stored sequence number reverts to an earlier version).
sftpd.py: switch from using bare asserts to assertutil.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
Improve SFTP error handling and remove use of IFinishableConsumer. fixes #1525

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
New Welcome page: ensure 'not connected' status for Introducer and Helper is shown via text as well as bullet colour. refs #1713

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
Makefile: re-enable tarball uploads for "master" branch
Remove darcs from setup.py, remove darcsver egg. Closes #1908.

Also remove lingering traces of darcs from MANIFEST.in,
.darcs-boringfile, setup.cfg, and unit tests.
Add draft NEWS entry for 1.10.0c1.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
tweak NEWS a bit
Improvements to NEWS.rst for 1.10.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
Avoid double-counting source files in 'tahoe cp --verbose'. fixes #1783

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
Improve 'tahoe put --help' to clarify behaviour for mutable files, and
make sure the documented behaviour is tested. fixes #1372

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
test_cli.py: fix mutable PUT stderr expectations
NEWS.rst: precautions when upgrading. refs #1932

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
Make introducer.furl unguessable. Closes #1802.

Previously, Introducers always used a swissnum of "introducer", so
anyone who could learn the (public) tubid of the introducer would be
able to connect to and use it. This changes new Introducers to use the
same randomly-generated swissnum as clients and storage servers do, so
that you absolutely must learn the introducer.furl from someone who
knows it already before you can connect.

This change also moves the location of the file that stores
introducer.furl from BASEDIR/introducer.furl to
BASEDIR/private/introducer.furl, since that's where we keep the private
things. The first time an introducer is started with the new code, it
will move any existing BASEDIR/introducer.furl into the new place.

Note that this will not change the FURL of existing introducers: it will
only affect newly created ones. When you change an introducer's FURL,
you must also update all of the nodes (clients and storage servers)
which connect to it, so upgrading it to an unguessable one isn't
something we should do automatically.
client.py: throw error when reserved_space= is unparseable. Closes #1812.

This should now fail quickly (during "tahoe start"). Previously this
would silently treat an unparseable size as "0", and the only way to
discover that it had had a problem would be to look at the foolscap log,
or examine the storage-service web page for the unexpected "Reserved
Size" number.
Censor the introducer and helper furls' swissnums from the web welcome page. refs #1802

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
Correct off-by-one in maximum-immutable-share-size for old servers. fixes #1781

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
resurrect provisioning.py

It looks like commit 916d26e7103208fa207259d62ce453a5a8b9acd0, in
addition to making a one-line fix for #1681, also deleted
misc/operations_helpers/provisioning/provisioning.py entirely. This
brings it back.
CREDITS: change my name.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>