<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"><meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Installed files — Gentoo Policy Guide documentation</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" /> <link rel="stylesheet" type="text/css" href="_static/tyrian-sphinx-theme.css?v=637b0b67" /> <link rel="stylesheet" type="text/css" href="_static/custom.css?v=56c4699f" /> <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon"> <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen"> <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" /> <link rel="stylesheet" type="text/css" href="_static/tyrian-sphinx-theme.css?v=637b0b67" /> <link rel="stylesheet" type="text/css" href="_static/custom.css?v=56c4699f" /> <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script src="_static/documentation_options.js?v=5929fcd5"></script> <script src="_static/doctools.js?v=888ff710"></script> <script src="_static/sphinx_highlight.js?v=dc90522c"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Keywording and stabilization" href="keywords.html" /> <link rel="prev" title="File system layout" href="filesystem.html" /> </head><body> <header> <div class="site-title"> <div class="container"> <div class="row"> <div class="site-title-buttons"> <div class="btn-group btn-group-sm"> <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong>Get Gentoo!</strong></a> <div class="btn-group btn-group-sm"> <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> <span class="fa fa-fw fa-map-o"></span> <span class="hidden-xs">gentoo.org sites</span> <span class="caret"></span> </a> <ul class="dropdown-menu dropdown-menu-right"> <li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li> <li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li> <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li> <li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li> <li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li> <li class="divider"></li> <li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li> <li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li> <li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li> <li class="divider"></li> <li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li> </ul> </div> </div> </div> <div class="logo"> <a href="index.html" title="Back to the homepage" class="site-logo"></a> <span class="site-label"> Policy Guide </span> </div> </div> </div> </div> <nav class="tyrian-navbar" role="navigation"> <div class="container"> <div class="row"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse navbar-main-collapse"> <ul class="nav navbar-nav"> <li> <a href="index.html">Home</a></li> <li class=""><a href="_sources/installed-files.rst.txt">Source</a></li> <li> <a href="search.html">Search</a></li> <li> <a href="genindex.html">General Index</a> </li> <li> <a href="std-policy-index.html">Policy Index</a> </li> </ul> <form action="search.html" class="navbar-form navbar-right" method="get" onsubmit="if (this.quicksearch.value == '') { alert('Please enter one or more search terms first.'); return false; } return true;"> <div class="input-group" style="margin-top:2px;"> <span class="input-group-addon" style="background:#61597b;color:#FFF;border:0px;" id="basic-addon1"><i class="fa fa-search" aria-hidden="true"></i></span> <input class="form-control" style="height:30px;border:0px;background:#61597b;color:#FFF;padding-left:0px;box-shadow: none;" type="text" id="quicksearch_top" name="q" title="Quick Search" placeholder="Quick Search" value=""> </div> <button class="btn btn-default hidden" type="submit" value="Search" id="find_top">Search</button> </form> </div> </div> </div> </nav> </header> <div class="container"> <div class="row"> <div class="col-md-9 col-sm-12 col-xs-12" role="main"> <section id="installed-files"> <h1>Installed files<a class="headerlink" href="#installed-files" title="Link to this heading">¶</a></h1> <section id="pg0301"> <span id="installation-of-small-files"></span><span id="index-0"></span><h2>Installation of small files<a class="headerlink" href="#pg0301" title="Link to this heading">¶</a></h2> <dl class="field-list simple"> <dt class="field-odd">PG<span class="colon">:</span></dt> <dd class="field-odd"><p>0301</p> </dd> <dt class="field-even">Source<span class="colon">:</span></dt> <dd class="field-even"><p>QA</p> </dd> <dt class="field-odd">Reported<span class="colon">:</span></dt> <dd class="field-odd"><p>no</p> </dd> </dl> <p>Ebuilds must not introduce USE flags to control installing files that are small in size, require no additional dependencies and not cause any negative consequences to the program behavior by being installed. Such files must be installed unconditionally. Examples include shell completion files, systemd service units, localization files.</p> <p>Users wishing to strip unnecessary files of this category should use INSTALL_MASK to do so.</p> <p><em>Rationale</em>: the goal of this policy is to avoid unnecessary rebuilds of packages when the cost of installing additional files is much smaller than the cost of rebuild. It has been specifically brought in context of bash completions in LibreOffice – a user who did not notice that he did not enable the flag should not be required to spend hours rebuilding such a huge package in order to install one tiny file.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>While technically e.g. <code class="docutils literal notranslate"><span class="pre">app-shells/bash-completion</span></code> could be considered a dependency of installed bash completions, it is not applicable here since this package needs to be installed by the user if he wishes to use completions in the first place, and if it is not installed, completion files are not used at all.</p> </div> </section> <section id="pg0302"> <span id="installation-of-static-libraries"></span><span id="index-1"></span><h2>Installation of static libraries<a class="headerlink" href="#pg0302" title="Link to this heading">¶</a></h2> <dl class="field-list simple"> <dt class="field-odd">PG<span class="colon">:</span></dt> <dd class="field-odd"><p>0302</p> </dd> <dt class="field-even">Source<span class="colon">:</span></dt> <dd class="field-even"><p>QA</p> </dd> <dt class="field-odd">Reported<span class="colon">:</span></dt> <dd class="field-odd"><p>no</p> </dd> </dl> <p>Packages must not install static libraries unless they are explicitly required, either by themselves or their reverse dependencies. If both shared and static libraries are supported, shared libraries must be installed by default and <code class="docutils literal notranslate"><span class="pre">USE=static-libs</span></code> may be added for static libraries if they are necessary.</p> <p><em>Rationale</em>: static linking is strongly discouraged as it makes security support for packages practically impossible. It may be used whenever really necessary (e.g. for recovery tools) but otherwise proliferating it is considered harmful. There is no point in installing static libraries if they are never going to be used.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>If the package’s build system does not support disabling static library build, it is recommended to patch it and submit the patch upstream. However, if that is not feasible and building both shared and static libraries does not require compiling source files twice, it is acceptable to strip static libraries in <code class="docutils literal notranslate"><span class="pre">src_install()</span></code>.</p> </div> </section> <section id="pg0303"> <span id="installation-of-libtool-la-files"></span><span id="index-2"></span><h2>Installation of libtool (.la) files<a class="headerlink" href="#pg0303" title="Link to this heading">¶</a></h2> <dl class="field-list simple"> <dt class="field-odd">PG<span class="colon">:</span></dt> <dd class="field-odd"><p>0303</p> </dd> <dt class="field-even">Source<span class="colon">:</span></dt> <dd class="field-even"><p>QA</p> </dd> <dt class="field-odd">Reported<span class="colon">:</span></dt> <dd class="field-odd"><p>no</p> </dd> </dl> <p>Packages must not install libtool .la files unless they are explicitly required. Generally, they might be required if:</p> <ol class="loweralpha simple"> <li><p>the package is using a plugin loader that requires .la files in order to locate plugins and does not have .so fallback (very uncommon),</p></li> <li><p>the package is installing static libraries that have additional dependencies and no pkg-config files or other tools that provide the list of dependencies to build systems.</p></li> </ol> <p>It is recommended to use the following one-liner to remove .la files:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">find</span> <span class="s2">"$</span><span class="si">{ED}</span><span class="s2">"</span> <span class="o">-</span><span class="nb">type</span> <span class="n">f</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.la'</span> <span class="o">-</span><span class="n">delete</span> <span class="o">||</span> <span class="n">die</span> </pre></div> </div> <p><em>Rationale</em>: libtool files were historically introduced as an attempt to supplement static library archives with dependent library list. However, they were only supported by libtool-based (autotools) projects and caused many issues, in particular due to hardcoding full paths. Today they are practically replaced by more portable pkg-config files, and while libtool keeps generating them, they are considered unnecessary and potentially harmful.</p> </section> <section id="pg0304"> <span id="virtuals"></span><span id="index-3"></span><h2>Virtuals<a class="headerlink" href="#pg0304" title="Link to this heading">¶</a></h2> <dl class="field-list simple"> <dt class="field-odd">PG<span class="colon">:</span></dt> <dd class="field-odd"><p>0304</p> </dd> <dt class="field-even">Source<span class="colon">:</span></dt> <dd class="field-even"><p>QA</p> </dd> <dt class="field-odd">Reported<span class="colon">:</span></dt> <dd class="field-odd"><p>no</p> </dd> </dl> <p>Packages in the <code class="docutils literal notranslate"><span class="pre">virtual</span></code> category must not install any files.</p> <p><em>Rationale</em>: The <code class="docutils literal notranslate"><span class="pre">virtual</span></code> category is reserved for packages with an empty installation image. Package managers rely on this for some optimizations. Also QA tools make certain assumptions about virtuals, e.g., that they must not assign the <code class="docutils literal notranslate"><span class="pre">LICENSE</span></code> variable (which would be impossible if they installed any files).</p> </section> <section id="pg0305"> <span id="installation-of-manpages"></span><span id="index-4"></span><h2>Installation of manpages<a class="headerlink" href="#pg0305" title="Link to this heading">¶</a></h2> <dl class="field-list simple"> <dt class="field-odd">PG<span class="colon">:</span></dt> <dd class="field-odd"><p>0305</p> </dd> <dt class="field-even">Source<span class="colon">:</span></dt> <dd class="field-even"><p>QA</p> </dd> <dt class="field-odd">Reported<span class="colon">:</span></dt> <dd class="field-odd"><p>no</p> </dd> </dl> <p>Packages must not disable installing manpages via USE flags (e.g. <code class="docutils literal notranslate"><span class="pre">USE=man</span></code> or <code class="docutils literal notranslate"><span class="pre">USE=doc</span></code>). If upstream does not ship prebuilt manpages and building them requires additional dependencies, the maintainer should build them and ship along with the package.</p> <p><em>Rationale</em>: Manpages are basic documentation for installed software. While additional dependencies are inconvenient for users, not building manpages is harmful. Including (optionally or unconditionally) prebuilt manpages is a good compromise.</p> </section> </section> <div class="row" style="margin-top:50px;"> <div class="col-sm-6"> <a href="filesystem.html" style="color:#767676;"> <i class="fa fa-angle-double-left" aria-hidden="true"></i> File system layout </a> </div> <div class="col-sm-6"> <a href="keywords.html" class="pull-right" style="color:#767676;"> Keywording and stabilization <i class="fa fa-angle-double-right" aria-hidden="true"></i> </a> </div> </div> </div> <div class="col-md-3 hidden-sm hidden-xs" role="main"> <div class="" role="navigation" aria-label="main navigation"> <div class=""> <nav class="bs-docs-sidebar" data-spy="affix" data-offset-top="140" data-offset-bottom="400"> <p class="hidden" role="heading"><span class="hidden-text">Contents:</span></p> <ul class='current nav'> <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="editing.html">Editing and publishing updates to this Guide</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="deprecation.html">Deprecations</a></li> <li class="toctree-l1"><a class="reference internal" href="ebuild-format.html">Ebuild file format</a></li> <li class="toctree-l1"><a class="reference internal" href="filesystem.html">File system layout</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Installed files</a><ul class='nav'> <li class="toctree-l2"><a class="reference internal" href="#pg0301">Installation of small files</a></li> <li class="toctree-l2"><a class="reference internal" href="#pg0302">Installation of static libraries</a></li> <li class="toctree-l2"><a class="reference internal" href="#pg0303">Installation of libtool (.la) files</a></li> <li class="toctree-l2"><a class="reference internal" href="#pg0304">Virtuals</a></li> <li class="toctree-l2"><a class="reference internal" href="#pg0305">Installation of manpages</a></li> </ul> </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="maintainer.html">Package Maintainers</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> </nav> </div> </div> </div> </div> <div class="clearer"></div> </div> <footer> <div class="container"> <div class="row"> <div class="col-xs-12 col-md-offset-2 col-md-7"> <h3 class="footerhead">Gentoo Policy Guide </h3> <div class="row"> <div class="col-xs-12 col-md-4"> <span class="kk-group-header">Powered by</span><br><span><a href="http://sphinx-doc.org/">Sphinx 7.2.6</a> & <a href="https://github.com/mmagorsc/tyrian_sphinx_theme">Tyrian Theme 0.0.8</a></span> </div> <div class="col-xs-12 col-md-4"> </div> <div class="col-xs-12 col-md-4"> </div> </div> </div> <div class="col-xs-12 col-md-3"> <h3 class="footerhead">Questions or comments?</h3> Please feel free to <a href="https://www.gentoo.org/inside-gentoo/contact/">contact us</a>. </div> </div> <div class="row"> <div class="text-center"> <a href="https://wiki.gentoo.org/wiki/Foundation:Privacy_Policy">Privacy Policy</a> </div> <div class="col-xs-10 col-sm-9 col-md-10"> <strong>© 2001–2024 Gentoo Authors</strong><br> <small> Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V. The contents of this document, unless otherwise expressly stated, are licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="license">CC-BY-SA-4.0</a> license. The <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply. </small> </div> </div> </div> </footer> <script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script> <script type="text/javascript"> $('body').scrollspy({ target: '.bs-docs-sidebar', offset: 40 }); </script> <script type="text/javascript"> $('#indices-and-tables').hide() </script> </body> </html>