Mike McLean
4fddafc54d
rmtree: use fork
...
These changes work around a thread safety issue in our rmtree
implementation, which uses chdir to traverse the directory tree.
Using chdir resolves issues deleting paths longer than PATH_MAX, but
makes the code inherently unsafe in a threaded environment.
Now, the main rmtree function uses fork to perform the actions in a
dedicated process.
To avoid possible locking issues with the logging module, we introduce a
simple proxy logger for the subprocess.
Fixes: https://pagure.io/koji/issue/3755
For historical context see:
https://pagure.io/koji/issue/201
https://pagure.io/koji/issue/2481
https://pagure.io/koji/issue/2714
2024-04-10 11:20:15 +02:00
Mike McLean
1d0d4f2683
add unit tests and drop obsolete ones
2024-03-28 15:58:07 +01:00
Jana Cupova
63a6f43d8a
Fix remove-tag-inheritance with priority
...
Fix remote-tag-inheritance with priority
Fixes: https://pagure.io/koji/issue/3985
2024-03-26 15:11:24 +01:00
Mike McLean
60b71020f0
split out buildroot log watching logic
2024-03-13 10:09:15 +01:00
Jana Cupova
c62e3467b5
Add CLI with users with given permission
...
Fixes: https://pagure.io/koji/issue/3950
2024-03-11 13:12:20 +01:00
Mike McLean
c00e9b3c2e
unit test
2024-03-06 11:14:12 +01:00
Mike McLean
fbb24d631d
unit test
2024-03-05 13:22:58 +01:00
Tomas Kopecek
4ad92b5cd6
Use dnf5-compatible "group install" command
...
* yum knows only "yum groupinstall"
* dnf < 5 knows both
* dnf-5 only "dnf5 group install"
From RHEL5 version of yum, @group syntax is supported, so we can
replace all groupinstall commands with "install @group".
Related: https://pagure.io/koji/issue/3971
2024-03-05 13:17:35 +01:00
Mike McLean
cfd6d3064f
show hub version in koji hello
2024-02-29 15:40:03 +01:00
Mike McLean
62f279ad43
move version fetching to hub_version_str property
2024-02-29 15:40:03 +01:00
Tomas Kopecek
7a9b0561eb
Don't try to resolve server version for old hubs
...
Related: https://pagure.io/koji/issue/3890
2024-02-29 15:40:03 +01:00
Mike McLean
9517fb9ee1
more unit tests
2024-02-27 12:32:52 +01:00
Mike McLean
e0fea6a3b0
delete_rpm_sig: check header files first
...
also fixup some error logging and update unit tests
2024-02-21 12:28:56 +01:00
Mike McLean
f732aad509
Backup signature headers in delete_rpm_sig
2024-02-21 12:28:56 +01:00
Jana Cupova
d31750bf70
CLI list-users with filters from listUsers
...
Fixes: https://pagure.io/koji/issue/4001
2024-02-15 08:25:19 +01:00
Tomas Kopecek
2013692fc9
New scmpolicy plugin
...
Plugin for scm policy using data from SCM checkout.
Related: https://pagure.io/koji/issue/3968
2024-02-09 14:47:37 +01:00
Mike McLean
14863332fd
test_cg_importer.py: avoid creating temp files in checkout
2024-01-22 13:41:45 -05:00
Hector Martinez
d467810c7c
Read config file on image build indirection
2024-01-11 15:55:57 +01:00
Mike McLean
c944ef36a1
unit test for get_rpm preferences
2024-01-05 10:01:02 +00:00
Mike McLean
c5395a5a8f
fix unit tests
...
- adjustments for query updates
- draft data no longer in build.extra
- drop some unhelpful assertions
2024-01-05 10:01:02 +00:00
Yu Ming Zhu
6997097392
fix tests
2024-01-05 10:00:58 +00:00
Yu Ming Zhu
8a64c93d05
promoteBuild: reformat error messages
2024-01-05 10:00:54 +00:00
Yu Ming Zhu
3dbe136187
promoteBuild: remove strict option
2024-01-05 10:00:53 +00:00
Yu Ming Zhu
e32c71c100
remove draft opts in import_build and completeBuild
2024-01-05 10:00:52 +00:00
Mike McLean
af36318ead
refactor get_rpm
2024-01-05 10:00:50 +00:00
Yu Ming Zhu
34c6712fde
simpler gen_draft_release and parse_target_release
2024-01-05 10:00:47 +00:00
Yu Ming Zhu
08a2d6c389
revert tests/test_cli/test_import.py
2024-01-05 10:00:39 +00:00
Yu Ming Zhu
f29e5e143e
parse target_release from draft release instead of extra.draft.target_release
2024-01-05 10:00:38 +00:00
Yuming Zhu
0859f1ba89
promoteBuild: update volume based on volume policy
2024-01-05 10:00:36 +00:00
Yu Ming Zhu
44d59ecbc7
can only promote COMPLETE draft build
2024-01-05 10:00:35 +00:00
Yuming Zhu
6fe42b6212
cil wrapper-rpm: input check and more reasonable opt --create-draft
2024-01-05 10:00:35 +00:00
Yuming Zhu
c045bc7100
promoteBuild: split main function to _promote_build
2024-01-05 10:00:34 +00:00
Yu Ming Zhu
77a06c98b3
draft filter opt: use bool/None instead of bit flag
2024-01-05 10:00:33 +00:00
Yu Ming Zhu
8a34f7efa0
promote-build command
2024-01-05 10:00:32 +00:00
Yuming Zhu
3ff5eaadd6
misc fixes
2024-01-05 10:00:30 +00:00
Yuming Zhu
87409499a3
draft builds
2024-01-05 10:00:29 +00:00
Jana Cupova
ce624342d8
Fix unittests for python-mock-5.x
...
Fixes: https://pagure.io/koji/issue/3967
2024-01-02 13:06:22 +01:00
Yu Ming Zhu
7b1f2a6137
cli: [list-permissions] backward compatibility for getUserPermsInheritance call
...
fixes : #3959
2023-12-08 23:52:39 +00:00
Tomas Kopecek
abe0bc47fb
Fix test
...
Test was not mocking properly log calls, creating log file at local
filesystem.
2023-12-08 11:16:36 +01:00
Tomas Kopecek
41869961f6
Remove six.configparser.SafeConfingParser from tests
...
Fixes: https://pagure.io/koji/issue/3939
2023-11-09 13:58:53 +01:00
Mike McLean
7a6ab7aafa
unit test fixes
2023-10-30 11:49:56 +01:00
Tomas Kopecek
0c58cd954d
Retrieve task_id for older OSBS builds
...
Related: https://pagure.io/koji/issue/3906
2023-10-23 14:24:16 +02:00
Tomas Kopecek
268d07caf4
PR#3884: short option for watch-logs --follow
...
Merges #3884
https://pagure.io/koji/pull-request/3884
Related: #3909
https://pagure.io/koji/issue/3909
2023-10-23 14:21:01 +02:00
Tomas Kopecek
15bdb0cdf9
Revert "short option for watch-logs --follow"
...
This reverts commit 0b7a97dc19 .
It was not pushed via correct PR merge. Same commit will follow with
correct workflow.
2023-10-23 14:09:39 +02:00
Tomas Kopecek
0b7a97dc19
short option for watch-logs --follow
...
Related: https://pagure.io/koji/issue/3909
2023-10-23 14:04:54 +02:00
Mike McLean
e649e19be5
unit test
2023-10-03 15:23:02 +02:00
Mike McLean
3a1ee5cddb
fix unit tests
...
get_ready_hosts function was dropped
2023-10-03 15:23:02 +02:00
Tomas Kopecek
5a368dd72f
fix tests
...
Text change introduced in PR 3915
2023-10-03 15:18:51 +02:00
Tomas Kopecek
9f1f5b674d
short option for watch-logs --follow
...
Related: https://pagure.io/koji/issue/3909
2023-09-22 09:26:31 +02:00
Jana Cupova
48b34b4680
Unify getSessionInfo output
...
Fixes: https://pagure.io/koji/issue/3793
2023-09-13 18:32:36 -04:00