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.
Joey Hess [Fri, 18 Nov 2016 05:32:24 +0000 (01:32 -0400)]
Add content locking to P2P protocol
Is content locking needed in the P2P protocol? Based on re-reading
bugs/concurrent_drop--from_presence_checking_failures.mdwn,
I think so: Peers can form cycles, and multiple peers can all be trying
to drop the same content.
So, added content locking to the protocol, with some difficulty.
The implementation is fine as far as it goes, but note the warning
comment for lockContentWhile -- if the connection to the peer is dropped
unexpectedly, the peer will then unlock the content, and yet the local
side will still think it's locked.
To be honest I'm not sure if Remote.Git's lockKey for ssh remotes
doesn't have the same problem. It checks that the
"ssh remote git-annex-shell lockcontent"
process has not exited, but if the connection closes afer that check,
the lockcontent command will unlock it, and yet the local side will
still think it's locked.
Probably this needs to be fixed by eg, making lockcontent catch any
execptions due to the connection closing, and in that case, wait a
significantly long time before dropping the lock.
This commit was sponsored by Anthony DeRobertis on Patreon.
Joey Hess [Thu, 17 Nov 2016 21:19:04 +0000 (17:19 -0400)]
implementation of peer-to-peer protocol
For use with tor hidden services, and perhaps other transports later.
Based on Utility.SimpleProtocol, it's a line-based protocol,
interspersed with transfers of bytestrings of a specified size.
Implementation of the local and remote sides of the protocol is done
using a free monad. This lets monadic code be included here, without
tying it to any particular way to get bytes peer-to-peer.
This adds a dependency on the haskell package "free", although that
was probably pulled in transitively from other dependencies already.
This commit was sponsored by Jeff Goeke-Smith on Patreon.