1 .TH 0STORE 1 "2010" "Thomas Leonard" ""
3 0store \(em manage the implementation cache
8 \fBDIGEST\fP \fBDIRECTORY\fP
11 \fBDIGEST\fP \fBARCHIVE\fP [ \fBEXTRACT\fP ]
14 [ \fBDIRECTORY\fP ... ]
17 \fBDIRECTORY\fP [ \fBDIRECTORY\fP ]
25 \fBDIRECTORY\fP [ \fBALGORITHM\fP ]
31 ( \fBDIGEST\fP | \fBDIRECTORY\fP )
35 0store provides access to the low-level implementation cache. Normally, the
36 cache is updated automatically using 0launch(1).
40 To add a directory to the store (makes a copy):
42 .B 0store add sha256=XXX directory
45 To add an archive to the store:
47 .B 0store add sha256=XXX archive.tgz
50 To add a subdirectory of an archive to the store:
52 .B 0store add sha256=XXX archive.tgz subdir
55 The actual digest is calculated and compared to the given one. If they don't
56 match, the operation is rejected.
60 Verifies every implementation in each of the given cache directories, or in all of the
61 default cache directories if no arguments are given. This will detect any packages which
62 have been tampered with since they were unpacked. If 0store itself could have been
63 modified by an attacker, mount the suspect file-system on a known-good machine and
64 run that machine's 0store on the mounted cache directory.
67 See the "verify" command below for details of the verification performed on each package.
71 To copy an implementation (a directory with a name in the form
72 "algorithm=value"), use the copy function. This is similar to performing
73 a normal recursive directory copy followed by a
75 to check that the name matches the contents. E.g.:
77 .B 0store copy ~someuser/.cache/0install.net/implementations/sha256=XXX /var/cache/0install.net/implementations/
81 To find the path of a stored item:
83 .B 0store find sha256=XXX
88 See the list of implementation caches currently configured:
92 To add directories to this list, add them to your 'implementation\-dirs'
97 To generate the manifest for a directory structure:
99 .B 0store manifest DIRECTORY [ALGORITHM]
102 The manifest lists every file and directory in the tree, along with the
103 digest of each file, thus uniquely identifying that particular set of files.
104 After the manifest, the last line gives the digest of the manifest itself.
107 This value is needed when creating feed files. However, the 0publish
108 command will automatically calculate the required digest for you and add it
109 to a feed file. See the packager's guide on the Zero Install web site for
112 Supported algorithms are 'sha1' (supported by all versions), 'sha1new'
113 (requires injector 0.20 or later) and 'sha256' (requires injector 0.20 or later
114 AND the Python hashlib module).
118 To hard-link duplicate files together to save space:
120 .B 0store optimise [CACHE]
123 This reads in all the manifest files in the cache directory (~/.cache/0install.net/implementations
124 by default) and looks for duplicates (files with the same permissions, modification time and digest).
125 When it finds a pair, it deletes one and replaces it (atomically) with a hard-link to the other.
128 Implementations using the old 'sha1' algorithm are not optimised.
132 To check that an item is stored correctly:
134 .B 0store verify /path/to/sha256=XXX
136 This calculates the manifest of the directory and checks that its digest matches
137 the directory's name. It also checks that it matches the digest of the .manifest
138 file inside the directory. If the .manifest doesn't correspond to the current
139 tree, it displays a list of the differences (in unified diff format).
141 .SH COMMAND-LINE OPTIONS
144 \fB\-h\fP, \fB\-\-help\fP
145 Show the built-in help text.
148 \fB\-v\fP, \fB\-\-verbose\fP
149 More verbose output. Use twice for even more verbose output.
152 \fB\-V\fP, \fB\-\-version\fP
153 Display version information.
157 .IP "~/.cache/0install.net/implementations"
158 Cached implementations, indexed by manifest digest.
160 .IP "~/.config/0install.net/injector/implementation\-dirs"
161 List of system cache directories, one per line.
165 Copyright (C) 2010 Thomas Leonard.
168 You may redistribute copies of this program under the terms of the GNU Lesser General Public License.
172 Please report bugs to the developer mailing list:
174 http://0install.net/support.html
178 The Zero Install Injector was created by Thomas Leonard.
181 0alias(1), 0launch(1), 0store\-secure\-add(1)
183 The Zero Install web-site:
185 .B http://0install.net