Commit graph

7966 commits

Author SHA1 Message Date
Mike McLean
8bc1c1b466 fix bandit B704 2025-05-07 14:07:04 +02:00
Mike McLean
2270a85687 drop custom coverage config 2025-05-07 14:07:04 +02:00
Mike McLean
64d6b3f0f7 drop builder changes for now 2025-05-07 14:07:04 +02:00
Mike McLean
96e7cc1634 minor output compatibility fixes
- suppress "None" in api page
- show yes/no for dist repo flag
2025-05-07 14:07:04 +02:00
Mike McLean
5a6c6757df fix template install path 2025-05-07 14:07:04 +02:00
Mike McLean
aa2192d233 alternate coverage config to check template coverage
E.g. using https://github.com/MrSenko/coverage-jinja-plugin
2025-05-07 14:07:04 +02:00
Mike McLean
0fa58716cc move templates into subdir 2025-05-07 14:07:04 +02:00
Mike McLean
4e407c7f1b fixes 2025-05-07 14:07:03 +02:00
Mike McLean
0321b7128b Unit tests, fixes, and cleanup 2025-05-07 14:07:03 +02:00
Mike McLean
402f319283 rename template files to .html.j2 2025-05-07 14:07:03 +02:00
Mike McLean
dee1127ce8 Initial jinja2 porting work 2025-05-07 14:07:03 +02:00
Tomas Kopecek
dbb60e91f3 PR#4385: Add unit tests for add-external-repo
Merges #4385
https://pagure.io/koji/pull-request/4385
2025-05-06 17:19:24 +02:00
Jana Librova
97b1f802e3 Add unit tests for add-external-repo 2025-05-06 15:43:01 +02:00
Tomas Kopecek
b63ef8ae3d PR#4382: deprecate pathinfo.tmpdir
Merges #4382
https://pagure.io/koji/pull-request/4382

Fixes #4384
https://pagure.io/koji/issue/4384
2025-05-06 12:50:15 +02:00
Mike McLean
666d263b65 deprecate pathinfo.tmpdir 2025-05-05 16:04:35 -04:00
Tomas Kopecek
67974ae7d8 PR#4322: Return BuildError when kickstart file is not exists
Merges #4322
https://pagure.io/koji/pull-request/4322

Fixes: #4190
https://pagure.io/koji/issue/4190
fetchKickstart could fail with better error in case of non-existent kickstart
2025-05-05 10:24:18 +02:00
Jana Librova
dd6b839330 Return BuildError when kickstart file is not exists
Fixes: https://pagure.io/koji/issue/4190
2025-05-05 10:24:10 +02:00
Mike McLean
57473d848d PR#4375: Update Cheetah3 to CT3 PyPI repository
Merges #4375
https://pagure.io/koji/pull-request/4375

Fixes: #4374
https://pagure.io/koji/issue/4374
Cheetah3 is hosted under CT3 in PyPi now
2025-04-29 17:30:00 -04:00
Tomas Kopecek
a149d9b7a9 Update Cheetah3 to CT3 PyPI repository
Project is using new repo due to 2FA changes on PyPI
https://cheetahtemplate.org/news.html#id5

Related: https://pagure.io/koji/issue/4374
2025-04-29 17:29:54 -04:00
Tomas Kopecek
be3407dcd5 PR#4349: Raise weight cap
Merges #4349
https://pagure.io/koji/pull-request/4349

Fixes #4360
https://pagure.io/koji/issue/4360
2025-04-29 16:39:15 +02:00
Tomas Kopecek
e5cee65d75 Raise weight cap
Currently weight is limited to 4.5. As they are now builder with very
different setups (number of cpus/memory) it seems to be better to raise
the limit and leave it to fill larger builders capacities.
2025-04-29 16:39:08 +02:00
Tomas Kopecek
742e5de5fa PR#4354: add-external-repo excepts comma-separated and space-separated list
Merges #4354
https://pagure.io/koji/pull-request/4354

Fixes: #4353
https://pagure.io/koji/issue/4353
CLI: add-external-repo doesn't parse archlist according to help
2025-04-29 16:37:40 +02:00
Jana Librova
b7488d1c96 add-external-repo excepts comma-separated and space-separated list
Fixes: https://pagure.io/koji/issue/4353
2025-04-29 16:37:31 +02:00
Tomas Kopecek
26198f6114 Fix flake8 and unit test 2025-04-29 16:30:33 +02:00
Adam Williamson
15d604f32e download-build: allow fallback to unsigned with --key
If you pass --key to download-build and signed packages aren't
available, Koji will skip the unsigned package, or error out.
This adds a modified behavior controlled by the new
--fallback-unsigned arg. If this is passed with --key, unsigned
copies will be downloaded for packages for which no signed copy
can be found.

This is primarily intended to work with a proposed Bodhi feature:
https://github.com/fedora-infra/bodhi/pull/5859 . That would
make Bodhi's `bodhi updates download` command automatically try
to download signed copies, but I think it would be best if it
falls back to getting unsigned copies if that doesn't work. Just
failing out entirely seems wrong for that case. Implementing the
fallback in Bodhi itself is more awkward and messy than adding it
in Koji, and it may be useful for others in Koji I guess.

