Lines 173-184
has returned.
Link Here
|
173 |
|
173 |
|
174 |
\featurelabel{econf-options} |
174 |
\featurelabel{econf-options} |
175 |
\begin{itemize} |
175 |
\begin{itemize} |
176 |
\item -{}-prefix must default to \t{/usr} unless overridden by \t{econf}'s caller. |
176 |
\item -{}-prefix must default to \t{\$EPREFIX/usr} unless overridden by \t{econf}'s caller. |
177 |
\item -{}-mandir must be \t{/usr/share/man} |
177 |
\item -{}-mandir must be \t{\$EPREFIX/usr/share/man} |
178 |
\item -{}-infodir must be \t{/usr/share/info} |
178 |
\item -{}-infodir must be \t{\$EPREFIX/usr/share/info} |
179 |
\item -{}-datadir must be \t{/usr/share} |
179 |
\item -{}-datadir must be \t{\$EPREFIX/usr/share} |
180 |
\item -{}-sysconfdir must be \t{/etc} |
180 |
\item -{}-sysconfdir must be \t{\$EPREFIX/etc} |
181 |
\item -{}-localstatedir must be \t{/var/lib} |
181 |
\item -{}-localstatedir must be \t{\$EPREFIX/var/lib} |
182 |
\item -{}-host must be the value of the \t{CHOST} environment variable. |
182 |
\item -{}-host must be the value of the \t{CHOST} environment variable. |
183 |
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}. |
183 |
\item -{}-libdir must be set according to Algorithm~\ref{alg:econf-libdir}. |
184 |
\item -{}-disable-dependency-tracking, if the EAPI is listed in |
184 |
\item -{}-disable-dependency-tracking, if the EAPI is listed in |
Lines 217-222
has returned.
Link Here
|
217 |
} |
217 |
} |
218 |
\end{centertable} |
218 |
\end{centertable} |
219 |
|
219 |
|
|
|
220 |
Note that the \t{\$EPREFIX} component represents the same |
221 |
offset-prefix as described in Table~\ref{tab:defined_vars}. It |
222 |
facilitates offset-prefix installations which is supported by EAPIs |
223 |
listed in Table~\ref{tab:offset-prefix-table}. When no |
224 |
offset-prefix installation is in effect, \t{EPREFIX} becomes the |
225 |
empty string, making the behaviour of econf equal for both |
226 |
offset-prefix supporting and agnostic EAPIs. |
227 |
|
220 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
228 |
\t{econf} must be implemented internally---that is, as a bash function and not an external |
221 |
script. Should any portion of it fail, it must abort the build using \t{die}, unless run using |
229 |
script. Should any portion of it fail, it must abort the build using \t{die}, unless run using |
222 |
\t{nonfatal}, in which case it must return non-zero exit status. |
230 |
\t{nonfatal}, in which case it must return non-zero exit status. |
Lines 224-230
has returned.
Link Here
|
224 |
\begin{algorithm} |
232 |
\begin{algorithm} |
225 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
233 |
\caption{econf -{}-libdir logic} \label{alg:econf-libdir} |
226 |
\begin{algorithmic}[1] |
234 |
\begin{algorithmic}[1] |
227 |
\STATE let prefix=/usr |
235 |
\STATE let prefix=\$EPREFIX/usr |
228 |
\IF{the caller specified -{}-prefix=\$p} |
236 |
\IF{the caller specified -{}-prefix=\$p} |
229 |
\STATE let prefix=\$p |
237 |
\STATE let prefix=\$p |
230 |
\ENDIF |
238 |
\ENDIF |
Lines 251-264
has returned.
Link Here
|
251 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
259 |
to \t{einstall} are passed verbatim to \t{emake}, as shown. Failure behaviour is EAPI dependent |
252 |
as per section~\ref{sec:failure-behaviour}. |
260 |
as per section~\ref{sec:failure-behaviour}. |
253 |
|
261 |
|
|
|
262 |
The variable \t{ED} is defined as in Table~\ref{tab:defined_vars} |
263 |
and depends on the use of an offset-prefix. When such offset-prefix |
264 |
is absent, \t{ED} is equivalent to \t{D}. \t{ED} is always |
265 |
available in EAPIs that support offset-prefix installations as |
266 |
listed in Table~\ref{tab:offset-env-vars-table}, hence EAPIs lacking |
267 |
offset-prefix support should use \t{D} instead of \t{ED} in the |
268 |
command given in Listing~\ref{lst:einstall}. |
254 |
\begin{listing}[H] |
269 |
\begin{listing}[H] |
255 |
\caption{einstall command}\label{lst:einstall} |
270 |
\caption{einstall command}\label{lst:einstall} |
256 |
\begin{verbatim} |
271 |
\begin{verbatim} |
257 |
emake \ |
272 |
emake \ |
258 |
prefix="${D}"/usr \ |
273 |
prefix="${ED}"/usr \ |
259 |
mandir="${D}"/usr/share/man \ |
274 |
mandir="${ED}"/usr/share/man \ |
260 |
infodir="${D}"/usr/share/info \ |
275 |
infodir="${ED}"/usr/share/info \ |
261 |
libdir="${D}"/usr/$(get_libdir) \ |
276 |
libdir="${ED}"/usr/$(get_libdir) \ |
262 |
"$@" \ |
277 |
"$@" \ |
263 |
install |
278 |
install |
264 |
\end{verbatim} |
279 |
\end{verbatim} |
Lines 269-275
emake \
Link Here
|
269 |
\subsubsection{Installation commands} |
284 |
\subsubsection{Installation commands} |
270 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
285 |
These commands are used to install files into the staging area, in cases where the package's \t{make |
271 |
install} target cannot be used or does not install all needed files. Except where otherwise stated, |
286 |
install} target cannot be used or does not install all needed files. Except where otherwise stated, |
272 |
all filenames created or modified are relative to the staging directory, given by \t{D}. These |
287 |
all filenames created or modified are relative to the staging directory |
|
|
288 |
including the offset-prefix \t{ED} in offset-prefix aware EAPIs, or |
289 |
just the staging directory \t{D} in offset-prefix agnostic EAPIs. |
273 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
290 |
commands must all be external programs and not bash functions or aliases---that is, they must be |
274 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
291 |
callable from \t{xargs}. Ebuilds must not run any of these commands once the current phase function |
275 |
has returned. |
292 |
has returned. |
Lines 278-283
has returned.
Link Here
|
278 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
295 |
\item[dobin] Installs the given files into \t{DESTTREE/bin}, where \t{DESTTREE} defaults to |
279 |
\t{/usr}. Gives the files mode \t{0755} and ownership \t{root:root}. Failure behaviour is EAPI |
296 |
\t{/usr}. Gives the files mode \t{0755} and ownership \t{root:root}. Failure behaviour is EAPI |
280 |
dependent as per section~\ref{sec:failure-behaviour}. |
297 |
dependent as per section~\ref{sec:failure-behaviour}. |
|
|
298 |
% todo: Portage does not behave like this, and Prefix relies on that |
299 |
% root:root -> 0:0 (for systems where root name/group are different) |
300 |
% PORTAGE_INST_UID:PORTAGE_INST_GID <- Prefix sets that to user ids |
281 |
|
301 |
|
282 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
302 |
\item[doconfd] Installs the given config files into \t{/etc/conf.d/}, by default with file mode |
283 |
\t{0644}. This can be overridden by setting \t{INSOPTIONS} with the \t{insopts} function. |
303 |
\t{0644}. This can be overridden by setting \t{INSOPTIONS} with the \t{insopts} function. |
Lines 323-329
that can be passed to \t{dohtml} are as follows:
Link Here
|
323 |
\item{\t{-f}} --- list of files that are able to be installed. |
343 |
\item{\t{-f}} --- list of files that are able to be installed. |
324 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
344 |
\item{\t{-x}} --- list of directories that files will not be installed from (only used in |
325 |
conjunction with \t{-r}). |
345 |
conjunction with \t{-r}). |
326 |
\item{\t{-p}} --- sets a document prefix for installed files. |
346 |
\item{\t{-p}} --- sets a document prefix for installed files, not to |
|
|
347 |
be confused with the global offset-prefix. |
327 |
\end{description} |
348 |
\end{description} |
328 |
|
349 |
|
329 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
350 |
Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
Lines 569-575
that can be passed to \t{dohtml} are as follows:
Link Here
|
569 |
} |
590 |
} |
570 |
|
591 |
|
571 |
\subsubsection{Commands affecting install destinations} |
592 |
\subsubsection{Commands affecting install destinations} |
572 |
The following commands are used to set the various destination trees, all relative to \t{\$\{D\}}, |
593 |
The following commands are used to set the various destination trees, |
|
|
594 |
all relative to \t{\$\{ED\}} in offset-prefix aware EAPIs and relative to |
595 |
\t{\$\{D\}} in offset-prefix agnostic EAPIs, |
573 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
596 |
used by the above installation commands. They must be shell functions or aliases, due to the need to |
574 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
597 |
set variables read by the above commands. Ebuilds must not run any of these commands once the |
575 |
current phase function has returned. |
598 |
current phase function has returned. |
Lines 577-583
current phase function has returned.
Link Here
|
577 |
\begin{description} |
600 |
\begin{description} |
578 |
|
601 |
|
579 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
602 |
\item[into] Sets the value of \t{DESTTREE} for future invocations of the above utilities. Creates |
580 |
the directory under \t{\$\{D\}}, using \t{install -d} with no additional options, if it does not |
603 |
the directory under \t{\$\{ED\}} in offset-prefix aware EAPIs or under |
|
|
604 |
\t{\$\{D\}} in offset-prefix agnostic EAPIs, using \t{install -d} with |
605 |
no additional options, if it does not |
581 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
606 |
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failure-behaviour}. |
582 |
|
607 |
|
583 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
608 |
\item[insinto] Sets the value of \t{INSDESTTREE} for future invocations of the above utilities. May |
Lines 601-610
already exist. Failure behaviour is EAPI dependent as per section~\ref{sec:failu
Link Here
|
601 |
|
626 |
|
602 |
\subsubsection{Commands affecting install compression} |
627 |
\subsubsection{Commands affecting install compression} |
603 |
|
628 |
|
604 |
\featurelabel{controllable-compress} In EAPIs listed in table~\ref{tab:compression-table} as |
629 |
\featurelabel{controllable-compress} In EAPIs listed in |
605 |
supporting controllable compression, the package manager may optionally compress a subset of the |
630 |
table~\ref{tab:compression-table} as supporting controllable |
606 |
files under the \t{D} directory. To control which directories may or may not be compressed, the |
631 |
compression, the package manager may optionally compress a subset of the |
607 |
package manager shall maintain two lists: |
632 |
files under the \t{ED} in offset-prefix aware EAPIs or the \t{D} in |
|
|
633 |
offset-prefix agnostic EAPIs directory. To control which directories may |
634 |
or may not be compressed, the package manager shall maintain two lists: |
608 |
|
635 |
|
609 |
\begin{compactitem} |
636 |
\begin{compactitem} |
610 |
\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and |
637 |
\item An inclusion list, which initially contains \t{/usr/share/doc}, \t{/usr/share/info} and |
Lines 614-620
package manager shall maintain two lists:
Link Here
|
614 |
|
641 |
|
615 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
642 |
The optional compression shall be carried out after \t{src\_install} has completed, and before the |
616 |
execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
643 |
execution of any subsequent phase function. For each item in the inclusion list, pretend it has the |
617 |
value of the \t{D} variable prepended, then: |
644 |
value of the \t{ED} variable in offset-prefix aware EAPIs or the \t{D} |
|
|
645 |
variable in offset-prefix agnostic EAPIs prepended, then: |
618 |
|
646 |
|
619 |
\begin{compactitem} |
647 |
\begin{compactitem} |
620 |
\item If it is a directory, act as if every file or directory immediately under this directory |
648 |
\item If it is a directory, act as if every file or directory immediately under this directory |
Lines 624-630
value of the \t{D} variable prepended, then:
Link Here
|
624 |
\end{compactitem} |
652 |
\end{compactitem} |
625 |
|
653 |
|
626 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
654 |
Whether an item is to be excluded is determined as follows: For each item in the exclusion list, |
627 |
pretend it has the value of the \t{D} variable prepended, then: |
655 |
pretend it has the value of the \t{ED} variable in offset-prefix aware |
|
|
656 |
EAPIs or the \t{D} variable in offset-prefix agnostic EAPIs prepended, |
657 |
then: |
628 |
|
658 |
|
629 |
\begin{compactitem} |
659 |
\begin{compactitem} |
630 |
\item If it is a directory, act as if every file or directory immediately under this directory |
660 |
\item If it is a directory, act as if every file or directory immediately under this directory |
Lines 753-761
has returned.
Link Here
|
753 |
|
783 |
|
754 |
\begin{description} |
784 |
\begin{description} |
755 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
785 |
\item[dosed] Takes any number of arguments, which can be files or \t{sed} expressions. For each |
756 |
argument, if it names, relative to \t{D} a file which exists, then \t{sed} is run with the |
786 |
argument, if it names, relative to \t{ED} (offset-prefix aware |
|
|
787 |
EAPIs) or \t{D} (offset-prefix agnostic EAPIs) a file which exists, |
788 |
then \t{sed} is run with the |
757 |
current expression on that file. Otherwise, the current expression is set to the text of the |
789 |
current expression on that file. Otherwise, the current expression is set to the text of the |
758 |
argument. The initial value of the expression is \t{s:\$\{D\}::g}. In EAPIs listed in |
790 |
argument. The initial value of the expression is \t{s:\$\{ED\}::g} |
|
|
791 |
in offset-prefix aware EAPIs and \t{s:\$\{D\}::g} in offset-prefix |
792 |
agnostic EAPIs. In EAPIs listed in |
759 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
793 |
table~\ref{tab:banned-commands-table}, this command is banned as per |
760 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
794 |
section~\ref{sec:banned-commands}. Failure behaviour is EAPI dependent as per |
761 |
section~\ref{sec:failure-behaviour}. |
795 |
section~\ref{sec:failure-behaviour}. |
Lines 788-793
has returned.
Link Here
|
788 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
822 |
\item LHA archives (\t{*.LHA, *.LHa, *.lha, *.lhz}). Ebuilds must ensure that the lha program is |
789 |
installed. |
823 |
installed. |
790 |
\item ar archives (\t{*.a, *.deb}). Ebuilds must ensure that GNU binutils is installed. |
824 |
\item ar archives (\t{*.a, *.deb}). Ebuilds must ensure that GNU binutils is installed. |
|
|
825 |
% todo: Portage's implementation is different and required for Prefix |
826 |
% these files are unpacked with deb2targz if available, else it |
827 |
% falls back to "ar", which cannot be required to be GNU binutils |
791 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
828 |
\item lzma-compressed files (\t{*.lzma}). Ebuilds must ensure that LZMA Utils is installed. |
792 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
829 |
\item lzma-compressed tar files (\t{*.tar.lzma}). Ebuilds must ensure that LZMA Utils and |
793 |
GNU tar are installed. |
830 |
GNU tar are installed. |