source: project/wiki/eggref/5/henrietta-cache @ 36510

Last change on this file since 36510 was 36510, checked in by sjamaan, 14 months ago

Add henrietta-cache to eggref/5

File size: 6.6 KB
Line 
1[[tags: egg]]
2
3== Henrietta-cache
4
5=== Description
6
7A caching helper for [[Henrietta]] which fetches eggs from various sources.
8
9=== Requirements
10
11* [[srfi-1]]
12* [[http-client]]
13* [[matchable]]
14* A {{gunzip}} in {{$PATH}} for extracting GZIP-files to stdout.
15* A {{bunzip2}} in {{$PATH}} for extracting BZIP2-files to stdout.
16* A semi-modern {{tar}} in {{$PATH}}. It should accept the "xf -" switches to mean "extract the tar file which is offered on stdin". It should also allow extended GNU tarfiles, as some eggs include filenames longer than 64 characters. Most tar implementations do.
17
18=== Documentation
19
20This egg installs a small program called {{henrietta-cache}} which reads
21a file containing egg-to-URI mappings.  These URIs are expected to resolve
22to a so-called "release-info" file, which provides further instructions on
23how to fetch actual releases of the egg.
24
25These releases are downloaded into a caching directory, which can then be
26served by [[henrietta]] for use by {{chicken-install}}.
27
28Henrietta-cache can be invoked as follows:
29
30  henrietta-cache [-h] [-r|-chicken-release RELEASE] [-c|-cache-dir CACHEDIR] [-e|-egg-list EGGLIST] [-i|-init-file INITFILE]
31
32The {{CACHEDIR}} points at the directory in which to place the cached
33files.  It defaults to "{{cache}}".  It will automatically create a
34subdirectory for each egg in the list, under which it creates one
35subdirectory for each egg release.  This structure is used because it
36is expected by henrietta, and may change in the future.
37
38The {{EGGLIST}} points to a file containing the list of eggs to fetch.
39It may be either a filename or an HTTP(S) URI.
40
41The {{RELEASE}} indicates a major CHICKEN release.  This will only be
42used when performing requests to get the correct URI.
43
44The {{INITFILE}} is a file which will be loaded before starting the download process. This can be used to set handlers on the hooks, as documented below.
45
46For more information about the structure of {{release-info}} files
47and what types of entries they can contain, see the
48[[/releasing-your-egg|tutorial on releasing eggs]] and the
49[[/distributed-egg-repos|distributed egg repositories design document]].
50
51=== Hooks
52
53<parameter>(download-release-success-hook [SUCCESS-HOOK])</parameter>
54
55This is a hook you can register to run some code whenever a full release of an egg has been successfully downloaded.
56
57{{SUCCESS-HOOK}} is a procedure of three arguments: the major CHICKEN release (an integer), the egg name and the release version (both strings).
58
59<parameter>(download-release-error-hook [ERROR-HOOK])</parameter>
60
61This is a hook you can register to run some code whenever a full release of an egg has failed to download.
62
63{{ERROR-HOOK}} is a procedure of four arguments: the major CHICKEN release (an integer), the egg name, the release version and the error message on the exception that was thrown when the failure happened (the latter three are all strings).
64
65<parameter>(download-release-info-file-error-hook [ERROR-HOOK])</parameter>
66
67This is a hook you can register to run some code whenever the download of the release-info file of an egg failed.
68
69{{ERROR-HOOK}} is a procedure of four arguments: the major CHICKEN release (an integer), the egg name, the URI-string of the release-info file's location and the error message on the exception that was thrown when the failure happend (the latter three are all strings).
70
71
72=== Changelog
73
74* 1.2 - Add support for CHICKEN 5, drop support for CHICKEN versions older than 4.6.  Add support for CHICKEN 5's {{distribution-files}} option for {{chicken-install}} (thanks to [[/users/mario-domenech-goulart|Mario Goulart]] for the initial patch).
75* 1.1 - Use {{gunzip -c}} and {{bunzip2 -c}} instead of {{zcat}} and {{bzcat}} for compat reasons: On OS X, {{zcat}} does not accept gzipped files, and on many Linux distributions, {{gzcat}} does not exist.  Reported by Jim Ursetto.
76* 1.0 - Add support for major CHICKEN release under the cache dir.  Hooks are incompatible now because they get an extra leading argument!  The "tags" directory is no longer inserted in between the egg and version name.
77* 0.4.1 - Skip over {{pax_global_header}}.  Thanks to Carl Douglas and [[/users/mario-domenech-goulart|Mario Goulart]] for reporting this.
78* 0.4 - Use {{tar}} instead of {{pax}}, as it won't accept extended GNU tar files (and ustar archives have crippling limitations on maximum file length). Thanks to [[/users/alaric-blagrave-snellpym|Alaric Snell-Pym]] for pointing out this problem. Make downloads more robust against failure by downloading/extracting to a tempdir and moving only when everything is alright.
79* 0.3 - Fix URI encoding bug in template replacement of location strings. Add initialisation file and hooks for error notification scripts (thanks to [[/users/Moritz-Heidkamp|Moritz Heidkamp]]).
80* 0.2.3 - Fix bug introduced in 0.2.2 that caused an extra directory level in the hierarchy under the tagname.
81* 0.2.2 - Fix for moving files across filesystems
82* 0.2.1 - Ensure paths are always treated as directories, fix bug with Apache CGI output from pseudo-meta-egg-info
83* 0.2 - Add files-list type
84* 0.1.1 - Improved error reporting. (Thanks to [[/users/felix-winkelmann|Felix Winkelmann]])
85* 0.1 - Initial release
86
87=== Author
88
89[[/users/peter-bex|Peter Bex]]
90
91=== Repository
92
93[[http://code.more-magic.net/henrietta-cache]]
94
95=== License
96
97  Copyright (c) 2011-2015, Peter Bex
98  All rights reserved.
99 
100  Redistribution and use in source and binary forms, with or without
101  modification, are permitted provided that the following conditions
102  are met:
103  1. Redistributions of source code must retain the above copyright
104     notice, this list of conditions and the following disclaimer.
105  2. Redistributions in binary form must reproduce the above copyright
106     notice, this list of conditions and the following disclaimer in the
107     documentation and/or other materials provided with the distribution.
108  3. The name of the authors may not be used to endorse or promote products
109     derived from this software without specific prior written permission.
110 
111  THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
112  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
113  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
114  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
115  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
116  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
117  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
118  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
119  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
120  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Note: See TracBrowser for help on using the repository browser.