... as is now documented in 'CONTRIBUTING'.
* tools/fedabipkgdiff: Handle 'koji.ConfigurationError'.
* configure.ac: Likewise.
* CONTRIBUTING: Document "fedabipkgdiff testing".
Documenting/providing a way to enable such testing, this commit can be
considered a sequel to commit
90d236a03343d75ea504d53c73270e50b9000e75
"Bug 22076 - Disable fedabipkgdiff for old koji clients", for Mark Wielaard's
PR22076 "runtestfedabipkgdiff.py fails on debian-amd64".
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
tests/data/Makefile.am file, in the EXTRA_DIST variable. Look at how
things are organized in that file, and please do things similarly.
+fedabipkgdiff testing
+---------------------
+
+This depends on the Python koji and a few support modules. If these are
+not available, 'configure' disables fedabipkgdiff and its 'make check'
+testing.
+
+Debian and Ubuntu, for example, don't provide packages for the Python
+koji module. If you'd like to run fedabipkgdiff testing without manually
+doing a proper Koji installation, you may simply download Koji sources
+(<https://pagure.io/koji>, releases, or Git clone) and point to these via
+the Python search path. For example, tested 2021-12-11:
+
+ wget https://pagure.io/koji/archive/koji-1.27.0/koji-koji-1.27.0.tar.gz
+ tar -xzf koji-koji-1.27.0.tar.gz
+ export PYTHONPATH="$PWD"/koji-koji-1.27.0
+
+A libabigail 'configure' run then enables fedabipkgdiff and its
+'make check' testing.
+
Coding language and style
==========================
AC_MSG_CHECKING([if koji client is recent enough])
$PYTHON 2>&AS_MESSAGE_LOG_FD -c "
import koji
-koji.read_config('koji')"
+try:
+ koji.read_config('koji')
+except koji.ConfigurationError:
+ # See 'tools/fedabipkgdiff'.
+ pass"
if test $? -eq 0; then
koji_version_check_ok=yes
else
# something wrong.
-koji_config = koji.read_config('koji')
-DEFAULT_KOJI_SERVER = koji_config['server']
-DEFAULT_KOJI_TOPURL = koji_config['topurl']
+# First, try proper Koji initialization.
+try:
+ koji_config = koji.read_config('koji')
+ DEFAULT_KOJI_SERVER = koji_config['server']
+ DEFAULT_KOJI_TOPURL = koji_config['topurl']
+except koji.ConfigurationError:
+ # ..., but if that fails because of a rather strict interpretation where
+ # 'read_config' looks for configuration files, just use dummy values.
+ # These fail upon use unless overridden, which for libabigail test suite
+ # usage they always are (all relevant artifacts are shipped in the
+ # libabigail distribution).
+ DEFAULT_KOJI_SERVER = 'dummy_DEFAULT_KOJI_SERVER'
+ DEFAULT_KOJI_TOPURL = 'dummy_DEFAULT_KOJI_TOPURL'
+
# The working directory where to hold all data including downloaded RPM
# packages Currently, it's not configurable and hardcode here. In the future