For Python 3, we need to always encode what we are sending to the server as
utf-8; encoding strings that have only latin-1 as latin-1 causes us to
send something that the server can't parse. (When no encoding is specified
xmlclient.client.dumps creates an XML document with an xml declaration
for UTF-8.)
Prior to this change, if the following conditions were true:
1) A Koji client uses SSL authentication,
2) The user does not set the "serverca" option for their profile,
3) The user does not have a "~/.koji/serverca.crt" file present,
Then Koji did not use the default CA store to validate the hub's CA.
read_defaults() was setting the "serverca" value to an empty string ""
in these cases. This led to an AuthError in ssl_login() for the empty
string:
raise AuthError("Server CA %s doesn't exist or is not accessible" % serverca)
Update ssl_login() to ignore empty strings in this case, treating them
the same as None.
The code in _sendOneCall() already checks this value in a similar way,
with "if verify:", so we're matching that behavior here.
With this change, Koji clients will fall back to using the default CA
store.
We can enable the None -> "nil" behavior when we instantiate our
Marshaller. RHEL 5 and newer supports allow_none here.
This allows us to drop the dump_nil code from our custom Marshaller and
rely directly on the parent class's method instead.
This should catch issues with downloading RPMs early, so as to not break
the build in unknown ways.
Fixes: #290
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
If there are multiple e-mailes separated by comma of space, they should
be split for correct usage of smtplib.sendmail.
Fixes: https://pagure.io/koji/issue/1240
New options --wait-for-build and --wait-for-repo for build command are
simplification of using wait-repo + build command succession. They have
same semantices as the original one.
Fixes: https://pagure.io/koji/issue/1619
The Koji data model has been updated to support multiple checksum types. These are listed in the
CHECKSUM_TYPES enum in koji/__init__.py, but are not available in kojikamid.py. This change
copies the Enum class and the CHECKSUM_TYPES enum into kojikamid at build time, and uses it when
validating the checksums of downloaded files.