Use http-conduit for url downloads by default, annex.web-options enables curl
* For url downloads, git-annex now defaults to using a http library, rather than wget or curl. But, if annex.web-options is set, it will use curl. To use the .netrc file, run: git config annex.web-options --netrc * git-annex no longer uses wget (and wget is no longer shipped with git-annex builds). Note that curl is always run in silent mode, since the new API for download has a MeterUpdate and doesn't make way for curl progress output. It might be worth writing a parser for curl's progress output to update the meter when using it, but I didn't bother with this edge case for now. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
0791c24221
commit
c34152777b
17 changed files with 104 additions and 181 deletions
|
@ -69,14 +69,6 @@ preferredBundledPrograms = catMaybes
|
|||
, Just "rsync"
|
||||
#ifndef mingw32_HOST_OS
|
||||
, Just "sh"
|
||||
#endif
|
||||
#ifndef mingw32_HOST_OS
|
||||
#ifndef darwin_HOST_OS
|
||||
-- wget on OSX has been problematic, looking for certs in the wrong
|
||||
-- places. Don't ship it, use curl or the OSX's own wget if it has
|
||||
-- one.
|
||||
, ifset BuildInfo.wget "wget"
|
||||
#endif
|
||||
#endif
|
||||
, BuildInfo.lsof
|
||||
, BuildInfo.gcrypt
|
||||
|
|
|
@ -6,14 +6,11 @@ module Build.Configure where
|
|||
|
||||
import Build.TestConfig
|
||||
import Build.Version
|
||||
import Utility.PartialPrelude
|
||||
import Utility.Process
|
||||
import Utility.SafeCommand
|
||||
import Utility.ExternalSHA
|
||||
import Utility.Env.Basic
|
||||
import Utility.Exception
|
||||
import qualified Git.Version
|
||||
import Utility.DottedVersion
|
||||
import Utility.Directory
|
||||
|
||||
import Control.Monad.IfElse
|
||||
|
@ -34,8 +31,6 @@ tests =
|
|||
, TestCase "xargs -0" $ testCmd "xargs_0" "xargs -0 </dev/null"
|
||||
, TestCase "rsync" $ testCmd "rsync" "rsync --version >/dev/null"
|
||||
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
|
||||
, TestCase "wget" $ testCmd "wget" "wget --version >/dev/null"
|
||||
, TestCase "wget unclutter options" checkWgetUnclutter
|
||||
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
|
||||
, TestCase "nice" $ testCmd "nice" "nice true >/dev/null"
|
||||
, TestCase "ionice" $ testCmd "ionice" "ionice -c3 true >/dev/null"
|
||||
|
@ -106,19 +101,6 @@ getGitVersion = go =<< getEnv "FORCE_GIT_VERSION"
|
|||
error $ "installed git version " ++ show v ++ " is too old! (Need " ++ show oldestallowed ++ " or newer)"
|
||||
return $ Config "gitversion" $ StringConfig $ show v
|
||||
|
||||
checkWgetUnclutter :: Test
|
||||
checkWgetUnclutter = Config "wgetunclutter" . BoolConfig
|
||||
. maybe False (>= normalize "1.16")
|
||||
<$> getWgetVersion
|
||||
|
||||
getWgetVersion :: IO (Maybe DottedVersion)
|
||||
getWgetVersion = catchDefaultIO Nothing $
|
||||
extract <$> readProcess "wget" ["--version"]
|
||||
where
|
||||
extract s = case lines s of
|
||||
[] -> Nothing
|
||||
(l:_) -> normalize <$> headMaybe (drop 2 $ words l)
|
||||
|
||||
getSshConnectionCaching :: Test
|
||||
getSshConnectionCaching = Config "sshconnectioncaching" . BoolConfig <$>
|
||||
boolSystem "sh" [Param "-c", Param "ssh -o ControlPersist=yes -V >/dev/null 2>/dev/null"]
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
- for that.
|
||||
-
|
||||
- To build the installer, git-annex should already be built to
|
||||
- ./git-annex.exe and the necessary utility programs (rsync and wget)
|
||||
- ./git-annex.exe and the necessary utility programs
|
||||
- (specifically rsync)
|
||||
- already installed in PATH from msys32.
|
||||
-
|
||||
- Copyright 2013-2015 Joey Hess <id@joeyh.name>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue