summaryrefslogtreecommitdiff log msg author committer range
blob: 0ff1ec9be9c20a010071b301f2ce6ebb93583621 (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  pre { line-height: 125%; } td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */\chapter{Tree Layout} This chapter defines the layout on-disk of an ebuild repository. In all cases below where a file or directory is specified, a symlink to a file or directory is also valid. In this case, the package manager must follow the operating system's semantics for symbolic links and must not behave differently from normal. \section{Top Level} An ebuild repository shall occupy one directory on disk, with the following subdirectories: \begin{compactitem} \item One directory per category, whose name shall be the name of the category. The layout of these directories shall be as described in section~\ref{sec:category-dirs}. \item A \t{profiles} directory, described in section~\ref{sec:profiles-dir}. \item A \t{licenses} directory (optional), described in section~\ref{sec:licenses-dir}. \item An \t{eclass} directory (optional), described in section~\ref{sec:eclass-dir}. \item A \t{metadata} directory (optional), described in section~\ref{sec:metadata-dir}. \item Other optional support files and directories (skeleton ebuilds or ChangeLogs, for example) may exist but are not covered by this specification. The package manager must ignore any of these files or directories that it does not recognise. \end{compactitem} \section{Category Directories} \label{sec:category-dirs} Each category provided by the repository (see also: the \t{profiles/categories} file, section~\ref{sec:profiles-dir}) shall be contained in one directory, whose name shall be that of the category. Each category directory shall contain: \begin{compactitem} \item A \t{metadata.xml} file, as described in appendix~\ref{ch:metadata-xml}\@. Optional. \item Zero or more package directories, one for each package in the category, as described in section~\ref{sec:package-dirs}. The name of the package directory shall be the corresponding package name. \end{compactitem} Category directories may contain additional files, whose purpose is not covered by this specification. Additional directories that are not for a package may \e{not} be present, to avoid conflicts with package name directories; an exception is made for filesystem components whose name starts with a dot, which the package manager must ignore, and for any directory named \t{CVS}. It is not required that a directory exists for each category provided by the repository. A category directory that does not exist shall be considered equivalent to an empty category (and by extension, a package manager may treat an empty category as a category that does not exist). \section{Package Directories} \label{sec:package-dirs} A package directory contains the following: \begin{compactitem} \item Zero or more ebuilds. These are as described in chapter~\ref{ch:ebuild-format} and others. \item A \t{metadata.xml} file, as described in appendix~\ref{ch:metadata-xml}\@. Optional only for legacy support. \item A \t{ChangeLog}, in a format determined by the provider of the repository. Optional. \item A \t{Manifest} file, whose format is described in~\cite{Glep44}. Can be omitted if the file would be empty. \item A \t{files} directory, containing any support files needed by the ebuilds. Optional. \end{compactitem} Any ebuild in a package directory must be named \t{name-ver.ebuild}, where \t{name} is the (unqualified) package name, and \t{ver} is the package's version. Package managers must ignore any ebuild file that does not match these rules. A package directory that contains no correctly named ebuilds shall be considered a package with no versions. A package with no versions shall be considered equivalent to a package that does not exist (and by extension, a package manager may treat a package that does not exist as a package with no versions). A package directory may contain other files or directories, whose purpose is not covered by this specification. \section{The Profiles Directory} \label{sec:profiles-dir} The profiles directory shall contain zero or more profile directories as described in chapter~\ref{ch:profiles}, as well as the following files and directories. In any line-based file, lines beginning with a \# character are treated as comments, whilst blank lines are ignored. All contents of this directory, with the exception of \t{repo_name}, are optional. The profiles directory may contain an \t{eapi} file. This file, if it exists, must contain a single line with the name of an EAPI\@. This specifies the EAPI to use when handling the profiles directory; a package manager must not attempt to use any repository whose profiles directory requires an EAPI it does not support. If no \t{eapi} file is present, EAPI 0 shall be used. If the repository is not intended to be stand-alone, the contents of these files are to be taken from or merged with the master repository as necessary. Other files not described by this specification may exist, but may not be relied upon. The package manager must ignore any files in this directory that it does not recognise. \begin{description} \item[arch.list] Contains a list, one entry per line, of permissible values for the \t{ARCH} variable, and hence permissible keywords for packages in this repository. \item[categories] Contains a list, one entry per line, of categories provided by this repository. \item[eapi] See above. \item[info_pkgs] Contains a list, one entry per line, of qualified package names. Any package matching one of these is to be listed when a package manager displays a system information' listing. \item[info_vars] Contains a list, one entry per line, of profile, configuration, and environment variables which are considered to be of interest. The value of each of these variables may be shown when the package manager displays a system information' listing. \item[package.mask] Contains a list, one entry per line, of package dependency specifications (using the directory's EAPI). Any package version matching one of these is considered to be masked, and will not be installed regardless of profile unless it is unmasked by the user configuration. \featurelabel{package-mask-dir} For EAPIs listed in table~\ref{tab:package-mask-dir} as supporting it, \t{package.mask} can be a directory instead of a regular file. Files contained in that directory, unless their name begins with a dot, will be concatenated in order of their filename in the POSIX locale and the result will be processed as if it were a single file. Any subdirectories will be ignored. \item[profiles.desc] Described below in section~\ref{sec:profiles.desc}. \item[repo_name] Contains, on a single line, the name of this repository. The repository name must conform to section~\ref{sec:repository-names}. \item[thirdpartymirrors] Described below in section~\ref{sec:thirdpartymirrors}. \item[use.desc] Contains descriptions of valid global USE flags for this repository. The format is described in section~\ref{sec:use.desc}. \item[use.local.desc] Contains descriptions of valid local USE flags for this repository, along with the packages to which they apply. The format is as described in section~\ref{sec:use.desc}. \item[desc/] This directory contains files analogous to \t{use.desc} for the various \t{USE_EXPAND} variables. Each file in it is named \t{.desc}, where \t{} is the variable name, in lowercase, whose possible values the file describes. The format of each file is as for \t{use.desc}, described in section~\ref{sec:use.desc}. The \t{USE_EXPAND} name is \e{not} included as a prefix here. \item[updates/] This directory is described in section~\ref{sec:updates-dir}. \end{description} \ChangeWhenAddingAnEAPI{7} \begin{centertable}{EAPIs supporting a directory for \t{package.mask}} \label{tab:package-mask-dir} \begin{tabular}{ll} \toprule \multicolumn{1}{c}{\textbf{EAPI}} & \multicolumn{1}{c}{\textbf{\t{package.mask} can be a directory?}} \\ \midrule 0, 1, 2, 3, 4, 5, 6 & No \\ 7 & Yes \\ \bottomrule \end{tabular} \end{centertable} \subsection{The profiles.desc file} \label{sec:profiles.desc} \t{profiles.desc} is a line-based file, with the standard commenting rules from section~\ref{sec:profiles-dir}, containing a list of profiles that are valid for use, along with their associated architecture and status. Each line has the format: \begin{verbatim} \end{verbatim} Where: \begin{compactitem} \item \t{} is the default keyword for the profile and the \t{ARCH} for which the profile is valid. \item \t{} is the (relative) path from the \t{profiles} directory to the profile in question. \item \t{} indicates the stability of the profile. This may be useful for QA tools, which may wish to display warnings with a reduced severity for some profiles. The values \t{stable} and \t{dev} are widely used, but repositories may use other values. \end{compactitem} Fields are whitespace-delimited. \subsection{The thirdpartymirrors file} \label{sec:thirdpartymirrors} \t{thirdpartymirrors} is another simple line-based file, describing the valid mirrors for use with \t{mirror://} URIs in this repository, and the associated download locations. The format of each line is: \begin{verbatim} ... \end{verbatim} Fields are whitespace-delimited. When parsing a URI of the form \t{mirror:/\slash name\slash path\slash filename}, where the \t{path/} part is optional, the \t{thirdpartymirrors} file is searched for a line whose first field is \t{name}. Then the download URIs in the subsequent fields have \t{path\slash filename} appended to them to generate the URIs from which a download is attempted. Each mirror name may appear at most once in a file. Behaviour when a mirror name appears multiple times is undefined. Behaviour when a mirror is defined in terms of another mirror is undefined. A package manager may choose to fetch from all of or a subset of the listed mirrors, and may use an order other than the one described. The mirror with the name equal to the repository's name (and if the repository has a master, the master's name) may be consulted for all downloads. \subsection{use.desc and related files} \label{sec:use.desc} \t{use.desc} contains descriptions of every valid global USE flag for this repository. It is a line-based file with the standard rules for comments and blank lines. The format of each line is: \begin{verbatim} - \end{verbatim} \t{use.local.desc} contains descriptions of every valid local USE flag---those that apply only to a small number of packages, or that have different meanings for different packages. Its format is: \begin{verbatim} : - \end{verbatim} Flags must be listed once for each package to which they apply, or if a flag is listed in both \t{use.desc} and \t{use.local.desc}, it must be listed once for each package for which its meaning differs from that described in \t{use.desc}. \subsection{The updates directory} \label{sec:updates-dir} The \t{updates} directory is used to inform the package manager that a package has moved categories, names, or that a version has changed SLOT\@. It contains one file per quarter year, named \t{[1-4]Q-[YYYY]} for the first to fourth quarter of a given year, for example \t{1Q-2004} or \t{3Q-2006}. The format of each file is again line-based, with each line having one of the following formats: \begin{verbatim} move slotmove \end{verbatim} The first form, where \t{qpn1} and \t{qpn2} are \i{qualified package names}, instructs the package manager that the package \t{qpn1} has changed name, category, or both, and is now called \t{qpn2}. The second form instructs the package manager that any currently installed package version matching package dependency specification \t{spec} whose \t{SLOT} is set to \t{slot1} should have it updated to \t{slot2}. Any name that has appeared as the origin of a move must not be reused in the future. Any slot that has appeared as the origin of a slot move may not be used by packages matching the spec of that slot move in the future. \section{The Licenses Directory} \label{sec:licenses-dir} The \t{licenses} directory shall contain copies of the licenses used by packages in the repository. Each file will be named according to the name used in the \t{LICENSE} variable as described in section~\ref{sec:optional-vars}, and will contain the complete text of the license in human-readable form. Plain text format is strongly preferred but not required. \section{The Eclass Directory} \label{sec:eclass-dir} The \t{eclass} directory shall contain copies of the eclasses provided by this repository. The format of these files is described in chapter~\ref{ch:eclasses}. It may also contain, in their own directory, support files needed by these eclasses. \section{The Metadata Directory} \label{sec:metadata-dir} The \t{metadata} directory contains various repository-level metadata that is not contained in \t{profiles/}. All contents are optional. In this standard only the \t{cache} subdirectory is described; other contents are optional but may include security advisories, DTD files for the various XML files used in the repository, and repository timestamps. \subsection{The metadata cache} The \t{metadata/cache} directory may contain a cached form of all important ebuild metadata variables. The contents of this directory are described in chapter~\ref{ch:metadata-cache}. % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : %%% Local Variables: %%% mode: latex %%% TeX-master: "pms" %%% LaTeX-indent-level: 4 %%% LaTeX-item-indent: 0 %%% TeX-brace-indent-level: 4 %%% fill-column: 100 %%% End: