Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
| TIX-METABUILD(8) | System Manager's Manual | TIX-METABUILD(8) | 
NAME
tix-metabuild —
    build packages from ports
SYNOPSIS
| tix-metabuild | [ -Ccollection]
      [--build=triplet]
      [--build-id=build-id]
      [--cache-package]
      [--destination=directory]
      [--distclean]
      [--download-package]
      [--end=step]
      [--exec-prefix=prefix]
      [--generation=level]
      [--host=triplet]
      [--hosts=triplets]
      [--make=path]
      [--makeflags=makeflags]
      [--metadata]
      [--mirror=url]
      [--mirror-directory=directory]
      [--mirrors=urls]
      [--packages=packages]
      [--prefix=prefix]
      [--public-key=path]
      [--randomize]
      [--release=release]
      [--release-directory=directory]
      [--release-key=file]
      [--release-info]
      [--release-url=url]
      [--repository=directory]
      [--secret-key=path]
      [--sign]
      [--start=step]
      [--sysroot=directory]
      [--sysroot-download-packages=packages]
      [--sysroots=directory]
      [--tar=path]
      [--target=triplet]
      [--tmp=directory]
      [--version=version]
      ports | 
DESCRIPTION
tix-metabuild builds each port in the
    ports directory and creates a repository with the
    binary packages. Each port is in its own subdirectory named after it,
    containing the port(5) The
    --packages option can be used to select which
    packages to build. tix-metabuild determines the
    build order using
    tix-list-packages(8),
    and then builds and installs the packages in order using
    tix-port(8), forwarding all
    the appropriate options. tix-metabuild is usually
    invoked through
    development(7) for the
    official ports.
If the end of the build is beyond the clean phase, then the tix collection is automatically created if needed using tix-create(8) before the builds begin.
Optionally tix-metabuild can create a tix
    release and sign it per the --metadata,
    --release-info, and --sign
    options which invoke
    tix-repository(8)
    appropriately.
The options are as follows:
- --build=triplet
- The platform triplet for the machine the port is built on. (Default: Automatically detected.)
- --build-id=build-id
- The overall build identifier, such as a git commit hash, forwarded to the tix-create(8) and tix-release(8) release invocations.
- --cache-package
- Skip the build if the binary package already exists and is the right version.
- -C,- --collection=collection
- Install the binary package into this collection
      created with
      tix-create(8).
      (Default: --sysrootplus--prefix)
- --destination=directory
- The binary package is placed inside this directory.
- --download-package
- Download an existing binary package from the collection using
      tix-fetch(8) and use it
      if it is the right version as per
    --cache-package.
- --distclean
- Clean the port for distribution. Remove the extraction and all the metadata files. If DEVELOPMENT is true in the port(5), then emit a warning, and do nothing to avoid deleting any in-progress work.
- --end=step
- Stop the build after this step:
    
    - start
- The start step before anything has happened.
- download
- Download the source code.
- extract
- Extract the source code and apply patches.
- tix-build-start
- The start step in tix-build(8).
- clean, pre-clean
- Clean the source directory before the build.
- configure
- Configure the port.
- build
- Build the port.
- install
- Install the port into the DESTDIR.
- post-install
- Run the post-installation script.
- post-clean
- Clean the source code after the port.
- package
- Create the binary package.
- tix-build-end
- The end step in tix-build(8).
- strip
- Strip the executables in the binary package.
- diff
- Regenerate the patches if in development.
- tix-install
- Install the binary package.
- end
- The end step after everything has happened. (Default)
 
- --exec-prefix=prefix
- The prefix where architecture dependent files are
      installed. (Default: --prefix)
- --generation=generation
- Create a binary package in the format of this tix generation level. (Default: 3)
- --host=triplet
- The platform triplet for the machine the port will
      run on. (Default: --build)
- --hosts=triplets
- Build binary packages for each --hosttriplet in the space-separated triplets list. The--sysrootsoption is useful for cross-compilation.
- --make=path
- Which make(1) to use.
      (Default: MAKEif set and otherwise make(1))
- --makeflags=makeflags
- Override the MAKEFLAGSvariable inherited by make.
- --metadata
- After building the packages, run the tix-repository(8) metadata command to generate the tix repository metadata from the binary packages.
- --mirror=url
- First attempt to download the upstream releases from the port's source code mirror at url before attempting the upstream site. The files are copied from the filesystem if the url has no schema.
- --mirror-directory=directory
- Place the downloaded upstream releases in this
      directory in the layout that can be used as a mirror
      for the --mirroroption. (Default: port.mirror)
