summaryrefslogtreecommitdiff
blob: f5e33f8588bb151bab122610fc070b2aded525b4 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>File system layout &#8212; Gentoo Policy Guide  documentation</title>
    <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Installed files" href="installed-files.html" />
    <link rel="prev" title="Ebuild file format" href="ebuild-format.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="file-system-layout">
<h1>File system layout<a class="headerlink" href="#file-system-layout" title="Permalink to this headline"></a></h1>
<div class="section" id="installation-paths">
<span id="index-0"></span><h2>Installation paths<a class="headerlink" href="#installation-paths" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Source</dt>
<dd class="field-odd"><p>QA</p>
</dd>
<dt class="field-even">Reference</dt>
<dd class="field-even"><p><a class="reference external" href="https://gitweb.gentoo.org/repo/gentoo.git/tree/metadata/install-qa-check.d/08gentoo-paths">https://gitweb.gentoo.org/repo/gentoo.git/tree/metadata/install-qa-check.d/08gentoo-paths</a></p>
</dd>
<dt class="field-odd">Reported</dt>
<dd class="field-odd"><p>via install-qa-check.d</p>
</dd>
</dl>
<p>Gentoo packages may only install into one of the following top-level
directories:</p>
<table class="hlist"><tr><td><ul class="simple">
<li><p>/bin</p></li>
<li><p>/boot</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/dev</p></li>
<li><p>/etc</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/lib*</p></li>
<li><p>/opt</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/sbin</p></li>
<li><p>/srv</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/usr</p></li>
<li><p>/var</p></li>
</ul>
</td></tr></table>
<p>Furthermore, only the following subdirectories of /usr are permitted:</p>
<table class="hlist"><tr><td><ul class="simple">
<li><p>/usr/bin</p></li>
<li><p>/usr/include</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/usr/lib*</p></li>
<li><p>/usr/libexec</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/usr/sbin</p></li>
<li><p>/usr/share</p></li>
</ul>
</td><td><ul class="simple">
<li><p>/usr/src</p></li>
<li><p>/usr/&lt;triplet&gt;</p></li>
</ul>
</td></tr></table>
<p>Furthermore, within /usr/share/doc hierarchy only a subdirectory named
after full package name and version with revision (PF) is permitted.</p>
<p>In the aforementioned lists, ‘lib*’ indicates lib and its appropriate
suffixed variants for the architecture in question.  ‘&lt;triplet&gt;’
indicates either CHOST or CTARGET value, as used by toolchain packages.</p>
<p>Additional exceptions can be granted by the QA team.  Currently those
exceptions are:</p>
<ul class="simple">
<li><p>/gnu for the guix package manager</p></li>
<li><p>/nix for the nix package manager</p></li>
</ul>
</div>
<div class="section" id="support-for-separate-usr">
<span id="index-1"></span><h2>Support for separate /usr<a class="headerlink" href="#support-for-separate-usr" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Source</dt>
<dd class="field-odd"><p>QA</p>
</dd>
<dt class="field-even">Reference</dt>
<dd class="field-even"><p><a class="reference external" href="https://projects.gentoo.org/council/meeting-logs/20130813-summary.txt">https://projects.gentoo.org/council/meeting-logs/20130813-summary.txt</a>
<a class="reference external" href="https://projects.gentoo.org/council/meeting-logs/20130924-summary.txt">https://projects.gentoo.org/council/meeting-logs/20130924-summary.txt</a></p>
</dd>
<dt class="field-odd">Reported</dt>
<dd class="field-odd"><p>no</p>
</dd>
</dl>
<p>Developers are not required to support using separate /usr filesystem
without an initramfs.</p>
<p><em>Rationale</em>: upstream software (as of 2013) is already making support
for early boot without /usr mounted difficult, and whenever it is still
works, it is either subtly broken or relying on hacks (udev).  In setups
using initramfs, some of the boot and repair functionality can be moved
from rootfs to initramfs.</p>
</div>
<div class="section" id="strict-multilib-layout">
<span id="index-2"></span><h2>Strict multilib layout<a class="headerlink" href="#strict-multilib-layout" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Source</dt>
<dd class="field-odd"><p>QA</p>
</dd>
<dt class="field-even">Reference</dt>
<dd class="field-even"><p><a class="reference external" href="https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/80multilib-strict">https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/80multilib-strict</a></p>
</dd>
<dt class="field-odd">Reported</dt>
<dd class="field-odd"><p>via install-qa-check.d, fatal</p>
</dd>
</dl>
<p>Libraries must be installed into an appropriate /lib* or /usr/lib*
directory corresponding to their ABI.  For example, 64-bit libraries
on amd64 must be installed into lib64 and not lib.</p>
<p>Libraries installed as a part of larger software package can be
installed along with it into a subdirectory of lib.</p>
<p><em>Rationale</em>: historically, Gentoo has been symlinking /lib to /lib64
in order to maintain compatibility with old packages hardcoding /lib
path.  With modern Gentoo profiles, this is no longer the case
and packages must install libraries into appropriate directory for them
to be correctly found by the dynamic loader.</p>
</div>
<div class="section" id="static-libraries-and-libtool-files">
<span id="index-3"></span><h2>Static libraries and libtool files<a class="headerlink" href="#static-libraries-and-libtool-files" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Source</dt>
<dd class="field-odd"><p>QA</p>
</dd>
<dt class="field-even">Reference</dt>
<dd class="field-even"><p><a class="reference external" href="https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/80libraries">https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/80libraries</a></p>
</dd>
<dt class="field-odd">Reported</dt>
<dd class="field-odd"><p>via install-qa-check.d, fatal</p>
</dd>
</dl>
<p>Static libraries and libtool files (.la) must be installed into /usr
hierarchy and never to root filesystem (/lib*).  If an additional shared
version of the library is installed to /lib*, a .so linker script must
be installed into /usr/lib* in order to ensure correct linking.</p>
<p><em>Rationale</em>: historically, the purpose of root filesystem was to hold
files strictly needed at boot.  For this reason, many old Gentoo
installations may still use small / partition.  Static libraries are
used only during package builds, and installing them to rootfs would
be a waste of space.</p>
</div>
<div class="section" id="game-install-locations-and-ownership">
<span id="index-4"></span><h2>Game install locations and ownership<a class="headerlink" href="#game-install-locations-and-ownership" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Source</dt>
<dd class="field-odd"><p>Council, clarified by QA</p>
</dd>
<dt class="field-even">Reference</dt>
<dd class="field-even"><p><a class="reference external" href="https://projects.gentoo.org/council/meeting-logs/20151213-summary.txt">https://projects.gentoo.org/council/meeting-logs/20151213-summary.txt</a>
<a class="reference external" href="https://projects.gentoo.org/council/meeting-logs/20151011-summary.txt">https://projects.gentoo.org/council/meeting-logs/20151011-summary.txt</a></p>
</dd>
<dt class="field-odd">Reported</dt>
<dd class="field-odd"><p>via install-qa-check.d</p>
</dd>
</dl>
<p>The historical game install locations (/usr/games and /etc/games) must
not be used anymore.  Instead, games should follow normal guidelines
for install locations.  As an exception, /usr/share/games can be used
if this location is used upstream, and /var/games can be used for shared
game files (e.g. high scores, game state files).</p>
<p>The historical games group must no longer be used.  Games must work
for users that are not in this group.  The aforementioned install
locations must therefore be owned by root and be world-readable.</p>
<p>If games need privileged access to shared files, the group gamestat
can be used for this purpose.  The game executables should be owned
by that group and made setgid.  The shared files must be installed
into /var/games hierarchy, and writable to gamestat group.</p>
<p><em>Rationale</em>: there is no technical reason to isolate games from other
applications on the system, or to restrict access to them.  The boundary
between game and non-game packages is very blurry on modern systems,
especially due to web browsers.</p>
<p>The historical use of games group on Gentoo to control access is
inconsistent with the use in other distributions where it was used to
share data files.  Since the latter implied users must not be added
to the games group, a new group (gamestat) needed to be created to
fulfill that purpose.</p>
</div>
</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">Gentoo Policy Guide</a></h1>








