From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 246661382C5 for ; Sat, 24 Feb 2018 12:58:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7BFBE085A; Sat, 24 Feb 2018 12:58:52 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AB878E085A for ; Sat, 24 Feb 2018 12:58:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB345335C56 for ; Sat, 24 Feb 2018 12:58:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E37B424D for ; Sat, 24 Feb 2018 12:58:47 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1519476924.cbdee0efb3f2c00e7290fd8e66ff34fd415584de.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-7 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: dependencies.tex eapi-differences.tex pkg-mgr-commands.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: cbdee0efb3f2c00e7290fd8e66ff34fd415584de X-VCS-Branch: eapi-7 Date: Sat, 24 Feb 2018 12:58:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fe9090c5-6ee3-4334-8dca-8c36e6a60815 X-Archives-Hash: b34bdcf44099d28a74eb74f1296b722f commit: cbdee0efb3f2c00e7290fd8e66ff34fd415584de Author: Ulrich Müller gentoo org> AuthorDate: Sun Oct 29 09:30:43 2017 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sat Feb 24 12:55:24 2018 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=cbdee0ef EAPI 7 has controllable stripping and dostrip. Bug: https://bugs.gentoo.org/203891 dependencies.tex | 4 +++- eapi-differences.tex | 7 ++++++ pkg-mgr-commands.tex | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/dependencies.tex b/dependencies.tex index 696f478..deede34 100644 --- a/dependencies.tex +++ b/dependencies.tex @@ -506,7 +506,9 @@ The following tokens are permitted inside \t{RESTRICT}: be checked when fetching. \item[fetch] The package's \t{SRC_URI} entries may not be downloaded automatically. If entries are not available, \t{pkg_nofetch} is called. Implies \t{mirror}. -\item[strip] No stripping of debug symbols from files to be installed may be performed. +\item[strip] No stripping of debug symbols from files to be installed may be performed. In EAPIs + listed in table~\ref{tab:dostrip} as supporting controllable stripping, this behaviour may be + altered by the \t{dostrip} command. \item[userpriv] The package manager may not drop root privileges when building the package. \item[test] The \t{src_test} phase must not be run. \end{description} diff --git a/eapi-differences.tex b/eapi-differences.tex index 5fb2568..6a2cab7 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -287,6 +287,12 @@ Controllable compression & \compactfeatureref{docompress} & \t{docompress} & \compactfeatureref{docompress} & No & Yes & Yes & Yes & Yes \\ +Controllable stripping & \compactfeatureref{dostrip} & + No & No & No & No & Yes \\ + +\t{dostrip} & \compactfeatureref{dostrip} & + No & No & No & No & Yes \\ + \t{use_with} empty third arg & \compactfeatureref{use-with} & No & Yes & Yes & Yes & Yes \\ @@ -477,6 +483,7 @@ EAPI 7 is EAPI 6 with the following changes: \item \t{eqawarn}, \featureref{eqawarn}. \item \t{die} is guaranteed to work in a subshell, \featureref{subshell-die}. \item \t{domo} installs to \t{/usr}, \featureref{domo-path}. +\item Controllable stripping and \t{dostrip}, \featureref{dostrip}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index b0ed22e..dd0b02d 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -830,6 +830,68 @@ in table~\ref{tab:compression-table} as supporting \t{docompress}. \end{tabular} \end{centertable} +\subsection{Commands affecting stripping of symbols} + +\featurelabel{dostrip} In EAPIs listed in table~\ref{tab:dostrip} as supporting controllable +stripping of symbols, the package manager may strip a subset of the files under the \t{ED} +directory. To control which files may or may not be stripped, the package manager shall maintain +two lists: + +\begin{compactitem} +\item An inclusion list. If the \t{RESTRICT} variable described in section~\ref{sec:restrict} + enables a \t{strip} token, this list is initially empty; otherwise it initially contains \t{/} + (the root path). +\item An exclusion list, which initially is empty. +\end{compactitem} + +Stripping of symbols shall be carried out after \t{src_install} has completed, and before the +execution of any subsequent phase function. For each item in the inclusion list, pretend it has the +value of the \t{ED} variable prepended, then: + +\begin{compactitem} +\item If it is a directory, act as if every file or directory immediately under this directory + were in the inclusion list. +\item If the item is a file, it may be stripped unless it has been excluded as described below. +\item If the item does not exist, it is ignored. +\end{compactitem} + +Whether an item is to be excluded is determined as follows: For each item in the exclusion list, +pretend it has the value of the \t{ED} variable prepended, then: + +\begin{compactitem} +\item If it is a directory, act as if every file or directory immediately under this directory + were in the exclusion list. +\item If the item is a file, it shall not be stripped. +\item If the item does not exist, it is ignored. +\end{compactitem} + +The package manager shall take appropriate steps to ensure that its stripping mechanisms behave +sensibly even if an item is listed in the inclusion list multiple times or if an item is a symlink. + +The following command may be used in \t{src_install} to alter these lists. It is an error to call +this function from any other phase. + +\begin{description} +\item[dostrip] If the first argument is \t{-x}, add each of its subsequent arguments to the + exclusion list. Otherwise, add each argument to the inclusion list. Only available in EAPIs + listed in table~\ref{tab:dostrip} as supporting \t{dostrip}. +\end{description} + +\ChangeWhenAddingAnEAPI{7} +\begin{centertable}{EAPIs supporting controllable stripping} + \label{tab:dostrip} + \begin{tabular}{lll} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Supports controllable stripping?}} & + \multicolumn{1}{c}{\textbf{Supports \t{dostrip}?}} \\ + \midrule + 0, 1, 2, 3, 4, 5, 6 & No & No \\ + 7 & Yes & Yes \\ + \bottomrule + \end{tabular} +\end{centertable} + \subsection{USE list functions} These functions provide behaviour based upon set or unset use flags. Ebuilds must not run any of these commands once the current phase function has returned. It is an error if an ebuild calls any