Joey Hess [Tue, 6 Dec 2016 19:05:44 +0000 (15:05 -0400)]
added StoreContentTo
This is needed in addition to StoreContent, because retrieveKeyFile can
be used to retrieve to different destination files, not only the tmp
file for a key.
This commit was sponsored by Ole-Morten Duesund on Patreon.
Joey Hess [Fri, 2 Dec 2016 18:49:22 +0000 (14:49 -0400)]
initial implementation of P2P.Annex runner
Untested, and it does not yet update transfer logs.
Verifying transferred content is modeled on git-annex-shell recvkey.
In a direct mode or annex.thin repository, content can change while it's
being transferred. So, verification is always done, even if annex.verify
would normally prevent it.
Note that a WORM or URL key could change in a way the verification
doesn't catch. That can happen in git-annex-shell recvkey too. We don't
worry about it, because those key backends don't guarantee preservation
of data. (Which is to say, I worried about it, and then convinced myself
again it was ok.)
Joey Hess [Fri, 2 Dec 2016 17:50:56 +0000 (13:50 -0400)]
make remote-daemon able to send and receive objects over tor
Each worker thread needs to run in the Annex monad, but the
remote-daemon's liftAnnex can only run 1 action at a time. Used
Annex.Concurrent to deal with that.
Joey Hess [Fri, 2 Dec 2016 17:45:45 +0000 (13:45 -0400)]
make sure that the specified number of bytes of DATA are always sent
It's possible, in direct or thin mode, that an object file gets
truncated or appended to as it's being sent. This would break the
protocol badly, so make sure never to send too many bytes, and to
close the protocol connection if too few bytes are available.
Joey Hess [Wed, 30 Nov 2016 16:50:49 +0000 (12:50 -0400)]
prefer xdot over dot
* map: Run xdot if it's available in PATH. On OSX, the dot command
does not support graphical display, while xdot does.
* Debian: xdot is a better interactive viewer than dot, so Suggest
xdot, rather than graphviz.
Joey Hess [Tue, 29 Nov 2016 17:02:19 +0000 (13:02 -0400)]
move tor hidden service socket to /etc, temporarily violating the FHS
On Debian, apparmor prevents tor from reading from most locations. And,
it silently fails if it is prevented from reading the hidden service
socket. I filed #846275 about this; violating the FHS is the least bad of a
bad set of choices until that bug is fixed.
Joey Hess [Tue, 29 Nov 2016 17:37:16 +0000 (13:37 -0400)]
tighten added language
Removed part about neeing to install git-annex and git in the same
location. The installer checks if the location given exists, and if not,
tells the user that git is not installed there. And the default should
work if the user just picks it in both installers.
With all due respect, the link to the instructions for each OS is in the
"detailed instructions" column. Adding a second link to the same thing
is unlikely to help.
Joey Hess [Tue, 22 Nov 2016 15:12:33 +0000 (11:12 -0400)]
fix regression
The file matcher needs to be run on the destination file not the tmp
file, in order for filename matches to work properly. However, it also
needs to be able to probe the file for size and mime type.
This is a quick fix to a regression. The double rename is not pretty.
It would be good to either have a way to run the largeFileMatcher
such that it is matching on the final filename but looks at the temp
file, or to make addAnnexedFile not need the temp file in a different
location.
Joey Hess [Tue, 22 Nov 2016 03:46:59 +0000 (23:46 -0400)]
Relicense 5 source files that are not part of the webapp from AGPL to GPL.
Building w/o the webapp is not supposed to pull in any AGPLed files.
I appear to have written all the code in these files;
the only commit by anyone else is 64e844e1fefca513d143e3f74a54dfc6d526a2ff
and is a spelling fix that is not copyrightable.
Joey Hess [Tue, 22 Nov 2016 00:56:58 +0000 (20:56 -0400)]
try to gather scattered writes
git upload-pack makes some uncessary writes in sequence, this tries to
gather them together to avoid needing to send multiple DATA packets when
just one will do.
In a small pull, this reduces the average number of DATA packets from
4.5 to 2.5.
Joey Hess [Mon, 21 Nov 2016 15:30:53 +0000 (11:30 -0400)]
addurl: Fix bug in checking annex.largefiles expressions using largerthan, mimetype, and smallerthan; the first two always failed to match, and the latter always matched.
Joey Hess [Sun, 20 Nov 2016 16:08:16 +0000 (12:08 -0400)]
implement p2p protocol for Handle
This is most of the way to having the p2p protocol working over tor
hidden services, at least enough to do git push/pull.
The free monad was split into two, one for network operations and the
other for local (Annex) operations. This will allow git-remote-tor-annex
to run only an IO action, not needing the Annex monad.
This commit was sponsored by Remy van Elst on Patreon.
Joey Hess [Sat, 19 Nov 2016 20:30:57 +0000 (16:30 -0400)]
extend p2p protocol to support gitremote-helpers connect
A bit tricky since Proto doesn't support threads. Rather than adding
threading support to it, ended up using a callback that waits for both
data on a Handle, and incoming messages at the same time.
This commit was sponsored by Denis Dzyubenko on Patreon.