<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="preface.html">Preface</a></li>
<li class="toctree-l1"><a class="reference internal" href="motivation.html">Motivation and history</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics.html">Basic information</a></li>
<li class="toctree-l1"><a class="reference internal" href="other-docs.html">Other policy documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="dependencies.html">Dependencies</a></li>
<li class="toctree-l1"><a class="reference internal" href="ebuild-format.html">Ebuild file format</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">File system layout</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#installation-paths">Installation paths</a></li>
<li class="toctree-l2"><a class="reference internal" href="#support-for-separate-usr">Support for separate /usr</a></li>
<li class="toctree-l2"><a class="reference internal" href="#strict-multilib-layout">Strict multilib layout</a></li>
<li class="toctree-l2"><a class="reference internal" href="#static-libraries-and-libtool-files">Static libraries and libtool files</a></li>
<li class="toctree-l2"><a class="reference internal" href="#game-install-locations-and-ownership">Game install locations and ownership</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installed-files.html">Installed files</a></li>
<li class="toctree-l1"><a class="reference internal" href="keywords.html">Keywording and stabilization</a></li>
<li class="toctree-l1"><a class="reference internal" href="languages.html">Language-specific policies</a></li>
<li class="toctree-l1"><a class="reference internal" href="other-metadata.html">Other metadata variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="use-flags.html">USE flags</a></li>
<li class="toctree-l1"><a class="reference internal" href="user-group.html">Users and groups</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="ebuild-format.html" title="previous chapter">Ebuild file format</a></li>
      <li>Next: <a href="installed-files.html" title="next chapter">Installed files</a></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Gentoo Authors.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.3.1</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="_sources/filesystem.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>