- --mirrors=url
- The space-separated URLs to the mirrors in the release information. Forwarded to the tix-repository(8) release invocation. This option is usually not used, as the mirror feature should be used in a tix-repository(8) channel instead.
- --packages=packages
- Build these packages as evaluated by tix-list-packages(8). The defaullt is ‘all!!’.
- --prefix=prefix
- Build the port into this prefix. (Default: The empty prefix designating the root directory)
- --public-key=path
- The public key to use for the --signoption. Forwarded to the tix-repository(8) sign invocation.
- --randomize
- Build the ports in a random order while still respecting the build dependencies.
- --release=release
- The name of the release. Forwarded to the tix-repository(8) release invocation.
- --release-directory=release
- Place the binary package inside the
      $release/repository/$host directory, if the
      --destinationand--repositoryoptions are not set.
- --release-key=file
- Copy the release public key from the file, forwarded to the tix-create(8) invocation.
- --release-info
- Generate the top-level release information by invoking
      tix-repository(8)
      release. Implies the --metadataoption and requires the--build-id,--release, and--versionoptions to be set.
- --release-url=url
- The url to the location where the release being built will be published, file, forwarded to the tix-create(8) invocation.
- --repository=repository
- Place the binary package inside the
      $repository/$host directory, if the
      --destinationoption is not set.
- --secret-key=path
- The secret key to use for the --signoption. Forwarded to the tix-repository(8) sign invocation.
- --sign
- Sign the top-level release information by invoking
      tix-repository(8)
      sign. Implies the --metadataand--release-infooption and requires the--build-id,--public-key,--release,--secret-key, and--versionoptions to be set.
- --start=step
- Start the build at this step (see --end). (Default: start)
- --sysroot=directory
- The system root to use while building and installing the port. The toolchain is wrapped to transparently use this sysroot during the build.
- --sysroot-download-packages=packages
- Create a collection with tix-create(8) inside the system root if needed by importing the configuration from the / collection, and then download and install the packages in the space-separated packages list along with their runtime dependencies. The system package is useful to get the headers and libraries for the base system.
- --sysroots=directory
- In combination with --hosts, use system roots named after the triplets in the directory for cross-compilation.
- --tar=path
- Which tar(1) to use during the build. (Default: tar(1))
- --target=triplet
- The port's outputs targets this platform triplet.
      (Default: --host)
- --tmp=directory
- Place temporary files in this directory. (Default:
      TMPDIRif set otherwise /tmp)
- --version=version
- The version number of the release. Forwarded to the tix-repository(8) release invocation.
EXIT STATUS
tix-metabuild will exit 0 on success and
    non-zero otherwise.
EXAMPLES
Create a new tix release
First create a signing key either to be reused across releases, or a per-release signing key to be rotated:
mkdir -p keys signify -G -c 'local repository signing key' -p keys/local.pub -s keys/local.sec
Use the signify(1)
    -n option to omit the password for unattended
    signing.
Create a tix release with custom port(5) packages from the ports directory, meant to be installed into /local, cross-compiling to multiple hosts using downloaded system roots containing the base system, and create it as the 1.0 release signed with the secret key:
tix-metabuild \ --build-id=$(git rev-parse HEAD) \ --hosts='i686-sortix x86_64-sortix' \ --prefix=/local \ --public-key=keys/local.pub \ --release=1.0 \ --release-directory=release/1.0 \ --secret-key=keys/local.sec \ --sign \ --sysroot-download-packages=minimal \ --sysroots=sysroots \ --version=1.0 \ ports
The release directory can published after signing.
Next use the tix-release(8) channel command to provide a layer of indirection with dynamic data such as available upgrades and available mirrors. The release directory is meant to be immutable whereas the channel is modified and re-signed as needed. See tix-repository(8) for more information.
SEE ALSO
signify(1), port(5), development(7), porting(7), tix(8), tix-create(8), tix-install(8), tix-list-packages(8), tix-port(8), tix-release(8), tix-repository(8), tix-uninstall(8)
HISTORY
tix-metabuild originally appeared in
    Sortix 1.1.
| December 27, 2024 | Sortix 1.1.0-dev | 
