RELEASE=config.release,
ARCHITECTURE=str(config.architecture),
QEMU_ARCHITECTURE=config.architecture.to_qemu(),
+ DISTRIBUTION_ARCHITECTURE=config.distribution.architecture(config.architecture),
SRCDIR="/work/src",
MKOSI_UID=str(INVOKING_USER.uid),
MKOSI_GID=str(INVOKING_USER.gid),
DISTRIBUTION=str(context.config.distribution),
RELEASE=context.config.release,
ARCHITECTURE=str(context.config.architecture),
+ DISTRIBUTION_ARCHITECTURE=context.config.distribution.architecture(context.config.architecture),
SRCDIR="/work/src",
MKOSI_UID=str(INVOKING_USER.uid),
MKOSI_GID=str(INVOKING_USER.gid),
DISTRIBUTION=str(context.config.distribution),
RELEASE=context.config.release,
ARCHITECTURE=str(context.config.architecture),
+ DISTRIBUTION_ARCHITECTURE=context.config.distribution.architecture(context.config.architecture),
BUILDROOT="/buildroot",
SRCDIR="/work/src",
CHROOT_SRCDIR="/work/src",
DISTRIBUTION=str(context.config.distribution),
RELEASE=context.config.release,
ARCHITECTURE=str(context.config.architecture),
+ DISTRIBUTION_ARCHITECTURE=context.config.distribution.architecture(context.config.architecture),
BUILDROOT="/buildroot",
DESTDIR="/work/dest",
CHROOT_DESTDIR="/work/dest",
DISTRIBUTION=str(context.config.distribution),
RELEASE=context.config.release,
ARCHITECTURE=str(context.config.architecture),
+ DISTRIBUTION_ARCHITECTURE=context.config.distribution.architecture(context.config.architecture),
BUILDROOT="/buildroot",
OUTPUTDIR="/work/out",
CHROOT_OUTPUTDIR="/work/out",
DISTRIBUTION=str(context.config.distribution),
RELEASE=context.config.release,
ARCHITECTURE=str(context.config.architecture),
+ DISTRIBUTION_ARCHITECTURE=context.config.distribution.architecture(context.config.architecture),
BUILDROOT="/buildroot",
OUTPUTDIR="/work/out",
CHROOT_OUTPUTDIR="/work/out",
DISTRIBUTION=str(context.config.distribution),
RELEASE=context.config.release,
ARCHITECTURE=str(context.config.architecture),
+ DISTRIBUTION_ARCHITECTURE=context.config.distribution.architecture(context.config.architecture),
SRCDIR="/work/src",
OUTPUTDIR="/work/out",
MKOSI_UID=str(INVOKING_USER.uid),
DISTRIBUTION=str(config.distribution),
RELEASE=config.release,
ARCHITECTURE=str(config.architecture),
+ DISTRIBUTION_ARCHITECTURE=config.distribution.architecture(config.architecture),
SRCDIR="/work/src",
OUTPUTDIR="/work/out",
MKOSI_UID=str(INVOKING_USER.uid),
* `$RELEASE` contains the release from the `Release=` setting.
+* `$DISTRIBUTION_ARCHITECTURE` contains the architecture from
+ `$ARCHITECTURE` in the format used by the configured distribution.
+
* `$PROFILE` contains the profile from the `Profile=` setting.
* `$CACHED=` is set to `1` if a cached image is available, `0` otherwise.
Consult this table for which script receives which environment variables:
-| Variable | `configure` | `sync` | `prepare` | `build` | `postinst` | `finalize` | `postoutput` | `clean` |
-|---------------------|:-----------:|:------:|:---------:|:-------:|:----------:|:----------:|:------------:|:-------:|
-| `ARCHITECTURE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `QEMU_ARCHITECTURE` | ✓ | | | | | | | |
-| `DISTRIBUTION` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `RELEASE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `PROFILE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ |
-| `CACHED` | | ✓ | | | | | | |
-| `CHROOT_SCRIPT` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `SRCDIR` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `CHROOT_SRCDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `BUILDDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `CHROOT_BUILDDIR` | | | | ✓ | | | | |
-| `DESTDIR` | | | | ✓ | | | | |
-| `CHROOT_DESTDIR` | | | | ✓ | | | | |
-| `OUTPUTDIR` | | | | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `CHROOT_OUTPUTDIR` | | | | ✓ | ✓ | ✓ | | |
-| `BUILDROOT` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `PACKAGEDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `ARTIFACTDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `WITH_DOCS` | | | ✓ | ✓ | | | | |
-| `WITH_TESTS` | | | ✓ | ✓ | | | | |
-| `WITH_NETWORK` | | | ✓ | ✓ | ✓ | ✓ | | |
-| `SOURCE_DATE_EPOCH` | | | ✓ | ✓ | ✓ | ✓ | | ✓ |
-| `MKOSI_UID` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `MKOSI_GID` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| `MKOSI_CONFIG` | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| Variable | `configure` | `sync` | `prepare` | `build` | `postinst` | `finalize` | `postoutput` | `clean` |
+|-----------------------------|:-----------:|:------:|:---------:|:-------:|:----------:|:----------:|:------------:|:-------:|
+| `ARCHITECTURE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `QEMU_ARCHITECTURE` | ✓ | | | | | | | |
+| `DISTRIBUTION` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `DISTRIBUTION_ARCHITECTURE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `RELEASE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `PROFILE` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ |
+| `CACHED` | | ✓ | | | | | | |
+| `CHROOT_SCRIPT` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `SRCDIR` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `CHROOT_SRCDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `BUILDDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `CHROOT_BUILDDIR` | | | | ✓ | | | | |
+| `DESTDIR` | | | | ✓ | | | | |
+| `CHROOT_DESTDIR` | | | | ✓ | | | | |
+| `OUTPUTDIR` | | | | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `CHROOT_OUTPUTDIR` | | | | ✓ | ✓ | ✓ | | |
+| `BUILDROOT` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `PACKAGEDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `ARTIFACTDIR` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `WITH_DOCS` | | | ✓ | ✓ | | | | |
+| `WITH_TESTS` | | | ✓ | ✓ | | | | |
+| `WITH_NETWORK` | | | ✓ | ✓ | ✓ | ✓ | | |
+| `SOURCE_DATE_EPOCH` | | | ✓ | ✓ | ✓ | ✓ | | ✓ |
+| `MKOSI_UID` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `MKOSI_GID` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| `MKOSI_CONFIG` | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Additionally, when a script is executed, a few scripts are made
available via `$PATH` to simplify common usecases.