Commit graph

6840 commits

Author SHA1 Message Date
Ken Dreyer
64a856f62b kojikamid: write buildrequires files as bytes
Fix a TypeError when downloading buildrequires files on Python 3.
base64.b64decode() returns bytes, so we must open the file for writing
in bytes mode, not text mode.

Add a unit test that verifies this behavior.
2022-11-09 16:50:17 -05:00
Tomas Kopecek
56cea9adc2 PR#3568: kiwi: don't bind builders's /dev
Merges #3568
https://pagure.io/koji/pull-request/3568

Fixes: #3567
https://pagure.io/koji/issue/3567
kiwi: can't build images touching /dev
2022-11-09 14:24:09 +01:00
Tomas Kopecek
5dcf480a40 allow to set it by user 2022-11-09 14:24:03 +01:00
Tomas Kopecek
655cb9797f kiwi: don't bind builders's /dev
Related: https://pagure.io/koji/issue/3567
2022-11-09 14:24:03 +01:00
Tomas Kopecek
e9b5ec215d PR#3576: kojivmd: improve topurl example and error handling
Merges #3576
https://pagure.io/koji/pull-request/3576
2022-11-09 09:40:39 +01:00
Ken Dreyer
e0682ac810 kojivmd: update example topurl
The usual name for this location is "kojifiles", not "kojiroot". Update
the example configuration to match what users will normally expect.
2022-11-08 17:23:02 -05:00
Ken Dreyer
bf6a52c936 kojivmd: check for HTTP errors in getFile()
kojivmd proxies files from Koji's topurl through the getFile() RPC.
In some cases (misconfigurations), kojivmd can fail to download files
from topurl.

Prior to this change, if kojivmd failed to download a file (for example,
a 404 error), it would silently cache the 404 error HTTP body contents
and pass those on to verifyChecksum(). As a result, kojivmd would verify
the checksum of an HTML error page, rather than checksuming the intended
Koji archive file. In this scenario, it's difficult for administrators
to diagnose why checksums are not matching.

Check the HTTP response for errors before doing anything with the
response contents. With this change, winbuild tasks will fail with an
easier-to-understand "HTTP 404 not found" HTTPError, rather than a Koji
BuildError about checksums.
2022-11-08 17:12:03 -05:00
Tomas Kopecek
fdfe308284 PR#3569: Add absolute to clean sessions in koji-sweep-db
Merges #3569
https://pagure.io/koji/pull-request/3569

Fixes: #3571
https://pagure.io/koji/issue/3571
Absolute session

Fixes: #3394
https://pagure.io/koji/issue/3394
Renewal timeout
2022-11-08 13:26:50 +01:00
Jana Cupova
5836307056 Add absolute to clean sessions in koji-sweep-db
Fixes: https://pagure.io/koji/issue/3571
2022-11-08 13:26:43 +01:00
Tomas Kopecek
a848025fd5 PR#3509: Enable fetching any ref from git repo
Merges #3509
https://pagure.io/koji/pull-request/3509

Fixes: #3508
https://pagure.io/koji/issue/3508
Enable fetching any ref from git repo
2022-11-08 12:26:17 +01:00
Tomas Kopecek
58fb7c7ee6 fix tests 2022-11-08 12:25:10 +01:00
Tomas Kopecek
4cf59602f1 exception in case origin/ is part of ref 2022-11-08 12:15:57 +01:00
Tomas Kopecek
ab9d15b33d Enable fetching any ref from git repo
Related: https://pagure.io/koji/issue/3508
2022-11-08 12:15:57 +01:00
Tomas Kopecek
e84a0fb9fe PR#3563: Rewrite Query DB to Processors in auth.py
Merges #3563
https://pagure.io/koji/pull-request/3563

Fixes: #3559
https://pagure.io/koji/issue/3559
Rewrite QUERY db to processors in auth.py
2022-11-08 12:11:41 +01:00
Jana Cupova
40de4f3df0 Rewrite Query DB to Processors in auth.py
Fixes: https://pagure.io/koji/issue/3559
2022-11-08 12:11:34 +01:00
Tomas Kopecek
42795f1d10 fix tests 2022-11-07 14:37:44 +01:00
Tomas Kopecek
143b5ecf3f PR#3542: cli: fix nvr sorting in list-builds
Merges #3542
https://pagure.io/koji/pull-request/3542