Note there are two distinct 'no signed copies' cases. In the
simple one, queryRPMSigs tells us Koji has no record of the
package ever being signed with the key in question. In this case
we don't bother trying to download a signed copy. In the other
case, queryRPMSigs tells us the package *has* been signed with
the key, but it turns out that signed copy has been garbage-
collected and we can no longer download it. In this case we have
to catch the failure on the download attempt and retry the
download with sigkey set to None.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-04-29 16:25:37 +02:00
Tomas Kopecek
fd1c383909 PR#4224: Match longest extension first for archivetype
Merges #4224
https://pagure.io/koji/pull-request/4224

Fixes: #4291
https://pagure.io/koji/issue/4291
Match longest extension first for archivetype
2025-04-29 16:22:13 +02:00
Mike McLean
7be49b3a04 fix unit test 2025-04-29 16:22:07 +02:00
Mike McLean
cbfa648549 make sure extension matching is case insensitive 2025-04-29 16:22:07 +02:00
Mike McLean
1b3990cec9 simplify extension match
this avoids errors if the ext value contains special characters
2025-04-29 16:22:07 +02:00
Mike McLean
6afde19a8a match longest archivetype extension first 2025-04-29 16:22:07 +02:00
Tomas Kopecek
18fa1c3fea PR#4145: report tag_external_repos.arches in query_history
Merges #4145
https://pagure.io/koji/pull-request/4145

Fixes: #4290
https://pagure.io/koji/issue/4290
report tag_external_repos.arches in query_history
2025-04-29 16:20:48 +02:00
Mike McLean
66335f03e5 unit test 2025-04-29 16:20:41 +02:00
Mike McLean
d9d3c6238a report tag_external_repos.arches in query_history 2025-04-29 16:20:41 +02:00
Tomas Kopecek
023e5d0e46 PR#4268: ensure macros and env values passed to mock are strings
Merges #4268
https://pagure.io/koji/pull-request/4268

Fixes: #4279
https://pagure.io/koji/issue/4279
Mock can error if a non-string is placed in the config
2025-04-29 16:19:16 +02:00
Mike McLean
d9795530d7 ensure macros and env values passed to mock are strings 2025-04-29 16:19:08 +02:00
Tomas Kopecek
9e0d9612c9 PR#4259: allow setting ttl in protonmsg
Merges #4259
https://pagure.io/koji/pull-request/4259

Fixes: #4260
https://pagure.io/koji/issue/4260
rfe: set ttl in protonmsg
2025-04-29 16:17:27 +02:00
Mike McLean
026abb8311 unit test 2025-04-29 16:17:20 +02:00
Mike McLean
8a472ed94e allow setting ttl in protonmsg 2025-04-29 16:17:20 +02:00
Tomas Kopecek
fa0c558912 PR#4171: koji-gc: Add ccache to koji-gc options
Merges #4171
https://pagure.io/koji/pull-request/4171

Fixes: #4116
https://pagure.io/koji/issue/4116
koji-gc: dedicated Kerberos credential cache to avoid conflicts with root user's credential cache
2025-04-29 16:15:59 +02:00
Jana Librova
c603ff6ab6 koji-gc: Add ccache to koji-gc options
Fixes: https://pagure.io/koji/issue/4116
2025-04-29 16:15:52 +02:00
Tomas Kopecek
8ad473b6f2 PR#4287: Add new option for mock option - bootstrap_image_ready
Merges #4287
https://pagure.io/koji/pull-request/4287

Fixes: #3958
https://pagure.io/koji/issue/3958
RFE: New option for the Mock's option bootstrap_image_ready
2025-04-29 16:14:24 +02:00
Jana Librova
1c923edcc8 Add new option for mock option - bootstrap_image_ready
Fixes: https://pagure.io/koji/issue/3958
2025-04-29 16:14:16 +02:00
Tomas Kopecek
9ba4398211 PR#4123: download-logs: prefer getBuildLogs for builds
Merges #4123
https://pagure.io/koji/pull-request/4123

Fixes: #4122
https://pagure.io/koji/issue/4122
download-logs --nvr fails to get logs in many cases
2025-04-29 16:11:39 +02:00
Mike McLean
8b5b516227 fall back to task files for non-complete builds 2025-04-29 16:11:30 +02:00
Mike McLean
32a609925d download-logs: prefer getBuildLogs for builds 2025-04-29 16:11:30 +02:00
Mike McLean
f88eddb115 PR#4368: koji 1.35.3 release notes and version bump
Merges #4368
https://pagure.io/koji/pull-request/4368

Fixes: #4367
https://pagure.io/koji/issue/4367
Koji 1.35.3 release notes
2025-04-28 15:34:00 -04:00
Mike McLean
3df7de14ee include pending PRs 2025-04-28 14:00:23 -04:00
Mike McLean
b521a1740f koji 1.35.3 release notes and version bump 2025-04-28 14:00:23 -04:00
Mike McLean
b21cb0bac5 PR#4335: Honor %{_sbindir} in make install
Merges #4335
https://pagure.io/koji/pull-request/4335

Fixes: #4338
https://pagure.io/koji/issue/4338
Better handling of sbindir macro
2025-04-17 10:17:59 -04:00
Mike McLean
52cecf06c8 Use make_with_dirs macro
This effectively replaces most of https://pagure.io/koji/pull-request/4297
2025-04-17 10:13:41 -04:00