openpkg/mirror.pod

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

michael@428 1 ##
michael@428 2 ## mirror.pod -- OpenPKG Package Mirroring
michael@428 3 ## Copyright (c) 2011-2012 OpenPKG GmbH <http://openpkg.com/>
michael@428 4 ##
michael@428 5 ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
michael@428 6 ## All rights reserved. Licenses which grant limited permission to use,
michael@428 7 ## copy, modify and distribute this software are available from the
michael@428 8 ## OpenPKG GmbH.
michael@428 9 ##
michael@428 10 ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
michael@428 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@428 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@428 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@428 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@428 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@428 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@428 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@428 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@428 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@428 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@428 21 ## SUCH DAMAGE.
michael@428 22 ##
michael@428 23
michael@428 24 =pod
michael@428 25
michael@428 26 =head1 NAME
michael@428 27
michael@428 28 B<openpkg mirror> - B<OpenPKG> Package Mirroring
michael@428 29
michael@428 30 =head1 SYNOPSIS
michael@428 31
michael@428 32 B<openpkg>
michael@428 33 B<mirror>
michael@428 34 [B<-h>]
michael@428 35 [B<-f>]
michael@428 36 [B<-q>]
michael@428 37 [B<-C> I<local-cache-file>]
michael@428 38 [B<-r> I<remote-url>]
michael@428 39 [B<-p> I<remote-url-prefix>]
michael@428 40 I<local-dir-prefix> ...
michael@428 41
michael@428 42 =head1 DESCRIPTION
michael@428 43
michael@428 44 The B<openpkg mirror> tool is a frontend for mirroring OpenPKG
michael@428 45 repositories, based on the OpenPKG XML/RDF index files B<openpkg
michael@428 46 index -S -T -D> creates. The resulting mirror can then be used with
michael@428 47 B<openpkg build>.
michael@428 48
michael@428 49 =head1 COMMAND LINE ARGUMENTS
michael@428 50
michael@428 51 The following command line options and arguments exist:
michael@428 52
michael@428 53 =over 4
michael@428 54
michael@428 55 =item B<-h>
michael@428 56
michael@428 57 Print usage help.
michael@428 58
michael@428 59 =item B<-f>
michael@428 60
michael@428 61 Force deletion of local files, even if more than 30% of the existing
michael@428 62 local files have to be removed.
michael@428 63
michael@428 64 =item B<-q>
michael@428 65
michael@428 66 More quiet operation, i.e., do not print interactive download progress
michael@428 67 bars.
michael@428 68
michael@428 69 =item B<-C> I<local-cache-file>
michael@428 70
michael@428 71 Use the text-file I<local-cache-file> for caching size/mtime/MD5
michael@428 72 information of local files in order to especially avoid the expensive
michael@428 73 re-calculation of MD5 message digests of local files on every mirror
michael@428 74 operation. It is strongly advised to use such a cache. Do NOT place
michael@428 75 I<local-cache-file> under I<local-dir-prefix>.
michael@428 76
michael@428 77 =item B<-r> I<remote-url>
michael@428 78
michael@428 79 The OpenPKG repository URL. By default the same URL as for B<openpkg
michael@428 80 build> is used: C<http://download.openpkg.org/stacks/current/source/>
michael@428 81
michael@428 82 =item B<-p> I<remote-url-prefix>
michael@428 83
michael@428 84 In case the I<remote-url> (option B<-r> above) points NOT to a
michael@428 85 root/base directory of the remote repository, it is required to
michael@428 86 provide the corresponding base directory I<remote-url-prefix> in
michael@428 87 order to allow all remote paths to be correctly mapped to sub-paths
michael@428 88 under I<local-dir-prefix>. By default I<remote-url-prefix> is
michael@428 89 just I<remote-url>. For the public OpenPKG default repository URL
michael@428 90 C<http://download.openpkg.org/stacks/current/source/> the corresponding
michael@428 91 I<remote-url-prefix> is C<http://download.openpkg.org/>.
michael@428 92
michael@428 93 =item I<local-dir-prefix>
michael@428 94
michael@428 95 The local base directory under which the mirror is established.
michael@428 96 Content-wise it directly corresponds to I<remote-url-prefix> (option
michael@428 97 B<-p> above).
michael@428 98
michael@428 99 =back
michael@428 100
michael@428 101 =head1 EXAMPLE
michael@428 102
michael@428 103 The following command mirrors the public OpenPKG-CURRENT repository
michael@428 104 files from download.openpkg.org to the local directory F<download/>. The
michael@428 105 prefix specification is important as the OpenPKG-CURRENT stack index
michael@428 106 points upwards.
michael@428 107
michael@428 108 $ openpkg mirror \
michael@428 109 -C download.cache \
michael@428 110 -r http://download.openpkg.org/stacks/current/source/ \
michael@428 111 -p http://download.openpkg.org/ \
michael@428 112 download/
michael@428 113
michael@428 114 The mirror now can be used with B<openpkg build>:
michael@428 115
michael@428 116 $ openpkg build \
michael@428 117 -r file://`pwd`/download/stacks/current/source/ \
michael@428 118 -Uaq | sh
michael@428 119
michael@428 120 =head1 SEE ALSO
michael@428 121
michael@428 122 index(8).
michael@428 123
michael@428 124 =head1 HISTORY
michael@428 125
michael@428 126 The B<openpkg mirror> command was invented in May 2012 by I<Ralf
michael@428 127 S. Engelschall> E<lt>rse@engelschall.comE<gt> for use inside the
michael@428 128 B<OpenPKG> project E<lt>http://www.openpkg.org/E<gt>.
michael@428 129
michael@428 130 =head1 AUTHORS
michael@428 131
michael@428 132 Ralf S. Engelschall
michael@428 133 rse@engelschall.com
michael@428 134 www.engelschall.com
michael@428 135
michael@428 136 =cut
michael@428 137

mercurial