aboutsummaryrefslogtreecommitdiff
blob: b3cae8c8ca4742ed5f9a7ed0325e43edbbe65ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0"?>
<guide self="general-concepts/mirrors/">
<chapter>
<title>Mirrors</title>

<section>
<title>Automatic Mirroring</title>

<body>
<p>
Packages will automatically have their <c>SRC_URI</c> components mirrored onto
Gentoo mirrors.  When fetching, portage checks Gentoo mirrors first before
trying the original upstream location.
</p>

<p>
This is generally desired behaviour <d/> upstream mirrors are prone to being
rearranged, tidied out or having files modified.
</p>
</body>

<subsection>
<title>Restricting Automatic Mirroring</title>
<body>
<p>
Three <c>RESTRICT</c> keywords can be used to control the mirroring process.
</p>

<p>
The <c>RESTRICT=&quot;nomirror&quot;</c> setting should be used if we cannot legally mirror
certain files.
</p>

<p>
The <c>RESTRICT="primaryuri"</c> setting causes portage to try
original locations <e>first</e>, and then fall back to mirrors if necessary <d/> this
is sometimes useful if approximate download counts are needed, or if upstream
have a reliable mirror setup.
</p>

<p>
There is also <c>RESTRICT="fetch"</c>, which prevents portage from trying to
fetch anything manually. The `pkg_nofetch`_ function will be called if any
<c>SRC_URI</c> components cannot be found. This should only be used if a license
requires it.
</p>
</body>
</subsection>

<subsection>
<title>Suitable Download Hosts</title>
<body>
<p>
Hosting files off <c>dev.gentoo.org</c> is <b>not</b> acceptable for main-tree items.
Instead, these files must be moved onto <c>mirror://gentoo</c> before release.
</p>
</body>
</subsection>
</section>

<section>
<title>Gentoo Mirrors</title>

<body>
<p>
To manually upload a file to <c>mirror://gentoo</c>, <c>scp</c> it to
<c>dev.gentoo.org:/space/distfiles-local</c>. You must ensure that the permissions
are set to <c>ug+rw</c> manually. The file should appear on the mirrors within four
hours (note that this is <e>less frequent</e> than
<uri link="::general-concepts/cvs-to-rsync"/>).

If the upstream download location for a package uses a non-standard TCP port
(anything other than 21, 80 or 443), you <e>must</e> manually mirror the files. Not
doing so can cause all kinds of problems with strict firewalls.
</p>
</body>
</section>

<section>
<title>Mirroring Process</title>

<body>
<figure short="Mirroring Process" link="diagram.png">
Diagram showing the mirroring process.
</figure>
</body>
</section>

</chapter>
</guide>