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