LinuxCommandLibrary

koji-call

Call Koji build system methods

TLDR

Call build function with scratch option

$ koji call build '"[git+https://src.fedoraproject.org/rpms/vim.git#e847a50297a216229050bf4db3d06a139104e7cf]"' \"[target]\" --kwargs '{"opts":{"scratch": True]'
copy

Call build function with arch_override option
$ koji call build '"[git+https://src.fedoraproject.org/rpms/vim.git#e847a50297a216229050bf4db3d06a139104e7cf]"' \"[target]\" --kwargs '{"opts":{"arch_override":"sw_64"]'
copy

Call build function on default channel
$ koji call build '"[git+https://src.fedoraproject.org/rpms/vim.git#e847a50297a216229050bf4db3d06a139104e7cf]"' \"[target]\" --kwargs '{"channel":"default"}'
copy

Display help
$ koji call [[-h|--help]]
copy

SYNOPSIS

koji-call [options] <session-id> <method> [arg1 arg2 ...]

PARAMETERS

--help
    Display usage information

--version
    Show version and exit

--config FILE
    Use alternate config file

--server URL
    URL of Koji hub XML-RPC endpoint

--proxy USER
    Use USER as proxy owner

--topurl URL
    Top-level URL for Koji instance

--weburl URL
    Base URL for web interface

<session-id>
    Valid session token from koji login

<method>
    Name of XML-RPC method on hub (e.g., hub.getTag)

[args...]
    Optional positional arguments for the method

DESCRIPTION

The koji-call command is a utility in the Koji build system, used primarily by Fedora for RPM package building and management. It enables direct invocation of arbitrary XML-RPC methods on the Koji hub server.

You must first obtain a valid session ID using koji login, then pass it along with the method name and any arguments. This tool is invaluable for debugging, custom scripting, or accessing hub functions not exposed via standard koji subcommands.

For example, querying user info: koji-call abc123def456 hub.getUser myusername. Results are returned in a human-readable format, often as Python dicts or lists.

Security note: Sessions are tied to users; use cautiously to avoid unintended hub actions. Primarily for admins or developers familiar with Koji's API.

CAVEATS

Requires active session; invalid sessions fail silently. Arbitrary method calls risk hub disruption. Output can be verbose/large for complex queries. Not for production automation—prefer official subcommands.

EXAMPLE USAGE

koji login --user=myuser
SESSION=$(koji whoami)
koji-call $SESSION hub.getUser myuser
Returns user dict with ID, name, status.

COMMON METHODS

hub.listTags(), hub.getBuild('package-1.0-1.fc40'), tag.list(taginfo=True). See Koji XML-RPC API docs for full list.

HISTORY

Part of Koji CLI since early versions (~2007), developed by Fedora Infrastructure team. Evolved with Koji 1.x; remains stable for API introspection in Koji 2.x+.

SEE ALSO

koji(1), xmlrpc(1)

Copied to clipboard