summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
* cleanupGravatar Joey Hess2016-11-29
|
* finish git-annex enable-torGravatar Joey Hess2016-11-29
| | | | | Make it stash the address away for git-annex p2p to use later, rather than outputting it. And, look up the UUID itself.
* move tor hidden service socket to /etc, temporarily violating the FHSGravatar Joey Hess2016-11-29
| | | | | | | 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.
* unified AuthToken type between webapp and torGravatar Joey Hess2016-11-22
|
* pull/push over tor working nowGravatar Joey Hess2016-11-21
| | | | | | | | | | | | | | Still a couple bugs: * Closing the connection to the server leaves git upload-pack / receive-pack running, which could be used to DOS. * Sometimes the data is transferred, but it fails at the end, sometimes with: git-remote-tor-annex: <socket: 10>: commitBuffer: resource vanished (Broken pipe) Must be a race condition around shutdown.
* Added git-remote-tor-annex, which allows git pull and push to the tor hidden ↵Gravatar Joey Hess2016-11-21
| | | | | | | | | | | service. Almost working, but there's a bug in the relaying. Also, made tor hidden service setup pick a random port, to make it harder to port scan. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* remotedaemon: serve tor hidden serviceGravatar Joey Hess2016-11-20
|
* extend p2p protocol to support gitremote-helpers connectGravatar Joey Hess2016-11-19
| | | | | | | | 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.
* implementation of peer-to-peer protocolGravatar Joey Hess2016-11-17
| | | | | | | | | | | | | | | | 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.
* Merge branch 'master' into torGravatar Joey Hess2016-11-17
|\
| * allow Utility.Exception to still be used when not building with cabalGravatar Joey Hess2016-11-15
| |
| * Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* | use socket for tor hidden serviceGravatar Joey Hess2016-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids needing to bind to the right port before something else does. The socket is in /var/run/user/$uid/ which ought to be writable by only that uid. At least it is on linux systems using systemd. For Windows, may need to revisit this and use ports or something. The first version of tor to support sockets for hidden services was 0.2.6.3. That is not in Debian stable, but is available in backports. This commit was sponsored by andrea rota.
* | git-annex enable-tor commandGravatar Joey Hess2016-11-14
|/ | | | | | | | | | | | | | | | | | Tor unfortunately does not come out of the box configured to let hidden services register themselves on the fly via the ControlPort. And, changing the config to enable the ControlPort and a particular type of auth for it may break something already using the ControlPort, or lessen the security of the system. So, this leaves only one option to us: Add a hidden service to the torrc. git-annex enable-tor does so, and picks an unused high port for tor to listen on for connections to the hidden service. It's up to the caller to somehow pick a local port to listen on that won't be used by something else. That may be difficult to do.. This commit was sponsored by Jochen Bartl on Patreon.
* webapp: Explicitly avoid checking for auth in static subsite requests.Gravatar Joey Hess2016-11-10
| | | | | | | | Yesod didn't used to do auth checks for that, but this may have changed. I don't have a way to reproduce the reported problem yet, but this change certianly won't hurt anything. This commit was sponsored by Thom May on Patreon.
* restart coprocess in raw modeGravatar Joey Hess2016-11-01
| | | | | | | | | | | Restarting a crashing git process could result in filename encoding issues when not in a unicode locale, as the restarted processes's handles were not read in raw mode. Since rawMode is always used when starting a coprocess, didn't bother to parameterise it and just always enable it for simplicity. This commit was sponsored by Jake Vosloo on Patreon.
* test: Deal with gpg-agent behavior change that broke the test suite.Gravatar Joey Hess2016-10-18
| | | | | | | | gpg-agent started deleting its socket file on shutdown, and this tickled an ugly behavior in removeDirectoryRecursive, https://github.com/haskell/directory/issues/60 Running removeDirectoryRecursive again on exception avoids the problem.
* use System.Directory not Utility.DirectoryGravatar Joey Hess2016-09-22
| | | | | This module does not use isSymbolicLink so avoid depending on extra Utility.* stuff, to make it more easily reused elsewhere.
* avoid needing PartialPreludeGravatar Joey Hess2016-09-22
|
* use takeDirectory instead of parentDirGravatar Joey Hess2016-09-22
| | | | | No need for a trailing slash in the directory here, so avoid pulling in an extra module.
* avoid using split unnecessarilyGravatar Joey Hess2016-09-22
| | | | I'd like to get rid of all uses of Data.String.Utils eventually..
* remove redundant constraintGravatar Joey Hess2016-09-15
|
* Improve gpg secret key list parser to deal with changes in gpg 2.1.15. Fixes ↵Gravatar Joey Hess2016-09-14
| | | | | | | | | | | key name display in webapp. gpg 2.1.15 (or so) seems to have added some new fields to the --with-colons --list-secret-keys output. These include "fpr" and "grp", and come before the "uid" line. So, the parser was giving up before it saw the name. Fix by continuing to look for the uid line until the next "sec" line. This commit was sponsored by Ole-Morten,Duesund on Patreon.
* drop incremental json object display; clean up codeGravatar Joey Hess2016-09-09
| | | | | | | | | | | | | This gets rid of quite a lot of ugly hacks around json generation. I doubt that any real-world json parsers can parse incomplete objects, so while it's not as nice to need to wait for the complete object, especially for commands like `git annex info` that take a while, it doesn't seem worth the added complexity. This also causes the order of fields within the json objects to be reordered. Since any real json parser shouldn't care, the only possible problem would be with ad-hoc parsers of the old json output.
* refactorGravatar Joey Hess2016-09-09
|
* Rate limit console progress display updates to 10 per second. Was updating ↵Gravatar Joey Hess2016-09-08
| | | | as frequently as changes were reported, up to hundreds of times per second, which used unncessary bandwidth when running git-annex over ssh etc.
* avoid deprecation warning from parseUrlGravatar Joey Hess2016-09-07
|
* switch away from deprecated interfaceGravatar Joey Hess2016-09-05
| | | | | Again the new stuff works back to network-2.4, so no need to adjust cabal bounds.
* Windows: Handle shebang in external special remote program.Gravatar Joey Hess2016-09-05
|
* avoid using Strings for JSON output; keep it ByteString throughoutGravatar Joey Hess2016-07-26
|
* Removed dependency on json library; all JSON is now handled by aeson.Gravatar Joey Hess2016-07-26
| | | | | I've eyeballed all --json commands, and the only difference should be that some fields are re-ordered.
* allow using Aeson for streaming JSON outputGravatar Joey Hess2016-07-26
| | | | | | | Keeping Text.JSON use for now, because it seems a better fit for most of the commands, which don't use very structured JSON objects, but just output whatever fields suites them. But this lets Aeson be used when a more structured data type is available to serialize to JSON.
* Support checking presence of content at a http url that redirects to a ftp url.Gravatar Joey Hess2016-07-12
|
* fix cabal configureGravatar Joey Hess2016-07-05
| | | | | MIN_VERSION_base macro is not defined at cabal configure time, so check MIN_VERSION_GLASGOW_HASKELL instead.
* handle SomeAsyncException same as AsyncExceptionGravatar Joey Hess2016-06-20
| | | | | This new class was added to base a while ago; I don't know what uses it, but it's intended to be an async exception, so make sure we don't catch it.
* fix build warning with new version of QuickCheckGravatar Joey Hess2016-06-13
|
* also avoid crashing in most circumstances if unable to determine the usernameGravatar Joey Hess2016-06-08
| | | | | | | | Mostly the username is only used for the git committer or other display purposes, and we can just fall back to a dummy value in these cases. The only remaining place where an error is thrown is when starting local pairing, which needs the username to be known.
* Avoid a crash if getpwuid does not work, when querying the user's full name.Gravatar Joey Hess2016-06-08
|
* split out module to work around badly named symbol in directory-1.2.6.2Gravatar Joey Hess2016-05-22
| | | | | | | Sadly my bug report about this is not going to get fixed it seems, so I have to drag around a whole added module file just to deal with it. https://github.com/haskell/directory/issues/52
* avoid warnings about not exported System.Directory.isSymbolicLinkGravatar Joey Hess2016-04-28
|
* Fix build with directory-1.2.6.2.Gravatar Joey Hess2016-04-28
| | | | | | It started exporting a isSymbolicLink which supports windows. But, git-annex does no use symlinks on windows yet and this conflicts with the function by the same name from unix-compat, so hide it.
* fix build on windows with older ghcGravatar Joey Hess2016-04-08
|
* hard links on windowsGravatar Joey Hess2016-04-08
| | | | | * annex.thin and annex.hardlink are now supported on Windows. * unannex --fast now makes hard links on Windows.
* build without disk-free-space on androidGravatar Joey Hess2016-03-08
|
* merge from propellorGravatar Joey Hess2016-03-06
|
* fix build with old ghcGravatar Joey Hess2016-03-05
|
* another windows build fixGravatar Joey Hess2016-03-05
|
* more windows build fixesGravatar Joey Hess2016-03-05
|
* fix windows build moreGravatar Joey Hess2016-03-05
|
* Merge branch 'no-cbits'Gravatar Joey Hess2016-03-05
|\