Commit graph

88 commits

Author SHA1 Message Date
Yu Ming Zhu
f41b8c70a7 Bandit [B411]: use defusedxml to prevent remote XML attacks
- putting xmlrpc stuff into koji.xmlrpcplus
- adding koji.xmlrpcplus.xmlrpc_server to refer
- replacing refs of original xmlrpc.client.dumps to enhanced
  koji.xmlrpcplus.dumps

fixes: #3964
2024-02-02 09:08:18 +01:00
Mike McLean
1f54dbdf8f watch-tasks: show host for assigned tasks 2023-10-03 15:23:02 +02:00
Tomas Kopecek
21dba45bfc Fix mtime logic for py2.x
Related: https://pagure.io/koji/issue/3711
2023-03-16 09:46:54 +01:00
Tomas Kopecek
8acb4a4fd3 fix py26 compatibility 2023-03-07 12:50:10 +01:00
Yanko Kaneti
d520dce8a2 download-build: preserve build artefacts last modification time 2023-03-07 12:50:10 +01:00
Tomas Kopecek
c8ad0479de unify kwargs for gssapi_login 2023-03-03 09:28:29 +01:00
Frank Buettner
b9565c6c78 Let "--principal=" works for users using multiple TGT's
fix for https://pagure.io/koji/issue/3680
2023-03-03 09:28:29 +01:00
Jana Cupova
bdc1121c14 Add number and size for download-build
Fixes: https://pagure.io/koji/issue/3515
2022-10-11 13:23:17 +02:00
Tomas Kopecek
df44502792 cli: allow redirects for file size checking
Related: https://pagure.io/koji/issue/3463
2022-09-27 14:11:43 +02:00
Tomas Kopecek
4daea4dab9 rename function 2022-08-01 15:33:29 +02:00
Tomas Kopecek
4e6aca0bd0 exception-free watch_builds
Related: https://pagure.io/koji/issue/2981
2022-08-01 15:33:29 +02:00
Otto Urpelainen
d2247940b6 Add utility function to watch builds
External tools that interact with Koji
need to wait for builds to appear in a repo.
For example, Fedora cli tools 'bodhi' and 'fedpkg'
can create buildroot overrides,
which only become useful
after the override's build appears in the correct repo.
At the moment, 'bodhi' waits for a repo
by invoking the 'koji wait-repo' cli tool
while 'fedpkg' does not wait at all.
In order to make it easier for such tools to wait for a repo,
the wait implementation from 'koji wait-repo'
is moved to koji_cli.lib namespace
where it is available for use through Python import.
2022-08-01 15:33:29 +02:00
Jana Cupova
952ddf4861 koji download-task retry download file
Fixes: https://pagure.io/koji/issue/3375
2022-06-14 15:39:37 +02:00
Jana Cupova
83f17e2892 Skip activate_session when logged
Fixes: https://pagure.io/koji/issue/3253
2022-04-19 12:43:24 +02:00
Tomas Kopecek
3ee95baa5f mock.module_setup_commands tag extra option
Fixes: https://pagure.io/koji/issue/2483
2022-02-07 09:33:14 +01:00
Jana Cupova
32b5377392 Remove translation stub functions
Fixes: https://pagure.io/koji/issue/3072
2021-10-21 13:25:16 +02:00
Tomas Kopecek
ba2e1e520b basic security checks with bandit
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Jana Cupova
74112e804f method call json default option set up to str
Fixed: https://pagure.io/koji/issue/3065
2021-10-19 12:40:56 +02:00
Tomas Kopecek
5d86608931 Honour --force-auth for anonymous commands
Fixes: https://pagure.io/koji/issue/2657
2021-09-14 13:26:11 +02:00
Jana Cupova
bc2a51350d Enable/disable channel
Fixes: https://pagure.io/koji/issue/1851
2021-07-20 10:33:50 +02:00
Ken Dreyer
8d0b4bc618 cli: catch koji.ParameterError in list_task_output_all_volumes
When we send an RPC with a parameter that the hub does not understand,
we get a koji.ParameterError.

Update list_task_output_all_volumes() to catch the specific error we
expect here.

