ZOPEN-BUILD
NAME
zopen-build - manual page for zopen-build 0.8.6
SYNOPSIS
zopen-build [OPTION]...
DESCRIPTION
zopen-build is a general purpose build script to be used with the zopen community ports.
Option:
--build LINE
LINE may be dev or stable. This is the build line to build off of.
--buildtype TYPE
TYPE may be release or debug. The default is release.
-c, --clean
Deletes all of the build output and forces reconfigure with next build.
--ccache
Enable ccache for clang builds to speed up recompilation.
--comp COMP
COMP may be xlclang, clang, go, java python. The default is clang.
-e ENV_FILE
source ENV_FILE instead of buildenv to establish build environment.
-E, --editable
enable editing of the executable (adds -Wl,-bedit=yes to LDFLAGS).
--instrument
instruments the application with option -finstrument-functions (clang only)
-f, --force-rebuild
forces a rebuild, including running bootstrap and configure again.
--forcepatchapply
force apply the patches, where rejected patches are placed into a corresponding file of the same name, with the .rej extension.
-g, --get-source
get the source and apply patch without building.
-gp, --generate-pax
generate a pax.Z file based on the install contents.
-gr, --generate-rpm
generate an RPM package from the pax archive.
-h, --help, -?
print this information.
--no-set-active
do not change the pinned version.
--no-install-deps
do not install project’s runtime dependencies.
--oci | build and publish an OCI image to $ZOPEN_IMAGE_REGISTRY. | ||
-s | exec a shell before running configure. Useful when manually building ports. |
--sign-pax, -sp
This option signs the pax file. ZOPEN_GPG_SECRET_KEY_FILE, ZOPEN_GPG_SECRET_KEY_PASSPHRASE_FILE and ZOPEN_GPG_PUBLIC_KEY_FILE must be set for signing the file.
--sign-rpm, -sr
This option signs the RPM package. ZOPEN_GPG_SECRET_KEY_FILE and ZOPEN_GPG_SECRET_KEY_PASSPHRASE_FILE must be set for signing the RPM.
-v | run in verbose mode. | ||
-vv | run in very verbose mode (sets environment variables V=1 and VERBOSE=1). |
-u, --upgradedeps
upgrade all dependencies by running zopen install.
The specifics of how the tool works can be controlled through environment variables. The only environment variables you _must_ specify are to tell zopen-build where the source is, and in what format type the source is stored. By default, the environment variables are defined in a file named buildenv in the root directory of the [PACKAGE]port github repository.
To see a fully functioning zopen community sample port see: https://github.com/zopencommunity/zotsampleport
User-Provided environment variables:
Required:
ZOPEN_BUILD_LINE
Specify the default build line, either ’DEV’ or ’STABLE’
ZOPEN_CATEGORIES
Specify a space-delimited list of applicable categories. Valid categories: (’security development language ai core utilities editor source_control networking webframework database devops graphics math testing documentation library compression json monitoring shell build_system ai’)
ZOPEN_DEV_DEPS
Required IF ZOPEN_BUILD_LINE=’DEV’ (unless type is LOCAL). Specify the dev build dependencies
ZOPEN_DEV_URL
Required IF ZOPEN_BUILD_LINE=’DEV’ (unless type is LOCAL). Specify the dev build URL (either git or tarball).
ZOPEN_STABLE_DEPS
Required IF ZOPEN_BUILD_LINE=’STABLE’ (unless type is LOCAL). Specify the stable build dependencies.
ZOPEN_STABLE_URL
Required IF ZOPEN_BUILD_LINE=’STABLE’ (unless type is LOCAL). Specify the stable build URL (either git or tarball).
Optional:
ZOPEN_SOURCE_URL
If set, use this as ZOPEN_URL before checking ZOPEN_DEV_URL or ZOPEN_STABLE_URL.
ZOPEN_PYTHON_VERSIONS Python build system only. Space-delimited Python
minor
versions to build, test and publish a wheel for, most significant first, e.g. ’3.12 3.13’. The first is the primary and is what gets installed into the package; every version’s wheel is published. The build fails before compiling if any cannot be located or reports a different version. Defaults to ’3.12 3.13 3.14’, narrowed to whichever of those are installed; if none are, the active python is used. That narrowing applies only to the default -- versions named here must all be present.
ZOPEN_PYTHON_<M>_<m>
Python build system only. Path to the Python <M>.<m> interpreter, e.g. ZOPEN_PYTHON_3_12, as exported by check_python. Consulted first when resolving a version in ZOPEN_PYTHON_VERSIONS, because each Python installs under its own prefix and only one ends up on PATH. Falls back to python<M>.<m> on PATH, then to python3/python if either reports that version.
ZOPEN_PYTHON_WHEEL_RETAG
Python build system only. Set to ’false’ to keep the native platform tag on compiled wheels instead of retagging them to cp3XY-none-any (defaults to ’true’). Only uname-derived tags are retagged either way: a wheel from an interpreter reporting a portable tag, such as zos on 3.14, always keeps it.
ZOPEN_PYTHON_VENV_SYSTEM_SITE
Python build system only. Set to ’true’ to build in a venv that can see the interpreter’s own packages (defaults to ’false’). Needed for anything requiring cffi at build time, which on z/OS exists only as the copy shipped with the interpreter.
ZOPEN_PYTHON_BUILD_ISOLATION
Python build system only. Set to ’false’ to build without build isolation (defaults to ’true’), so [build-system] requires are taken from the venv rather than resolved from PyPI. Pair with ZOPEN_PYTHON_VENV_SYSTEM_SITE=true.
ZOPEN_PYTHON_BUILD_SKIP_DEP_CHECK
Python build system only. Set to ’true’ to build without checking [build-system] requires (defaults to ’false’). Only for a requirement unsatisfiable on this platform at any version, once the package is known to build and work against what is present.
ZOPEN_EXTRA_CFLAGS
C compiler flags to append to CFLAGS (defaults to ’’).
ZOPEN_EXTRA_CPPFLAGS
C,C++ pre-processor flags to append to CPPFLAGS. (defaults to ’’)
ZOPEN_EXTRA_CXXFLAGS
C++ compiler flags to append to CXXFLAGS. (defaults to ’’)
ZOPEN_EXTRA_LDFLAGS
C,C++ linker flags to append to LDFLAGS. (defaults to ’’)
ZOPEN_EXTRA_LIBS
C,C++ libraries to append to LIBS. (defaults to ’’)
ZOPEN_BOOTSTRAP
Bootstrap program to run. If skip is specified, no bootstrap step is performed. (defaults to ’./bootstrap’)
ZOPEN_BOOTSTRAP_OPTS
Options to pass to bootstrap program. (defaults to ’’)
ZOPEN_CHECK
Check program to run. If skip is specified, no check step is performed. (defaults to ’make’)
ZOPEN_CHECK_MINIMAL
Check program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
ZOPEN_CHECK_OPTS
Options to pass to check program. (defaults to ’check’)
ZOPEN_CHECK_TIMEOUT
Timeout limit in seconds for the check program. (defaults to ’12600’)
ZOPEN_CLEAN
Clean up program to run. (defaults to ’make’)
ZOPEN_CLEAN_OPTS
Options to pass to clean up program. (defaults to ’clean’)
ZOPEN_CONFIGURE
Configuration program to run. If skip is specified, no configuration step is performed. (defaults to ’./configure’)
ZOPEN_CONFIGURE_MINIMAL
Configuration program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
ZOPEN_CONFIGURE_OPTS
Options to pass to configuration program. (defaults to ’--prefix=${ZOPEN_INSTALL_DIR}’)
ZOPEN_EXTRA_CONFIGURE_OPTS
Extra configure options to pass to configuration program. (defaults to ’’)
ZOPEN_INSTALL
Installation program to run. If skip is specified, no installation step is performed. (defaults to ’make’)
ZOPEN_INSTALL_MINIMAL
Installation program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
ZOPEN_INSTALL_OPTS
Options to pass to installation program. (defaults to ’install’)
ZOPEN_MAKE
Build program to run. If skip is specified, no build step is performed. (defaults to ’make’)
ZOPEN_MAKE_MINIMAL
Build program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
ZOPEN_MAKE_OPTS
Options to pass to build program. (defaults to ’-j${ZOPEN_NUM_JOBS}’)
ZOPEN_PATCH_DIR
Specify directory from which patches should be applied.
Optional settings for installation:
ZOPEN_RUNTIME_DEPS
Runtime z/OS Open Tool dependencies to be installed alongside the tool.
ZOPEN_BUILDTIME_DEPS
Transitive build-time lib dependencies. Each entry is appended as a :lib dep to ZOPEN_DEPS so that pkg-config and link flags are activated at build time. Written to .libdeps for downstream consumers.
ZOPEN_SETUP_NO_REPLACE
If set, do not replace hardcoded paths with placeholders.
ZOPEN_SYSTEM_PREREQ
System prerequisites, supply the name of the prereq scripts under /home/runner/work/meta/meta/bin/../include/prereq.sh
Restricted Usage - only set in ports if necessary
ZOPEN_DONT_ADD_ZOSLIB_DEP
Set to avoid adding zoslib as a dependency.
Restricted Usage - only SET by metaport, otherwise READ ONLY:
ZOPEN_INSTALL_DIR
Installation directory to pass to configuration. (defaults to ’${ZOPEN_PKGINSTALL}/<pkg>/<pkg>’)
ZOPEN_NUM_JOBS
Number of jobs that can be run in parallel (defaults to half the CPUs on the system)
Restricted Usage (clang):
ZOPEN_CFLAGS
C compiler flags. (default set by dependency)
ZOPEN_CPPFLAGS
C/C++ pre-processor flags. (default set by dependency)
ZOPEN_CXXFLAGS
C++ compiler flags. (default set by dependency)
ZOPEN_LDFLAGS
C/C++ linker flags. (default set by dependency)
Restricted Usage (phpport):
ZOPEN_GIT_SETUP
Specify whether git files should be added to a local repo or if this will be done manually. (defaults to Y)
Restricted Usage (tclport):
ZOPEN_SRC_DIR
Specify a relative source directory to cd to for bootstrap, configure, build, check, install. (defaults to ’.’)
Restricted Usage (meta):
ZOPEN_IMAGE_DOCKERFILE_NAME
Dockerfile name. (default: Dockerfile)
ZOPEN_IMAGE_DOCKER_NAME
Docker/podman tool name. (default: podman)
ZOPEN_IMAGE_REGISTRY
Docker image registry to an OCI image to (use with --oci option)
ZOPEN_IMAGE_REGISTRY_ID
The ID to authenticate to the Docker image registry. (use with --oci option)
ZOPEN_IMAGE_REGISTRY_KEY_FILE
The file containing authentication key to the Docker image registry. (use with --oci option)
ZOPEN_LOG_DIR
The directory to store build logs. (defaults to ’/log’)
ZOPEN_SHELL
Specify an alternate shell to use if -s option specified. (defaults to /bin/sh)
Git variables:
ZOPEN_DEV_BRANCH
The branch that the git repo should checkout. (default is repo default)
ZOPEN_DEV_TAG
The tag that the git repo should checkout as a branch. (optional)
ZOPEN_STABLE_BRANCH
The branch that the stable repo should checkout. (default is repo default)
ZOPEN_STABLE_TAG
The tag that the git repo should checkout as a branch. (optional)
ZOPEN_CLONE_SUBMODULES
Set to yes to recursively clone submodules.
ZOPEN_CLONE_FULL
Set to yes to perform a full clone as opposed to the default shallow clone (depth of 1).
ZOPEN_DEV_TYPE
The type of source for dev builds. Valid types are TARBALL, BARE, LOCAL and GIT. If set to LOCAL, no source is fetched and the build runs in-place.
ZOPEN_STABLE_TYPE
The type of source for stable builds. Valid types are TARBALL, BARE, LOCAL and GIT. If set to LOCAL, no source is fetched and the build runs in-place.
Deprecated:
ZOPEN_CC
C compiler. (default set by dependency)
ZOPEN_CXX
C++ compiler. (default set by dependency)
ZOPEN_DEPS
Alternate environment variable instead of ZOPEN_TARBALL_DEPS or ZOPEN_GIT_DEPS.
ZOPEN_GIT_BRANCH
The branch that the git repo should checkout.
ZOPEN_GIT_DEPS
Space-delimited set of source packages this tarball package depends on to build. (required if ZOPEN_TYPE=GIT)
ZOPEN_GIT_TAG
The tag that the git repo should checkout as a branch.
ZOPEN_GIT_URL
The fully qualified URL that the git repo should be cloned from. (required if ZOPEN_TYPE=GIT)
ZOPEN_LIBS
C/C++ libraries (default set by dependency)
ZOPEN_TARBALL_DEPS
Space-delimited set of source packages this git package depends on to build. (required if ZOPEN_TYPE=TARBALL)
ZOPEN_TARBALL_URL
The fully qualified URL that the tarball should be downloaded from. (required if ZOPEN_TYPE=TARBALL)
ZOPEN_TYPE
The type of package to download. Valid types are TARBALL, BARE, LOCAL and GIT.
ZOPEN_URL
Alternate environment variable instead of ZOPEN_TARBALL_URL or ZOPEN_GIT_URL.
User-Provided functions:
Required:
zopen_check_results
This function runs after the ’check’ step of the build and must print out expected and actual failures.
zopen_get_version
This function returns the version of the tool in accordance with semantic versioning.
Optional:
zopen_append_to_env
This function runs as part of generation of the .env file. The output of the function is appended to .env.
zopen_append_to_setup
This function runs as part of generation of the setup.sh file. The output of the function is appended to setup.sh.
zopen_append_to_validate_install
This function runs as part of generation of the install_test.sh file. The output of the function is appended to install_test.sh script.
zopen_install_caveats
This function is run post install. All stdout messages are captured and added to the metadata.json as installation caveats.
zopen_append_to_zoslib_env
This function runs as part of generation of the C function zoslib_env_hook, which can be used to set environment variables before main is run.
zopen_init
This function runs after code is downloaded and patched but before the code is built.
zopen_post_buildenv
This function runs after the ’buildenv’ is processed.
zopen_post_extract
This function runs when an archive containing the source to build has been uncompressed.
zopen_post_install
This function runs after the ’install’ step of the build is run.
zopen_pre_build
This function runs before the ’make’ step of the build is run.
zopen_pre_check
This function runs before the ’check’ step of the build is run.
zopen_python_test
Python build system only. Runs the tests for one interpreter, and is called once for each one being built. Its virtual environment is already active and the wheel built for it is already installed, so ’python’ and ’pip’ are that interpreter’s and dist/ does not need to be looked at. Defaults to ’python -m pytest -v’. Prefer this over setting ZOPEN_CHECK, which replaces the loop over interpreters as well as the test command.
zopen_pre_configure
This function runs before the ’configure’ step of the build is run.
zopen_pre_install
This function runs before the ’install’ step of the build is run.
zopen_pre_patch
This function runs before the ’patch’ step of the build is run.
zopen_pre_terminate
This function runs before ’zopen build’ terminates.
SEE ALSO:
zopen(1) zopen-alt(1) zopen-init(1) zopen-install(1) zopen-list(1) zopen-remove(1)
This is free software: you are free to change and redistribute it under the terms of the Apache License, Version 2.0. <https://www.apache.org/licenses/LICENSE-2.0.html> There is NO WARRANTY, to the extent permitted by law.
AUTHOR
Written by contributors to the zopen community. <https://github.com/zopencommunity/meta/graphs/contributors>
