LinuxCommandLibrary

koji-tag-build

Tag a Koji build

TLDR

Apply a tag to one or more builds

$ koji tag-build [tag] [NVR1 NVR2 ...]
copy

Don't wait on task
$ koji tag-build [tag] [NVR1 NVR2 ...] --nowait
copy

Force operation
$ koji tag-build [tag] [NVR1 NVR2 ...] --force
copy

Display help
$ koji tag-build [[-h|--help]]
copy

SYNOPSIS

koji tag-build [options] <tag> <buildNVR> [<buildNVR> ...]

PARAMETERS

--force
    Force tagging even if blocked by package lists or Maven inheritance.

-m STRING, --message=<STRING>
    Commit message for the tag operation.

--owner=<OWNER>
    Override owner verification for the build(s).

--extra=<JSON>
    Extra inheritance data as JSON string.

--bad-tag=<TAG>
    Untag from this additional 'bad' tag simultaneously.

--allow-missing
    Proceed even if some specified builds do not exist.

--cfgfile=<FILE>
    Use alternate Koji config file (shared option).

--server=<URL>
    Specify Koji hub server URL (shared).

--user=<NAME>
    Username for authentication (shared).

DESCRIPTION

Koji is a distributed RPM build system used by Fedora and other projects for managing package builds across multiple systems. The koji tag-build command promotes a build, identified by its NVR (Name-Version-Release), into a target tag. Tags represent build roots or repository targets, and tagging makes builds available for repository generation, inheritance, or consumption by yum/dnf.

This command is central to Koji workflows: builds are first created in development or scratch tags using koji build, verified, then tagged into stable or release tags. It handles RPM, Maven, and image builds, updating package lists and inheritance chains. Users must have permissions like tag membership (build, approved, or admin groups).

Tagging triggers events like repo regeneration and can untag from prior locations implicitly. It's atomic for multiple builds but respects blocks from package ownership or config. Common in CI/CD for distro releases.

CAVEATS

Requires tag permissions (admin/build/approved group); fails on blocks without --force. Multiple NVRS must match tag arches. Not for scratch builds directly.

EXAMPLE

koji tag-build dist-f39-updates kernel-6.1.0-1.fc39

Tags kernel build into Fedora 39 updates tag.

koji tag-build --force f39-staging "glibc-2.38-1.fc39" "bash-5.2-1.fc39"

PERMISSIONS NOTE

Check with koji call tagInfo <tag> for groups. Owners auto-approved for their packages.

HISTORY

Koji originated in Fedora Infrastructure around 2007, replacing plague. tag-build added early for core tagging workflow, evolving with Maven/Java support (~2010) and multi-arch features.

SEE ALSO

koji(1), koji-build(1), koji-untag-build(1), koji-list-tagged(1), koji-promote(1)

Copied to clipboard