Package: nattka
Author:Michał GórnyLicense:2-clause BSD licenseHomepage:https://github.com/mgorny/nattka/Documentation:https://dev.gentoo.org/~mgorny/doc/nattka/NATTkA is a combined replacement for Gentoo keywordreq/stablereq sanity
checking tool stable-bot, and its clientgetatoms.py.  It is meant
to make preparing and processing keywording bugs more consistent
and easier.  NATTkA specifically focuses on activity relevant to
Bugzilla — verifying bugs, getting package lists, committing changes
(based on bugs ☺) and closing bugs.FeaturesThe primary features of NATTkA are:Fast sanity checking of requests usingpkgcheckbackend, even
if arches are not CC-ed yet (if keywords can be determined
from package list).Support for generic package dependency syntax in package list field
for keywording requests, removing the requirement to explicitly
specify one package version and keep it updated.applycommand that replacesgetatoms.py, with support for
applying keywords in place and dependency sort of output.commitcommand that takes care of committing keyworded packages
with automatically generated commit messages.resolvecommand that takes care of unCC-ing arches from bugs,
and closing them if appropriate.Automatic CC-ing of the correct arch teams viaCC-ARCHESkeyword.Support for ALLARCHES stabilizations.Filing keywording/stabilization bugsNATTkA uses the same Bugzilla features as stable-bot.  It processes
bugs filed in keywording/stabilization-related components, with package
list field filled in.  The results of sanity check are reported via flag
and comment on the bug.Package list names one package per line (using CPV or package dependency
specification form), optionally followed by one or more keywords.For stabilization requests, exact package versions must be specified.
For keywording requests, generic specifications can be used instead.
If they match multiple versions, the program will determine the newest
suitable version.Tilde before keywords is optional and does not influence the behavior —
stable or testing keywords are used depending on component used.
If keywords are listed for all packages, the bug can be checked even
before arch teams are CC-ed.In place of explicit (or implicit) keywords, additional tokens can
be used to save typing:^that copies keywords from the previous package on the list.*that aligns keywords to other versions of the package.Once arch teams are CC-ed, effective keywords are determined
as the intersection of specified keywords and CC-ed arches.  Packages
listed without keywords are assumed to be requested on all CC-ed arches.Alternatively to CC-ing arch teams, theCC-ARCHESkeyword can be
added to a bug.  In that case, NATTkA will automatically determine arch
teams from the package list field and CC them, as long as the bug passes
sanity check.NATTkA scans packagemetadata.xmlfiles forstabilize-allarcheselement.  If all packages on the package list have one, it automatically
addsALLARCHESkeyword.  Otherwise, it ensures that this keyword
is not present.Example package list follows:dev-bar/libfrobnicate-9.0
dev-foo/frobnicate-1.2.3 amd64 x86
dev-libs/libdependency-7.7.7 ^Detailed information on Bugzilla use can be found in thebug
processingsection of the documentation.Basic usage helpNATTkA uses Python’s argument parser with subcommand support.  To get
help on global options and available commands, type:nattka --helpTo get help on command-specific arguments, type:nattka <subcommand> --helpPlease note that global optionsmustbe passed before the command,
and command-specific options after it.Detailed help on command-line options can be found in theusagesection
of the documentation.Using NATTkA for arch testingThe following workflow assumes that you are working ongentoo.gitrepository clone, and running NATTkA inside the checkout.  You should
generate API key and put it in~/.bugz_tokenfile (as used by old
versions of pybugz) or pass via--api-keyglobal option.First, use theapplycommand to get some pending bugs and apply
their keywords to your local checkout.To process a specific bug, pass its number:nattka apply 123456 123458To find and process all open bugs, run the command without
any arguments:nattka applySearch results can further be narrowed:nattka apply --keywordreq
nattka apply --stablereq
nattka apply --securityTo run for another arch than host’s:nattka apply -a arm64 ...
nattka apply -a hppa -a sparc ...
nattka apply -a '*' ...To disable modifying keywords on packages and just output a list
suitable for copying intopackage.accept_keywords:nattka apply -n ...To disable skipping bugs that did not pass sanity check or have
unresolved dependencies:nattka apply --ignore-sanity-check ...
nattka apply --ignore-dependencies ...To disable performingALLARCHESstabilizations:nattka apply --ignore-allarches ...After successfully testing the packages, usecommitcommand
to commit the changes:nattka commit [-a ...] [--ignore-allarches] 123456Then check and push them:pkgcheck scan --commits
git push --signedFinally, update the bugs:nattka resolve [-a ...] [--ignore-allarches] 123456A little more details can be found in thequick startsection
of the documentation.