Skip to main content

A collection of Koji client plugins and utils

Project description

Overview

Build Status Coverage Status

Koji Smoky Dingo is a collection of client command-line plugins for the Koji build system, and a set of utility modules for writing your own commands or scripts.

The phrase "smoky-dingo" was provided by coolname and has no particular relevance.

Meta Plugin

This project provides a relatively tiny CLI plugin for koji, named kojismokydingometa. The meta plugin acts as an adapter between koji's existing CLI plugin loading framework and Python entry_points.

The meta plugin can be used to load additional commands beyond those provided as part of this project. Simply register your commands with the "koji_smoky_dingo" entry point key. See the example command as a reference.

Tag Commands

These commands modify tag features, requiring either the tag permission (koji >= 1.18) or the admin permission.

Command Description
block-env-var Blocks a mock environment variable from a tag.
block-rpm-macro Blocks a mock RPM macro from a tag.
bulk—move-builds Move a large amount of builds, bypassing the creation of individual tasks.
bulk—tag-builds Tag a large amount of builds, bypassing the creation of individual tasks.
bulk—untag-builds Untag a large amount of builds, bypassing the creation of individual tasks.
remove-env-var Removes a mock environment variable from a tag.
remove-rpm-macro Removes a mock RPM macro from a tag.
renum—tag-inheritance Adjust the priority values of a tag to maintain the same inheritance order, but to create an even amount of space between each entry.
set-env-var Sets, unsets, or blocks the value of a mock environment variable on a tag.
set-rpm-macro Sets, unsets, or blocks the value of a mock RPM macro on a tag.
swap—tag-inheritance Adjust the inheritance of a tag by replacing one entry for another. If both entries are already parents of a tag, then swap the priority of the two.

Information Commands

These commands are informational only, and do not require any special permissions in koji.

Command Description
affected—targets Show targets which would be impacted by modifications to the given tag
cginfo Show content generators and their permitted users
check—hosts Show builder hosts which haven't been checking in lately
client-config Show settings for client profiles
filter-builds Filter a list of NVRs by various criteria
filter-tags Filter a list of tags by various criteria
latest-archives Show selected latest archives from a tag
list-btypes Show build types
list-build-archives Show selected archives attached to a build
list-cgs Show content generators
list-component-builds Show builds which were used to produce others
list-env-vars Show all inherited mock environment variables for a tag
list-rpm-macros Show all inherited mock RPM macros for a tag
list-tag-extras Show all inherited extra fields for a tag
open Opens a brower to the info page for koji data types
perminfo Show information about a permission
userinfo Show information about a user account

Install

The kojismokydingo package utilizes setuptools and can be built and installed as an egg or wheel.

Because of how koji loads client plugins, if you want the meta plugin available by default system-wide, then the package needs to be installed into the default site-packages for the python installation.

As an RPM via DNF

If using an RPM-based distribution, this is easily achieved using the included spec to produce an RPM and install that.

make clean rpm
dnf install dist/noarch/python3-kojismokydingo-1.1.0-1.fc32.noarch.rpm

As a System-wide Wheel via Pip

Using traditional setuptools or pip installation methods can also achieve this by specifying the specific root or prefix parameter

# Python 2.7 global install
python2 setup.py bdist_wheel
pip2 install --prefix /usr -I dist/kojismokydingo-1.1.0-py2-none-any.whl

# Python 3 global install
python3 setup.py bdist_wheel
pip3 install --prefix /usr -I dist/kojismokydingo-1.1.0-py3-none-any.whl

As a User-only Wheel via Pip

However, if you only want the plugin available for yourself, you can install it anywhere and tell koji to look in that particular site-package/koji_cli_plugins instance

# Python 3 user install
python3 setup.py bdist_wheel
pip3 install --user -I dist/kojismokydingo-1.1.0-py3-none-any.whl

And the following setting in ~/.koji/config assuming Python version 3.7 -- read the output of the install command above to verify your install path. Note that the section title needs to match your koji profile, and that you need to configure this setting for each profile you'll want to use the meta plugin with.

[koji]
plugin_paths = ~/.local/lib/python3.7/site-packages/koji_cli_plugins/

With koji >= 1.18, the meta plugin can also be symlinked into ~/.koji/plugins

mkdir -p ~/.koji/plugins
ln -s ~/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages/koji_cli_plugins/kojismokydingometa.py ~/.koji/plugins

Contact

Author: Christopher O'Brien obriencj@gmail.com

Original Git Repository: https://github.com/obriencj/koji-smoky-dingo

Documentation: https://obriencj.github.io/koji-smoky-dingo

License

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library; if not, see http://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kojismokydingo-1.1.0.tar.gz (100.6 kB view details)

Uploaded Source

Built Distributions

kojismokydingo-1.1.0-py3-none-any.whl (118.3 kB view details)

Uploaded Python 3

kojismokydingo-1.1.0-py2-none-any.whl (118.3 kB view details)

Uploaded Python 2

File details

Details for the file kojismokydingo-1.1.0.tar.gz.

File metadata

  • Download URL: kojismokydingo-1.1.0.tar.gz
  • Upload date:
  • Size: 100.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.10

File hashes

Hashes for kojismokydingo-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b5c6052c2f400953b191b2c38b5a59f80a3ce58566d1003cf9897c2d49a32251
MD5 6ce882a0f84ca0e600071e880e64ceb7
BLAKE2b-256 466e6eddd81df478eea3d6f984002019957ba5e6fae60d9bc076a6ebd6e2f77a

See more details on using hashes here.

File details

Details for the file kojismokydingo-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: kojismokydingo-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 118.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.10

File hashes

Hashes for kojismokydingo-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f0f627e1f57bb939f457c38c7a6fdc4ef3ec9bcb21570881764272dbb04997
MD5 4a2d1b1aef77f15825dbbc0ca0bc11f1
BLAKE2b-256 e07228c2f86fa6d6aad4f0b4366ee3da75cc124e5d1ae8c11cd5b1d60b9bbc75

See more details on using hashes here.

File details

Details for the file kojismokydingo-1.1.0-py2-none-any.whl.

File metadata

  • Download URL: kojismokydingo-1.1.0-py2-none-any.whl
  • Upload date:
  • Size: 118.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.10

File hashes

Hashes for kojismokydingo-1.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 77c7a504490a24b65f46f8aae5c1544bd8741687a4a0f9a470c39eed9200081a
MD5 a2119b6a39cd3cb6737e346bf1d48242
BLAKE2b-256 08097396900de6809e22c85aa48510802aa8dac843592cfe68c81d89b9af04d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page