From 693ff4f6bff7c2f2f708d908dcbf52fc402c62ba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 15 Mar 2005 15:42:11 +0000 Subject: [PATCH] * Some more updates. --- doc/manual/nix-push.xml | 194 +++++++++++++++++---------------------- doc/manual/nix-store.xml | 2 +- 2 files changed, 87 insertions(+), 109 deletions(-) diff --git a/doc/manual/nix-push.xml b/doc/manual/nix-push.xml index be704d746..c9c4b40c6 100644 --- a/doc/manual/nix-push.xml +++ b/doc/manual/nix-push.xml @@ -1,138 +1,116 @@ - - nix-push - push store paths onto a network cache - - - - nix-push - archives-put-url - archives-get-url - manifest-put-url - paths - - + + nix-push + push store paths onto a network cache + - - Description + + + nix-push + + + archives-put-url + archives-get-url + manifest-put-url + + + + archives-dir + manifest-file + + + paths + + - - The command nix-push builds a set of store - expressions (if necessary), and then packages and uploads all - store paths in the resulting closures to a server. A network - cache thus populated can subsequently be used to speed up - software deployment on other machines using the - nix-pull command. - - - nix-push performs the following actions. +Description + +The command nix-push builds a set of store +paths (if necessary), and then packages and uploads all store paths in +the resulting closures to a server. A network cache thus populated +can subsequently be used to speed up software deployment on other +machines using the nix-pull command. + +nix-push performs the following actions. - + - - - The store expressions stored in - paths are realised (using - nix-store --realise). - - + Each path in paths is + realised (using nix-store + --realise). - - - All paths in the closure of the store expressions stored - in paths are determined (using - nix-store --query --requisites - --include-successors). It should be noted that - since the flag is - used, if you specify a derivation store expression, you - get a combined source/binary distribution. If you only - want a binary distribution, you should specify the closure - store expression that result from realising these (see - below). - - + All paths in the closure of the store expressions + stored in paths are determined (using + nix-store --query --requisites + --include-outputs). It should be noted that since the + flag is used, you get a combined + source/binary distribution. - - - All store paths determined in the previous step are - packaged and compressed into a bzipped - NAR archive (extension .nar.bz2). - - + All store paths determined in the previous step are + packaged and compressed into a bzipped NAR + archive (extension .nar.bz2). - - - A manifest is created that contains - information on the store paths, their eventual URLs in the - cache, and cryptographic hashes of the contents of the NAR - archives. - - + A manifest is created that + contains information on the store paths, their eventual URLs in the + cache, and cryptographic hashes of the contents of the NAR + archives. - - - Each store path is uploaded to the remote directory - specified by archives-put-url. - HTTP PUT requests are used to do this. However, before a - file x is uploaded to - archives-put-url/x, - nix-push first determines whether this - upload is unnecessary by issuing a HTTP HEAD request on - archives-get-url/x. - This allows a cache to be shared between many partially - overlapping nix-push invocations. - (We use two URLs because the upload URL typically - refers to a CGI script, while the download URL just refers - to a file system directory on the server.) - - + Each store path is uploaded to the remote directory + specified by archives-put-url. HTTP PUT + requests are used to do this. However, before a file + x is uploaded to + archives-put-url/x, + nix-push first determines whether this upload is + unnecessary by issuing a HTTP HEAD request on + archives-get-url/x. + This allows a cache to be shared between many partially overlapping + nix-push invocations. (We use two URLs because + the upload URL typically refers to a CGI script, while the download + URL just refers to a file system directory on the server.) - - - The manifest is uploaded using an HTTP PUT request to - manifest-put-url. The - corresponding URL to download the manifest can then be - used by nix-pull. - - + The manifest is uploaded using an HTTP PUT request + to manifest-put-url. The corresponding + URL to download the manifest can then be used by + nix-pull. - - + + + + +TODO: - + - - Examples - - To upload files there typically is some CGI script on the server - side. This script should be be protected with a password. The - following example uploads the store paths resulting from - building the Nix expressions in foo.nix, - passing appropriate authentication information: +Examples + +To upload files there typically is some CGI script on the server +side. This script should be be protected with a password. The +following example uploads the store paths resulting from building the +Nix expressions in foo.nix, passing appropriate +authentication information: - + $ nix-push \ http://foo@bar:server.domain/cgi-bin/upload.pl/cache \ http://server.domain/cache \ http://foo@bar:server.domain/cgi-bin/upload.pl/MANIFEST \ $(nix-instantiate foo.nix) - This will push both sources and binaries (and any build-time - dependencies used in the build, such as compilers). - +This will push both sources and binaries (and any build-time +dependencies used in the build, such as compilers). - - If we just want to push binaries, not sources and build-time - dependencies, we can do: +If we just want to push binaries, not sources and build-time +dependencies, we can do: - + $ nix-push urls $(nix-instantiate $(nix-store -r foo.nix)) - + - + diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index 1955a9b68..9304c4bec 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -86,7 +86,7 @@ - + Operation <option>--realise</option>