about summary refs log tree commit diff
path: root/src/libstore/download.cc
AgeCommit message (Collapse)AuthorFilesLines
2018-09-03 download: fix size reported to progress barWill Dietz1-1/+1
2018-08-06 Fix Brotli decompression in 'nix log'Eelco Dolstra1-24/+44
This didn't work anymore since decompression was only done in the non-coroutine case. Decompressors are now sinks, just like compressors. Also fixed a bug in bzip2 API handling (we have to handle BZ_RUN_OK rather than BZ_OK), which we didn't notice because there was a missing 'throw': if (ret != BZ_OK) CompressionError("error while compressing bzip2 file");
2018-08-06 Fix reporting of HTTP body size when a result callback is usedEelco Dolstra1-1/+4
2018-08-02 s3 binary cache: support specifying an endpointGraham Christensen1-1/+1
Works for uploading and not downloading.
2018-07-31 Fix race downloading into a sinkEelco Dolstra1-6/+8
This fixes 'error 10 while decompressing xz file'. https://hydra.nixos.org/build/78308551
2018-06-18 Detect redirect loopsEelco Dolstra1-0/+2
Fixes #2225.
2018-06-05 Handle HTTP 410 Gone errorsEelco Dolstra1-1/+1
2018-06-05 Improve binary cache fallback testEelco Dolstra1-0/+5
2018-06-05 Further improve upload messagesEelco Dolstra1-8/+6
2018-06-01 download.cc: fix readCallback return type (int -> size_t)Will Dietz1-2/+2
I'm not sure if curl ever asks for enough data at once for truncation to occur but better safe than sorry.
2018-06-01 Improve binary cache upload messagesEelco Dolstra1-4/+14
Don't say "download" when we mean "upload".
2018-05-30 getDownloader(): SimplifyEelco Dolstra1-4/+2
2018-05-30 Make HttpBinaryCacheStore::narFromPath() run in constant memoryEelco Dolstra1-1/+91
This reduces memory consumption of nix copy --from https://cache.nixos.org --to ~/my-nix /nix/store/95cwv4q54dc6giaqv6q6p4r02ia2km35-blender-2.79 from 176 MiB to 82 MiB. (The remaining memory is probably due to xz decompression overhead.) Issue https://github.com/NixOS/nix/issues/1681. Issue https://github.com/NixOS/nix/issues/1969.
2018-05-30 Simplify the callback mechanismEelco Dolstra1-17/+20
2018-05-30 Move some Download-specific settings to download.ccEelco Dolstra1-8/+24
2018-05-25 libstore/download: remove unused function "getTime()"Will Dietz1-7/+0
2018-05-09 make sure not to use cached channels for nix-channel --updateYorick van Pelt1-2/+1
fixes #1964
2018-04-23 Merge branch 'hash-mismatch' of git://github.com/LnL7/nixShea Levy1-2/+2
2018-04-21 Merge pull request #1707 from dtzWill/fix/issue-1692Peter Simons1-1/+5
ignore "interrupted" exception in progress callback
2018-04-20 download: make hash mismatch error consistent with fetchurlDaiderd Jordan1-2/+2
2018-03-22 download: improve error for hash mismatch ("store mismatch")Will Dietz1-2/+7
Fixes #1905
2018-03-22 download.cc: fix path for cached filesWill Dietz1-1/+1
2018-03-16 Don't retry on CURLE_SSL_CACERT_BADFILEEelco Dolstra1-0/+1
The certificates won't get any better if we retry.
2018-03-14 Catch more possible instances of passing NULL to memcpy.Shea Levy1-0/+1
Actually fixes #1976.
2018-02-23 Fix downloadCached() with a chroot storeEelco Dolstra1-2/+2
E.g. nix run --store ~/my-nix -f channel:nixos-17.03 hello -c hello This problem was mentioned in #1897.
2018-01-31 Fix building without aws-sdk-cppEelco Dolstra1-4/+5
2018-01-31 Merge branch 'http-binary-cache-put-upsert' of https://github.com/adelbertc/nixEelco Dolstra1-1/+27
2018-01-31 Indent properlyEelco Dolstra1-3/+3
2018-01-26 HttpBinaryCacheStore: Support upsertFile with PUT.Shea Levy1-1/+27
Some servers, such as Artifactory, allow uploading with PUT and BASIC auth. This allows nix copy to work to upload binaries to those servers. Worked on together with @adelbertc
2018-01-19 Don't retry CURLE_URL_MALFORMATEelco Dolstra1-0/+1
2017-12-09 Fix for builds with system libcurl < 7.30Benjamin Hipple1-1/+3
CentOS 7.4 and RHEL 7.4 ship with libcurl-devel-7.29.0-42.el7.x86_64; this flag was added in 7.30.0 https://curl.haxx.se/libcurl/c/CURLMOPT_MAX_TOTAL_CONNECTIONS.html
2017-11-30 ignore "interrupted" exception in progress callbackWill Dietz1-1/+5
Context/discusson: https://github.com/NixOS/nix/issues/1692#issuecomment-348282301
2017-11-15 Add a "profile" option to S3BinaryCacheStoreEelco Dolstra1-1/+1
This allows specifying the AWS configuration profile to use. E.g. nix copy --from s3://my-cache?profile=aws-dev-account /nix/store/cf3isrlqavvd5w7rpky1fa8j9lcnlggm-...
2017-11-01 Add fetchMercurial primopEelco Dolstra1-1/+1
E.g. $ nix eval '(fetchMercurial https://www.mercurial-scm.org/repo/hello)' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "82e55d328c8ca4ee16520036c0aaace03a5beb65"; revCount = 1; shortRev = "82e55d328c8c"; } $ nix eval '(fetchMercurial { url = https://www.mercurial-scm.org/repo/hello; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; })' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; revCount = 0; shortRev = "0a04b987be5a"; } $ nix eval '(fetchMercurial /tmp/unclean-hg-tree)' { branch = "default"; outPath = "/nix/store/cm750cdw1x8wfpm3jq7mz09r30l9r024-source"; rev = "0000000000000000000000000000000000000000"; revCount = 0; shortRev = "000000000000"; }
2017-10-30 fetchurl/fetchTarball: Respect name changesEelco Dolstra1-1/+3
The computation of urlHash didn't take the name into account, so subsequent fetchurl calls with the same URL but a different name would resolve to the same cached store path.
2017-10-02 Reverse retry logic to retry in all but a few casesDan Peebles1-20/+37
It was getting too much like whac-a-mole listing all the retriable error conditions, so we now retry by default and list the cases where retrying is almost certainly hopeless.
2017-09-18 Don't remove Content-Encoding in fetchurl / nix-prefetch-urlEelco Dolstra1-1/+2
Fixes #1568.
2017-09-01 Abort curl downloads if there is no progress for 5 minutesEelco Dolstra1-1/+6
Maybe this will fix the curl hangs on macOS. (We could also use CURLOPT_TIMEOUT but that seems more of a sledgehammer.)
2017-08-31 Add an activity for binary cache queriesEelco Dolstra1-1/+1
2017-08-28 Give activities a verbosity level againEelco Dolstra1-1/+1
And print them (separately from the progress bar) given sufficient -v flags.
2017-08-25 Allow activities to be nestedEelco Dolstra1-1/+1
In particular, this allows more relevant activities ("substituting X") to supersede inferior ones ("downloading X").
2017-08-16 Progress indicator: CleanupEelco Dolstra1-1/+1
2017-08-16 Improve substitution progress indicatorEelco Dolstra1-6/+5
E.g. $ nix build --store local?root=/tmp/nix nixpkgs.firefox-unwrapped [0/1 built, 1/97/98 fetched, 65.8/92.8 MiB DL, 203.2/309.2 MiB copied] downloading 'https://cache.nixos.org/nar/1czm9fk0svacy4h6a3fzkpafi4f7a9gml36kk8cq1igaghbspg3k.nar.xz'
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim1-15/+15
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-11 fetchTarball: Prevent concurrent downloads of the same fileEelco Dolstra1-0/+4
Fixes #849.
2017-07-04 Support base-64 hashesEelco Dolstra1-1/+1
Also simplify the Hash API. Fixes #1437.
2017-07-03 Replace a few bool flags with enumsEelco Dolstra1-2/+2
Functions like copyClosure() had 3 bool arguments, which creates a severe risk of mixing up arguments. Also, implement copyClosure() using copyPaths().
2017-06-12 Provide a builtin default for $NIX_SSL_CERT_FILEEelco Dolstra1-3/+4
This is mostly to ensure that when Nix is started on macOS via a launchd service or sshd (for a remote build), it gets a certificate bundle.
2017-05-16 Improve progress indicatorEelco Dolstra1-32/+6
2017-05-11 Add an option for extending the user agent headerEelco Dolstra1-1/+3
This is useful e.g. for distinguishing traffic to a binary cache (e.g. certain machines can use a different tag in the user agent).