Commit graph

817 commits

Author SHA1 Message Date
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
Tomas Kopecek
f9190657d9 Add 'target' policy
Fixes: https://pagure.io/koji/issue/1040
2020-02-11 14:30:25 +01:00
Tomas Kopecek
4df680f504 Remove deprecated md5/sha1 constructors
Fixes: https://pagure.io/koji/issue/1491
2020-02-04 09:23:47 +01:00
Tomas Kopecek
8c0bedeeb5 added koji exceptions
Fixes: https://pagure.io/koji/issue/290
2020-01-02 10:45:48 +01:00
Mike McLean
2ff52c0dc3 refactor 2020-01-02 10:45:48 +01:00
Patrick Uiterwijk
5b2e901d2e Add a sanity check on remotely opened RPMs
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>
2020-01-02 10:45:48 +01:00
Yuming Zhu
666111575b do not use with statement with requests.get
fixes: #1530
2019-12-23 10:00:21 +01:00
Tomas Kopecek
0e5042832d split admin_emails option in koji.add_mail_logger
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
2019-12-19 10:31:58 +01:00
Yu Ming Zhu
5b83c682e4 remove unused imports 2019-12-12 11:00:58 +00:00
Yu Ming Zhu
558f7be2d2 fix newline betwwen koji and relative imports 2019-12-12 11:00:58 +00:00
Yu Ming Zhu
4d29a87e9b sort imports in koji 2019-12-12 11:00:57 +00:00
Tomas Kopecek
418376dc81 build can wait for actual repo
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
2019-12-12 15:29:27 +01:00
Tomas Kopecek
208ecca37f continue instead of exiting
Fixes: https://pagure.io/koji/issue/1840
2019-11-27 16:33:41 -05:00
Mike Bonnet
be31305f52 include CHECKSUM_TYPES in kojikamid.py, and use it when validating checksums of downloaded files
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.
2019-11-27 16:42:24 +01:00
Yuming Zhu
7a6ebc851f improve test and clean targets in Makefiles 2019-11-27 15:42:30 +01:00
Tomas Kopecek
b35499cdb4 fix time type for restartHosts
Fixes: https://pagure.io/koji/issue/1825
2019-11-25 11:54:18 +01:00
Tomas Kopecek
aad9fac8d9 move from urrlib.request.urlopen to requests.get
Fixes: https://pagure.io/koji/issue/1530
2019-11-25 11:31:08 +01:00
Tomas Kopecek
8920d9d613 drop compatrequests variant 2019-11-25 11:31:08 +01:00
Patrick Uiterwijk
52f896c602 Implement openRemoteFile with requests or compatrequests
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2019-11-25 11:31:08 +01:00
Yu Ming Zhu
f7f1c65bea raise error when config search paths is empty
also fix unittest: test_profiles

notes: since the test won't read config files anymore, lift the loop number from 20 -> 256 to increase the probability of hitting the multithread issue

fixes: #1786
2019-11-22 08:43:44 +01:00
Ken Dreyer
ff93556f3e util: rename "dict" arg
dict is a built-in Python type. Don't use it as a variable name.
2019-11-19 12:37:13 +01:00
Ken Dreyer
68bcc06427 rm old test code
Some files in the tree had bits of code that you could run if you
executed the files directly as scripts. Now that we have unit tests and
the "fakehub" tool, we do not need this code.
2019-11-18 10:45:57 +01:00
Yu Ming Zhu
22951f7f9d fix typos for GenericError 2019-11-18 10:05:59 +01:00
Tomas Kopecek
ed4bd28b78 include profile name in prased config options
Fixes: https://pagure.io/koji/issue/1522
2019-11-14 09:54:21 +01:00
Tomas Kopecek
e11ad814af make rpm import optional in koji/__init__.py
Fixes: https://pagure.io/koji/issue/1772
2019-11-12 10:03:06 +01:00
Yu Ming Zhu
31a2670575 check ConfigParser object rather than config path list
fixes: #1763
2019-11-08 15:15:33 -05:00
Yu Ming Zhu
3e124f685a fix editUser api for multiple kerberos support 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
ea52707f1d fix typos in auth.py 2019-10-15 09:16:43 +02:00
Yuming Zhu
b2b8d5f9cc strict per item in config_files 2019-10-15 09:14:16 +02:00
Yu Ming Zhu
4c1928f377 extract read_config_files util for config parsing 2019-10-15 09:14:16 +02:00
Tomas Kopecek
dd8fd935f4 use preferred arch if there is more options
https://pagure.io/koji/pull-request/323 introduced option to force an
arch for noarch packages. Nevertheless, it is only task architecture and
not buildroot one. So, if builder can provide more possible archs (32/64
bit), it will pick one of these randomly and can go against preferred arch.

Patch introduces "preferred_arch" option for find_arch and use the
task's one when it works with noarch rpm.

Fixes: https://pagure.io/koji/issue/789
2019-10-14 10:12:40 +02:00
Yuming Zhu
45ce49a643 fix typo in createUser 2019-10-11 14:21:46 +08:00
Yuming Zhu
7b60e0e7eb backwards compatibility for ProxyDNs change 2019-10-10 13:04:06 +00:00
Yu Ming Zhu
3b4673879b fix typo 2019-10-10 13:02:55 +00:00
Yuming Zhu
2408e86ff6 in proxyuser case, do use username rather than principal 2019-10-10 13:02:55 +00:00
Yuming Zhu
d662fb837d keep on using REMOTE_USER
and handover realm translation to auth_to_local rules in /etc/krb5.conf
2019-10-10 13:02:55 +00:00
Yu Ming Zhu
4a3dc40147 use GSS_NAME instead of REMOTE_USER for GSSAPI auth
jira: https://projects.engineering.redhat.com/browse/BST-475
2019-10-10 13:01:24 +00:00
Yu Ming Zhu
30ff46f1b0 fix error msg and regex sytax 2019-10-10 16:37:57 +02:00
Yu Ming Zhu
2034695e88 add an option to set server realm for all clients 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
831f0dfdaf cli: fix moshimoshi for krbLogin 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
ce8ff9068c fix table name typo 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
ab37e28d4d hub: add AllowedKrbRealms option and (add|remove)UserKrbPrincipal API 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
aaeb41e57b change users and krb_principal operations 2019-10-10 16:37:56 +02:00
Tomas Kopecek
327c23d072 Use bytes for debug string
Fixes: https://pagure.io/koji/issue/1656
2019-10-10 12:39:17 +02:00
Mike McLean
3354da7024 joinpath function 2019-10-09 08:41:15 -04:00
Yuming Zhu
2956319c39 update docstr and do not swallow other errno 2019-09-30 15:33:01 +02:00