]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
man: add a table which script receives what environment variable 1939/head
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 28 Sep 2023 14:23:33 +0000 (16:23 +0200)
committerJoerg Behrmann <behrmann@physik.fu-berlin.de>
Fri, 29 Sep 2023 09:11:59 +0000 (11:11 +0200)
mkosi/resources/mkosi.md

index 108f2ddcb37dbea254bae3045efcfc492f06a633..38416b35656bd51b8a08f71ec3ac20f02dacad27 100644 (file)
@@ -1383,6 +1383,28 @@ Scripts executed by mkosi receive the following environment variables:
   with `setpriv` to run commands as the user that invoked mkosi (e.g.
   `setpriv --reuid=$MKOSI_UID --regid=$MKOSI_GID --clear-groups <command>`)
 
+Consult this table for which script receives which environment variables:
+
+| Variable            | `mkosi.prepare` | `mkosi.build` | `mkosi.postinst` | `mkosi.finalize` |
+|---------------------|-----------------|---------------|------------------|------------------|
+| `$CHROOT_SCRIPT`    | X               | X             | X                | X                |
+| `$SRCDIR`           | X               | X             | X                | X                |
+| `CHROOT_SRCDIR`     | X               | X             | X                | X                |
+| `$BUILDDIR`         |                 | X             |                  |                  |
+| `CHROOT_BUILDDIR`   |                 | X             |                  |                  |
+| `DESTDIR`           |                 | X             |                  |                  |
+| `CHROOT_DESTDIR`    |                 | X             |                  |                  |
+| `$OUTPUTDIR`        |                 | X             | X                | X                |
+| `CHROOT_OUTPUTDIR`  |                 | X             | X                | X                |
+| `$BUILDROOT`        | X               | X             | X                | X                |
+| `WITH_DOCS`         | X               | X             |                  |                  |
+| `WITH_TESTS`        | X               | X             |                  |                  |
+| `WITH_NETWORK`      | X               | X             |                  |                  |
+| `SOURCE_DATE_EPOCH` | X               | X             | X                | X                |
+| `MKOSI_UID`         | X               | X             | X                | X                |
+| `MKOSI_GID`         | X               | X             | X                | X                |
+
+
 Additionally, when a script is executed, a few scripts are made
 available via `$PATH` to simplify common usecases.