From 5c2023529b8d627b7a7e147333147e6c1fa5722d Mon Sep 17 00:00:00 2001 From: Emily Casey Date: Tue, 28 Jul 2020 19:16:07 -0400 Subject: [PATCH] remove buidpack API changes from platform/0.4 Signed-off-by: Emily Casey --- buildpack.md | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/buildpack.md b/buildpack.md index 98a354d0..26555d3b 100644 --- a/buildpack.md +++ b/buildpack.md @@ -119,8 +119,8 @@ Executable: `/bin/detect `, Working Dir: `` | Output | Description |--------------------|---------------------------------------------- | [exit status] | Pass (0), fail (100), or error (1-99, 101+) -| Standard output | Logs (info) -| Standard error | Logs (warnings, errors) +| `/dev/stdout` | Logs (info) +| `/dev/stderr` | Logs (warnings, errors) | `` | Contributions to the the Build Plan (TOML) @@ -210,10 +210,9 @@ The lifecycle MUST consider layers that are marked `launch = false` and `build = ## App Interface -| Output | Description -|------------------------|---------------------------------------------- -| `/.profile` | [†](README.md#linux-only) Bash-formatted script sourced by shell before launch -| `/.profile.bat` | [‡](README.md#windows-only) BAT-formatted script sourced by shell before launch +| Output | Description +|------------------|---------------------------------------------- +| `/.profile` | Script sourced by bash before launch ## Phase #1: Detection @@ -227,9 +226,8 @@ These buildpacks must be compatible with the app. ### Process **GIVEN:** -- An ordered list of buildpack groups resolved into buildpack implementations as described in [Order Resolution](#order-resolution) -- A directory containing application source code -- A shell, if needed, +- An ordered list of buildpack groups resolved into buildpack implementations as described in [Order Resolution](#order-resolution) and +- A directory containing application source code, For each buildpack in each group in order, the lifecycle MUST execute `/bin/detect`. @@ -407,7 +405,7 @@ This is achieved by: - The Buildpack Plan, - Any `/.toml` files placed on the filesystem during the analysis phase, - Any locally cached `/` directories, and -- A shell, if needed, +- Bash version 3 or greater, if needed, For each buildpack in the group in order, the lifecycle MUST execute `/bin/build`. @@ -558,7 +556,7 @@ To choose an execution strategy, 1. **IF** a buildpack-provided process type is chosen as the start command, 1. **IF** the process type does not have `direct` set to `true`, - **THEN** the lifecycle MUST invoke the value of `command` as a command using the shell with values of `args` provided as arguments. + **THEN** the lifecycle MUST invoke the value of `command` as a command using Bash with values of `args` provided as arguments. 2. **IF** the process type does have `direct` set to `true`, **THEN** the lifecycle MUST invoke the value of `command` using the `execve` syscall with values of `args` provided as arguments. @@ -570,7 +568,7 @@ Given the start command and execution strategy, 1. The lifecycle MUST set all buildpack-provided launch environment variables as described in the [Environment](#environment) section. -2. If using an execution strategy involving a shell, the lifecycle MUST use a single shell process to +2. If using an execution strategy involving Bash, the lifecycle MUST use a single Bash process to 1. source each file in each `//profile.d` directory, 1. Firstly, in order of `/bin/build` execution used to construct the OCI image. 2. Secondly, in alphabetically ascending order by layer directory name. @@ -583,11 +581,8 @@ Given the start command and execution strategy, 3. The lifecycle MUST invoke the start command with the decided execution strategy. -[†](README.md#linux-only)When executing a process using any execution strategy, the lifecycle SHOULD replace the lifecycle process in memory without forking it. - -[†](README.md#linux-only)When executing a process with Bash, the lifecycle SHOULD additionally replace the Bash process in memory without forking it. - -[‡](README.md#windows-only)When executing a process with Command Prompt, the lifecycle SHOULD start a new process with the same security context, terminal, working directory, STDIN/STDOUT/STDERR handles and environment variables as the Command Prompt process. +When executing a process using any execution strategy, the lifecycle SHOULD replace the lifecycle process in memory without forking it. +When executing a process with Bash, the lifecycle SHOULD additionally replace the Bash process in memory without forking it. ## Environment @@ -615,16 +610,15 @@ In either case, - The lifecycle MUST order all `` paths to reflect the reversed order of the buildpack group. - The lifecycle MUST order all `` paths provided by a given buildpack alphabetically ascending. -- The lifecycle MUST separate each path with the OS path list separator (e.g. `:` on Linux, `;` on Windows). - -| Env Variable | Layer Path | Contents | Build | Launch | -|--------------------------------------------|--------------|------------------|-------|--------| -| `PATH` | `/bin` | binaries | [x] | [x] | -| [†](README.md#linux-only)`LD_LIBRARY_PATH` | `/lib` | shared libraries | [x] | [x] | -| [†](README.md#linux-only)`LIBRARY_PATH` | `/lib` | static libraries | [x] | | -| `CPATH` | `/include` | header files | [x] | | -| `PKG_CONFIG_PATH` | `/pkgconfig` | pc files | [x] | | +- The lifecycle MUST separate each path with the OS path list separator (e.g., `:` on Linux). +| Env Variable | Layer Path | Contents | Build | Launch +|-------------------|--------------|------------------|-------|-------- +| `PATH` | `/bin` | binaries | [x] | [x] +| `LD_LIBRARY_PATH` | `/lib` | shared libraries | [x] | [x] +| `LIBRARY_PATH` | `/lib` | static libraries | [x] | +| `CPATH` | `/include` | header files | [x] | +| `PKG_CONFIG_PATH` | `/pkgconfig` | pc files | [x] | ### Provided by the Platform @@ -754,7 +748,7 @@ For each process, the buildpack: - MUST specify a `type` that is not identical to other process types provided by the same buildpack. - MUST specify a `command` that is either: - - A command sequence that is valid when executed using the shell, if `args` is not specified. + - A command sequence that is valid when executed using the Bash 3+ shell, if `args` is not specified. - A path to an executable or the file name of an executable in `$PATH`, if `args` is a list with zero or more elements. - MAY specify an `args` list to be passed directly to the specified executable. - MAY specify a `direct` boolean that bypasses the shell.