Fixes: #3416
https://pagure.io/koji/issue/3416
[koji list-builds] the output NVR should be sorted by version instead by string
2022-11-07 14:34:12 +01:00
Tomas Kopecek
be554fef99 cli: drop nvr sorting from list-builds
We've never prperly supported this option as it would need rpm compare
algorithm and there is also no other place in koji where we compare
NVRs. More sense makes to order builds by id (age) by default.

Related: https://pagure.io/koji/issue/3416
2022-11-07 14:34:05 +01:00
Tomas Kopecek
59f677321d PR#3573: koji-gc: fix check for type cc_addr, bcc_addr
Merges #3573
https://pagure.io/koji/pull-request/3573

Fixes: #3572
https://pagure.io/koji/issue/3572
koji-gc: wrong check for type bcc_addr and cc_addr
2022-11-07 11:36:01 +01:00
Jana Cupova
26f2a4d889 koji-gc: fix check for type cc_addr, bcc_addr
Fixes: https://pagure.io/koji/issue/3572
2022-11-07 11:35:54 +01:00
Tomas Kopecek
5de53dbd97 PR#3531: Error on list-tagged --sigs --paths without mount
Merges #3531
https://pagure.io/koji/pull-request/3531

Fixes: #934
https://pagure.io/koji/issue/934
no output by`list-tagged --sigs --paths`
2022-11-07 10:00:49 +01:00
Tomas Kopecek
08809355fa Error on list-tagged --sigs --paths without mount
Related: https://pagure.io/koji/issue/934
2022-11-07 09:59:06 +01:00
Tomas Kopecek
69b0bad6e5 PR#3557: Log when session ID, session key and hostip is not related
Merges #3557
https://pagure.io/koji/pull-request/3557

Fixes: #3395
https://pagure.io/koji/issue/3395
Session ID Guessing and Brute Force Detection
2022-11-04 15:52:06 +01:00
Jana Cupova
fea12ba5a4 Log when session ID, session key and hostip is not related
Fixes: https://pagure.io/koji/issue/3395
2022-11-04 15:51:58 +01:00
Tomas Kopecek
25854a4e43 PR#3558: kiwi: propagate --type option
Merges #3558
https://pagure.io/koji/pull-request/3558

Fixes: #3556
https://pagure.io/koji/issue/3556
kiwi: add --type option
2022-11-04 13:58:28 +01:00
Tomas Kopecek
066e7427ef fix additional commas 2022-11-04 13:58:16 +01:00
Tomas Kopecek
6083bace39 kiwi: propagate --type option
Related: https://pagure.io/koji/issue/3556
2022-11-04 13:58:16 +01:00
Tomas Kopecek
125361326a PR#3489: Rewrite DB query to Procesors
Merges #3489
https://pagure.io/koji/pull-request/3489

Fixes: #3511
https://pagure.io/koji/issue/3511
Rewrite DB query to Procesors

Fixes: #3493
https://pagure.io/koji/issue/3493
Query Select with 'FOR UPDATE'
2022-11-04 12:37:10 +01:00
Tomas Kopecek
31dbf67960 readability fixes 2022-11-04 12:37:00 +01:00
Jana Cupova
d0415c57b3 Fixes 2022-11-04 12:37:00 +01:00
Tomas Kopecek
eab63494d0 Fix few typos, reordering according to defintion 2022-11-04 12:37:00 +01:00
Jana Cupova
b9166945f5 Rewrite DB query to Procesors
Fixes: https://pagure.io/koji/issue/3511
Fixes: https://pagure.io/koji/issue/3493
2022-11-04 12:37:00 +01:00
Tomas Kopecek
2f3e35257f PR#3550: Allow buildTagID and destTagID as string and dict in getBuildTargets
Merges #3550
https://pagure.io/koji/pull-request/3550