The purpose of this change is to make the code easier to understand.
2021-03-25 13:59:59 +01:00
Tomas Kopecek
29a34f31a5 cli: show connection exception
For anonymous calls (whose use ensure_connection) is now shown also
original exception if --debug is specified.

Fixes: https://pagure.io/koji/issue/2592
2021-03-10 15:31:11 +01:00
Mike McLean
5bc690c4ea support modules and other btypes in download-build
Fixes https://pagure.io/koji/issue/2677
2021-03-03 14:11:20 +01:00
Ken Dreyer
659a450bc1 cli: support download-build --type=remote-sources
Prior to this change, "koji download-build --type=remote-sources" failed
with an AssertionError.

Add support for OSBS's cachito remote-sources btype.
2021-02-02 14:45:30 +01:00
Ken Dreyer
8321df159b cli: raise NotImplementedError with btype name
Print the exact unhandled btype name to the user, so it's clearer why
we're exiting early here.
2021-01-12 13:17:42 +01:00
Tomas Kopecek
866c81cb63 cli: some options are not supplied in all _list_tasks calls
Fixes: https://pagure.io/koji/issue/2585
2021-01-04 10:42:34 +01:00
Tomas Kopecek
254c766b1f cli: create after/before OptionParser helper 2020-12-01 14:40:51 +01:00
Tomas Kopecek
0256282a84 cli: list-task --after/--before/--all
allow querying for closed tasks

Fixes: https://pagure.io/koji/issue/2565
2020-12-01 13:02:25 +01:00
Tomas Kopecek
bc478c2d68 cli: show log urls for failed tasks
Fixes: https://pagure.io/koji/issue/2188
2020-10-02 12:44:07 -04:00
Tomas Kopecek
dbd0c9ac9c cli: delete downloaded file with zero size
Fixes: https://pagure.io/koji/issue/2451
2020-09-07 10:10:59 +02:00
Tomas Kopecek
7223e278d3 don't check size for signed rpms 2020-09-04 08:28:15 +02:00
Tomas Kopecek
ecf50429ed cli: download_file redownload if we've larger file
Fixes: https://pagure.io/koji/issue/2465
2020-09-04 08:28:15 +02:00
Tomas Kopecek
53d1081f27 cli: don't check size for signed rpms
We store only size of unsigned copy in db, so checking it for signed
rpms results in error.

Fixes: https://pagure.io/koji/issue/2394
2020-08-03 09:50:22 +02:00
Tomas Kopecek
f8419e3626 remove deprecated krbV support
Fixes: https://pagure.io/koji/issue/1991
2020-07-24 15:08:47 -04:00
Yu Ming Zhu
a893e8bf2b a wrapper ignoring FIPS for hashlib.md5 2020-06-24 14:42:00 +02:00
Tomas Kopecek
be57b32f42 cli: flush stdout during watch-logs
Fixes: https://pagure.io/koji/issue/2227
2020-05-20 10:42:49 +02:00
Tomas Kopecek
291f04301b download_archive / download_rpm methods for CLI
Fixes: https://pagure.io/koji/issue/1880
2020-03-25 14:03:47 +01:00
Frank Ch. Eigler
18d7fc8f82 Range: header: use old school fmt % operator
This should be more compatible with old pythons.
2020-03-25 14:03:47 +01:00
Frank Ch. Eigler
41b0f6d86e issues/1880: send Range: header to accelerate duplicate/partial downloads 2020-03-25 14:03:47 +01:00
Tomas Kopecek
bb9c72092b use only gssapi_login in CLI
Fixes: https://pagure.io/koji/issue/1906
2020-03-09 15:13:36 +01: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
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
Yuming Zhu
97cfaa4fcf flake8: follow E265 rule 2020-03-03 21:35:08 +08:00
Tomas Kopecek
638f6cc6f2 replace xmlrpc_client exception with requests
It is broken in startup function for kojid and kojivmd from the
introduction of requests.

Fixes: https://pagure.io/koji/issue/1914
2020-02-21 12:40:42 +01:00
Yu Ming Zhu
8c21aa7e6d sort imports in cli 2019-12-12 11:00:57 +00:00
Tomas Kopecek
dd4a7edcfd get_usage_str 2019-12-11 11:47:01 +01:00