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 167391382C5 for ; Thu, 27 May 2021 19:27:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68E36E083E; Thu, 27 May 2021 19:27:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 3F5EBE083E for ; Thu, 27 May 2021 19:27:08 +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 57DE0340D1C for ; Thu, 27 May 2021 19:27:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E2204799 for ; Thu, 27 May 2021 19:27:05 +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: <1622142925.d600ada4b2d26ced9f0454d927f0e6552015f980.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-8 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: eapi-differences.tex ebuild-functions.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: d600ada4b2d26ced9f0454d927f0e6552015f980 X-VCS-Branch: eapi-8 Date: Thu, 27 May 2021 19:27:05 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 81e39858-e421-4eb7-9ee9-fe48f9d375d9 X-Archives-Hash: d1f52c1f7dd134aeae61794be2664fc4 commit: d600ada4b2d26ced9f0454d927f0e6552015f980 Author: Ulrich Müller gentoo org> AuthorDate: Sun May 23 09:45:56 2021 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Thu May 27 19:15:25 2021 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=d600ada4 EAPI 8 has an empty working directory in pkg_* phases https://bugs.gentoo.org/595030 Signed-off-by: Ulrich Müller gentoo.org> eapi-differences.tex | 4 ++++ ebuild-functions.tex | 26 +++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index f3af563..08c4e9f 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -111,6 +111,9 @@ Use dependencies & \compactfeatureref{use-deps} & \t{!!}\ blockers & \compactfeatureref{bang-strength} & * & Strong & Strong & Strong & Strong \\ +Working directory in \t{pkg_*} phases & \compactfeatureref{phase-function-dir} & + Any & Any & Any & Any & Empty \\ + \t{S} to \t{WORKDIR} fallback & \compactfeatureref{s-workdir-fallback} & * & Conditional & Conditional & Conditional & Conditional \\ @@ -494,6 +497,7 @@ EAPI 8 is EAPI 7 with the following changes: \item Bash version is 5.0, \featureref{bash-version}. \item Selective fetch/mirror restriction, \featureref{uri-restrict}. \item \t{IDEPEND}, \featureref{idepend}. +\item Empty working directory in \t{pkg_*} phase functions, \featureref{phase-function-dir}. \end{compactitem} \ChangeWhenAddingAnEAPI{8} diff --git a/ebuild-functions.tex b/ebuild-functions.tex index ffdea16..00fd259 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -22,11 +22,13 @@ Ebuilds must not call nor assume the existence of any phase functions. \subsection{Initial working directories} \label{sec:s-to-workdir-fallback} -Some functions may assume that their initial working directory is set to a particular location; -these are noted below. If no initial working directory is mandated, it may be set to anything and -the ebuild must not rely upon a particular location for it. The ebuild \emph{may} assume that the -initial working directory for any phase is a trusted location that may only be written to by a -privileged user and group. +\featurelabel{phase-function-dir} Some functions may assume that their initial working directory is +set to a particular location; these are noted below. If no initial working directory is mandated, +then for EAPIs listed in table~\ref{tab:function-dirs} as having an empty directory, it must be set +to a dedicated directory that is empty at the start of the function and may be read-only. For other +EAPIs, it may be set to anything. The ebuild must not rely upon a particular location for it. +The ebuild \emph{may} assume that the initial working directory for any phase is a trusted location +that may only be written to by a privileged user and group. \featurelabel{s-workdir-fallback} Some functions are described as having an initial working directory of \t{S} with an error or fallback to \t{WORKDIR}\@. For EAPIs listed in @@ -44,6 +46,20 @@ fallback to \t{WORKDIR} is used: executed, are in \t{DEFINED_PHASES}. \end{compactitem} +\ChangeWhenAddingAnEAPI{8} +\begin{centertable}{Initial working directory in \t{pkg_*} phase functions for EAPIs} + \label{tab:function-dirs} + \begin{tabular}{ll} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Initial working directory?}} \\ + \midrule + 0, 1, 2, 3, 4, 5, 6, 7 & Any \\ + 8 & Empty \\ + \bottomrule + \end{tabular} +\end{centertable} + \ChangeWhenAddingAnEAPI{8} \begin{centertable}{EAPIs with \t{S} to \t{WORKDIR} fallbacks} \label{tab:s-fallback-table}