Fixes: #3549
https://pagure.io/koji/issue/3549
hub getBuildTargets fails when buildTagID and destTagID is not int
2022-11-02 14:22:45 +01:00
Jana Cupova
3a2894f0f1 Allow buildTagID and destTagID as string and dict in getBuildTargets
Fixes: https://pagure.io/koji/issue/3549
2022-11-02 14:22:37 +01:00
Tomas Kopecek
d10bb2ce85 PR#3476: Remove login shell from kojibuilder user
Merges #3476
https://pagure.io/koji/pull-request/3476

Fixes: #3475
https://pagure.io/koji/issue/3475
Is login shell needed for kojibuilder?
2022-11-02 14:21:53 +01:00
Tomas Kopecek
910546f4af Remove login shell from kojibuilder user
Related: https://pagure.io/koji/issue/3475
2022-11-02 14:21:46 +01:00
Tomas Kopecek
99506e4c2c PR#3566: Fix koji-sweep-db
Merges #3566
https://pagure.io/koji/pull-request/3566

Fixes: #3466
https://pagure.io/koji/issue/3466
Move Query/Update/Insert/..../Processors from kojihub.py to koji/db.py
2022-11-02 13:35:59 +01:00
Jana Cupova
1909602687 Fix koji-sweep-db
Fixes: https://pagure.io/koji/issue/3466
2022-11-02 13:35:52 +01:00
Tomas Kopecek
59df6e95e6 PR#3546: Increase list-tag-inheritance unit tests
Merges #3546
https://pagure.io/koji/pull-request/3546

Fixes: #3545
https://pagure.io/koji/issue/3545
Increase list-tag-inheritance unit tests
2022-10-31 13:58:11 +01:00
Jana Cupova
590ede88c7 Increase list-tag-inheritance unit tests
Fixes : https://pagure.io/koji/issue/3545
2022-10-31 13:57:43 +01:00
Tomas Kopecek
c414f998d2 PR#3552: Add regex --filter and --skip option for download-task
Merges #3552
https://pagure.io/koji/pull-request/3552

Fixes: #3551
https://pagure.io/koji/issue/3551
brew download-task filter by string
2022-10-31 13:51:12 +01:00
Jana Cupova
4527c054c6 Add regex --filter and --skip option for download-task
Fixes: https://pagure.io/koji/issue/3551
2022-10-31 13:51:07 +01:00
Tomas Kopecek
ad0f49e87f PR#3541: kojid: fix restartHosts on py 3.5+
Merges #3541
https://pagure.io/koji/pull-request/3541

Fixes: #3442
https://pagure.io/koji/issue/3442
restart task doesn't work for builder handling parent task
2022-10-31 11:58:43 +01:00
Tomas Kopecek
22b781ad58 kojid: fix restartHosts on py 3.5+
Related: https://pagure.io/koji/issue/3442
2022-10-31 11:58:37 +01:00
Tomas Kopecek
1c4f078a08 PR#3565: kojira: fix docs
Merges #3565
https://pagure.io/koji/pull-request/3565

Fixes: #3564
https://pagure.io/koji/issue/3564
kojira.conf 'ignore_tags' doc does not match code
2022-10-31 10:03:36 +01:00
Tomas Kopecek
4a862703b4 kojira: fix docs
Related: https://pagure.io/koji/issue/3564
2022-10-31 10:02:05 +01:00
Tomas Kopecek
81231068a9 PR#3417: save source for wrapperRPM
Merges #3417
https://pagure.io/koji/pull-request/3417

Fixes: #3409
https://pagure.io/koji/issue/3409
RFE: Add 'extra' info for wrapperRPM build type
2022-10-31 09:34:28 +01:00
Tomas Kopecek
d774a8fbdf drop custom_user_metadata propagation 2022-10-31 09:34:22 +01:00
Tomas Kopecek
9ad7934cb9 save source for wrapperRPM
Related: https://pagure.io/koji/issue/3409
2022-10-31 09:34:22 +01:00
Tomas Kopecek
a55467a90a PR#3533: CLI list-hosts fix when list of channels is empty
Merges #3533
https://pagure.io/koji/pull-request/3533

Fixes: #3532
https://pagure.io/koji/issue/3532
CLI list-hosts fails when list of channels is empty
2022-10-26 14:17:56 +02:00