Tomas Kopecek
50bcb6f3bc
replace md5 with sha256
2020-06-24 14:42:01 +02:00
Yu Ming Zhu
a893e8bf2b
a wrapper ignoring FIPS for hashlib.md5
2020-06-24 14:42:00 +02:00
Tomas Kopecek
ac38549992
make mock depsolver policy configurable
...
Fixes: https://pagure.io/koji/issue/826
2020-06-23 09:02:15 +02:00
Tomas Kopecek
477fb48b67
per-tag settings for mock's sign plugin
...
Based on amessina's patch
Fixes: https://pagure.io/koji/issue/84
2020-06-19 13:21:53 +02:00
Tomas Kopecek
1169f4be83
fix option name
2020-06-09 14:38:23 +02:00
Tomas Kopecek
d1cf0040c8
extend to allow also boostrap-image
...
Fixes: https://pagure.io/koji/issue/1017
2020-06-09 14:38:23 +02:00
Tomas Kopecek
2b930de206
kojid: remove bootstrap dir
...
Fixes: https://pagure.io/koji/issue/1988
2020-06-05 14:06:03 +02:00
Tomas Kopecek
db1110a5b9
fix flake8 issues
2020-06-05 10:58:38 +02:00
Tomas Kopecek
f69824041d
fix checking signed files
...
Rpms which are signed with unknown key would raise an error. Ignore
checking of signing key validity.
2020-06-05 10:58:38 +02:00
Tomas Kopecek
3d698be2a7
use downloadFile for localPath and openRemoteFile
2020-06-05 10:58:38 +02:00
Tomas Kopecek
a4863c0f26
lib: check consistency of rpm from openRemoteFile
...
Fixes: https://pagure.io/koji/issue/2130
2020-06-05 10:58:38 +02:00
Tomas Kopecek
8ea4a7245b
lib: retry openRemoteFile and check size
2020-06-05 10:58:38 +02:00
Tom Stellard
afc0efb122
Support tag specific environment variables
...
This makes it possible to specify an environment variable for a tag
that will be used during builds. e.g.
koji edit-tag -x rpm.env.CC=clang
2020-05-27 14:28:39 +02:00
Mike McLean
d30ac98325
clarify reason for decoding in comment
2020-05-25 09:14:51 +02:00
Mike McLean
b3687f2b25
don't decode signature headers
...
Fixes https://pagure.io/koji/issue/2221
some headers, like sigmd5, are inherently binary
2020-05-25 09:14:51 +02:00
Alex Iribarren
2087561fe6
Correctly identify "hostname doesn't match" errors
2020-05-20 10:50:56 +02:00
Yu Ming Zhu
21ff8143c4
warning for both cli and config file option
2020-05-18 09:29:04 +02:00
Yu Ming Zhu
80cf5ac94a
deprecated warning for cli option --ca as well
...
fixes : #2182
2020-05-18 09:29:04 +02:00
Tomas Kopecek
0e5b54f32d
cli: deprecate --ca
...
Fixes: https://pagure.io/koji/issue/2182
2020-05-13 10:45:37 +02:00
Tomas Kopecek
64a0033150
fix additional flake8 problems
2020-05-13 09:56:36 +02:00
Tomas Kopecek
0132313f92
replace logging.warn with warning
...
call is deprected in python 3.7
Fixes: https://pagure.io/koji/issue/2135
2020-04-22 13:47:15 +02:00
Tomas Kopecek
f2a57c8485
always set utf8 pg client encoding
...
Related: https://pagure.io/koji/issue/2104
2020-04-01 16:19:03 +02:00
Tomas Kopecek
f60fe79379
remove unneeded condition
2020-03-30 16:48:43 +02:00
Tomas Kopecek
79f6333629
delete main part of data
2020-03-30 16:48:43 +02:00
Tomas Kopecek
e3b7f326ef
add real delete
2020-03-30 16:48:43 +02:00
Tomas Kopecek
98d25bf384
delete oldest failed buildroot, when there is no space
...
Fixes: https://pagure.io/koji/issue/1913
2020-03-30 16:48:43 +02:00
Owen W. Taylor
3227462528
koji.ClientSession: fix erroneous conversion to latin-1
...
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.)
2020-03-25 09:54:11 +01:00
Ken Dreyer
19dabc0eda
client: use default CA store during client auth if serverca is unset
...
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.
2020-03-11 13:33:39 +01:00
Yuming Zhu
d21083a11b
still use BaseException for logging purpose
2020-03-03 21:38:22 +08:00
Yuming Zhu
cf34706f04
use Exception instead of BaseException for bare expection
2020-03-03 21:38:22 +08:00
Yuming Zhu
2a2c5cb729
flake8: apply W rules (prefering W503)
2020-03-03 21:38:22 +08:00
Yuming Zhu
c5db34a8e1
flake8: apply E501 with max-line-length=99
2020-03-03 21:38:22 +08:00
Yuming Zhu
f1ba6cefd7
flake8: apply all rest E7 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
6ed30954b2
flake8: apply E71x rule
2020-03-03 21:38:22 +08:00
Yuming Zhu
fa69c4904e
flake8: apply E70x rule
2020-03-03 21:38:22 +08:00
Yuming Zhu
6dd77e0fa4
flake8: apply E502 rule
2020-03-03 21:38:22 +08:00
Yuming Zhu
0f727a2ab4
flake8: apply E3 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
05340b146b
flake8: apply E2 rules except E266
2020-03-03 21:38:21 +08:00
Yuming Zhu
ce1f9928af
flake8: apply E1 rules
2020-03-03 21:38:21 +08:00
Yu Ming Zhu
49504073b1
refine import style
2020-03-03 21:35:08 +08:00
Yuming Zhu
97cfaa4fcf
flake8: follow E265 rule
2020-03-03 21:35:08 +08:00
Yuming Zhu
642508ccf6
flake8: follow all F rules
2020-03-03 21:35:08 +08:00
Tomas Kopecek
344f00a2a5
move _apidoc cache to session
...
Fixes: https://pagure.io/koji/issue/1533
2020-02-25 10:24:55 +01:00
Till Maas
cdf63326c7
Add doc string for virtual methods
2020-02-25 10:24:55 +01:00
Ken Dreyer
81d685b07d
xmlrpcplus: use parent Marshaller's nil implementation
...
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.
2020-02-21 09:44:46 +01:00
Ken Dreyer
aa35b84c8c
xmlrpcplus: use parent's int marshalling if possible
...
If we have an int value between xmlrpc.MININT and xmlrpc.MAXINT, we can
rely on stdlib's xmlrpc.Marshaller. This allows us to drop this custom
code.
2020-02-21 09:44:46 +01:00
Tomas Kopecek
72b4c0c3e2
deprecation of krb_login
...
Fixes: https://pagure.io/koji/issue/1906
2020-02-19 14:15:17 +01:00
Tomas Kopecek
d6f2db6325
fix potentially undeclared variable error
...
Fixes: https://pagure.io/koji/issue/1957
2020-02-18 11:54:11 +01:00
Jon Schlueter
779a8bae08
Add _taskLabel entry for indirectionimage
...
v2: cleanup whitespace and drop extra line from debugging
2020-02-12 10:54:38 +01:00
Miro Hrončok
388bb070f1
Always use stream=True when iterating over a request
...
Fixes https://pagure.io/releng/issue/9226
2020-02-12 10:42:12 +01:00