Commit graph

1346 commits

Author SHA1 Message Date
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
d3ef00fff4 Dist-repo with write-signed-rpm option
Fixes: https://pagure.io/koji/issue/2806
2021-10-18 13:00:11 +02:00
Jana Cupova
46411b25a3 queryRPMSigs accepts RPM ID, NVRA and dict
Fixes: https://pagure.io/koji/issue/3061
2021-10-13 14:48:51 +02:00
Tomas Kopecek
0badee262f listBuilds/list-builds filtering via CG
Fixes: https://pagure.io/koji/issue/1401
2021-10-05 12:28:03 +02:00
Tomas Kopecek
b382032d10 hub: speedup untagged_builds query
Fixes: https://pagure.io/koji/issue/1636
2021-10-05 11:09:47 +02:00
Jana Cupova
7096bddc4f More repos in the get_external_repo returns and error
Fixes: https://pagure.io/koji/issue/3033
2021-10-05 11:05:58 +02:00
Yu Ming Zhu
f1dc214b40 update docstring 2021-09-29 10:34:10 +02:00
Yu Ming Zhu
f8464a1f32 allow Falsy values too 2021-09-29 10:34:10 +02:00
Yu Ming Zhu
af0c487a85 hub: [API:getFullInheritance] be tolerant of stops/jumps kwargs with None values 2021-09-29 10:34:10 +02:00
Yu Ming Zhu
459c8cd3c2 [policy] [SourceTest] check spec_url for wrapperRPM task
fixes: #3046
2021-09-29 09:18:50 +02:00
Tomas Kopecek
1ea4d39249 better error messages for Task.lock()
Related: https://pagure.io/koji/issue/2834
2021-09-23 14:55:19 +02:00
Jana Čupová
ff4e518fd8 Tasks respect disabled channels
Fixed: https://pagure.io/koji/issue/3006
2021-09-23 08:47:19 +02:00
Tomas Kopecek
b958c8e3dc hub: deprecate taskReport
Fixes: https://pagure.io/koji/issue/3031
2021-09-23 08:44:46 +02:00
Tomas Kopecek
1b1d5d15b6 fix query logic 2021-09-21 12:56:58 +02:00
Tomas Kopecek
72108bc029 getTag returns query_event 2021-09-21 12:56:58 +02:00
Tomas Kopecek
3cfedc9fd3 query inheritance from last known tag appearance 2021-09-21 12:56:58 +02:00
Tomas Kopecek
c3b95e84af fix getting tag from buildroot 2021-09-21 12:56:58 +02:00
Tomas Kopecek
6ff606b5f8 honour taginfo option in policy_get_build_tags
Related: https://pagure.io/koji/issue/2917
2021-09-21 12:56:58 +02:00
Jana Cupova
b042786c72 Drop SELECT for check existing signatures for package from add-rpm-sig
Fixes: https://pagure.io/koji/issue/2992
2021-09-20 11:39:00 +02:00
Patrick Uiterwijk
af25fc2e24 Support packages that are head-signed
This supports packages which do not have the RPMv3 signature scheme
(over the full RPM header+payload), but instead only have signatures
over the header (v4 scheme).
For the v4 scheme, the signature is only stored in SIGTAG_RSA (or
SIGTAG_DSA).

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2021-09-15 12:43:06 +02:00
Ken Dreyer
f6aeec9265 add warnings for remove-sig
Update all references to remove-sig to explain that admins should not
normally run this.
2021-09-10 11:13:39 -04:00
Ken Dreyer
fdc3f8561a hub: fix docs for listBuilds "state" parameter name
The listBuilds method takes a parameter named "state", not "stage".
Update the docstring to reflect this.
2021-09-08 15:34:58 -04:00
Jana Cupova
e48d813433 Add all types to docs latest-build and readTaggedBuilds
Fixes: https://pagure.io/koji/issue/2953
2021-09-08 17:17:23 +02:00
Ken Dreyer
b4eeac10ea hub: fix getBuild documented parameter name
The getBuild method takes a parameter named buildInfo, not buildID.
Update the docstring to reflect this.
2021-09-07 17:31:51 -04:00
Ken Dreyer
acf7f7d2eb hub: document listHosts method
Update the listHosts RPC docstring to describe all parameters and
the return value.
2021-09-02 15:56:23 -04:00
Tomas Kopecek
8003f66957 create symlink before import
Fixes: https://pagure.io/koji/issue/3003
2021-08-30 11:09:35 +02:00
Ken Dreyer
0adec2fd38 fix "an user" -> "a user" grammar in help text and errors 2021-08-24 10:54:03 -04:00
Yu Ming Zhu
cdbebd963d [hub] add non-host evalPolicy API 2021-08-16 17:55:26 +00:00
Yu Ming Zhu
601cd33902 use scm_ as the prefix instead of scm for scminfo 2021-08-16 17:55:26 +00:00
Yu Ming Zhu
47c4b5d70b kojid: extend SCM.assert_allowed with hub policy
This is a simple extention of `SCM.assert_allowed`

- `assert_allowed_by_policy` will set the default "use_common" to False which is different to the old behavior
- `channel`, `user_id`, `scratch` are passed in the `policy_data` with scminfo right now.

This is a prototype for this change, and there are some other solutions could be implemented too

- Use a scmpolicy plugin as `postSCMCheckout` callback, the pro is that we can do more checks after the source is initialized on builder, meanwhile, the con is that the source will be downloaded even it is denied by policy. It might be a potential risk?
- Do the scm check in hub's `make_task`, this looks straightforward, but may lack some builder's information

fixes: #2757
2021-08-16 17:55:26 +00:00
Tomas Kopecek
cdaa178a01 updates 2021-08-12 10:59:28 +02:00
Tomas Kopecek
61ea78cff9 get_tag and accepts "auto" event
If "auto" is passed as an event value, latest record will be returned
without checking "active" status.

"revoke_event" will be then added to returned taginfo. If it is None,
    then it is active record, otherwise it will contain event id.

Fixes: https://pagure.io/koji/issue/1506
2021-08-12 10:59:28 +02:00
Tomas Kopecek
dfce69f6bf PR#2958: DBConnectionString/dsn option for db connection
Merges #2958
https://pagure.io/koji/pull-request/2958

Fixes: #2838
https://pagure.io/koji/issue/2838
Option for using SSL is missing, when the pgsql server is an network one.
2021-08-06 09:57:05 +02:00
Ken Dreyer
fb18dcf2f6 hub: document readTaggedRPMS method
Update the readTaggedRPMS RPC docstring to describe all parameters and
the return value.
2021-08-03 15:27:10 -04:00
Tomas Kopecek
1bb6e7456f recreating absolute path bug 2021-07-21 13:48:15 +02:00
Jana Cupova
fb8cfc5678 Add delete-rpm-sig CLI and deleteRPMSig hub call
Fixes: https://pagure.io/koji/issue/2665
2021-07-21 13:43:09 +02:00
Tomas Kopecek
44c89e3516 DBConnectionString/dsn option for db connection
Alternative DSN connection string fro connecting to postgres. Allow us
to specify e.g. sslmode without adding separate DB* options.

Fixes: https://pagure.io/koji/issue/2838
2021-07-20 11:49:06 +02:00
Jana Cupova
e689602be5 Add btype to protonmsg
Fixes: https://pagure.io/koji/issue/1217
2021-07-20 10:36:53 +02:00
Jana Cupova
bc2a51350d Enable/disable channel
Fixes: https://pagure.io/koji/issue/1851
2021-07-20 10:33:50 +02:00
Jana Cupova
42b985ef22 add_rpm_sign catches IntegrityError
fixes: https://pagure.io/koji/issue/2835
2021-06-29 14:47:22 +02:00
Jana Cupova
aec9fba121 Add CLI related to channels + add comments to channels
Fixes: https://pagure.io/koji/issue/1711
Fixes: https://pagure.io/koji/issue/1849
2021-06-29 14:44:47 +02:00
Yuming Zhu
a4152dc96f [kojixmlrpc] clean noisy error log
fixes: #2929
2021-06-28 15:17:12 +08:00
Yu Ming Zhu
bf3ee393ce [policy] use "name" in result of lookup_name for CGs
fixes: #2915
2021-06-22 11:54:16 +02:00
Jana Cupova
12481d43d3 listBuilds returns empty list, not error when not existing
Fixes: https://pagure.io/koji/issue/1209
2021-06-22 11:53:43 +02:00
Joe Talbott
b1d5e5d3b5 kojihub - Use parse_task_params rather than manual task parsing.
Fixes: https://pagure.io/koji/issue/2875
2021-06-21 13:54:33 +02:00
Tomas Kopecek
fe3e7491a5 hub: replace with py3 exception
Fixes: https://pagure.io/koji/issue/2848
2021-06-08 16:07:39 +02:00
Jana Cupova
c4a2f01184 listBuilds accept also package name and user name
Fixes: https://pagure.io/koji/issue/1209
2021-06-08 16:01:42 +02:00
Jana Cupova
d45158ae97 Remove jump/stops options from readFullInheritance
Fixes: https://pagure.io/koji/issue/2656
2021-06-08 15:52:05 +02:00
Tomas Kopecek
b2438c47ed hub: fix SQL condition
Fixes: https://pagure.io/koji/issue/2897
2021-06-03 16:09:29 +02:00
Jana Cupova
1cf849f891 Remove deprecated readGlobalInheritance
Fixes: https://pagure.io/koji/issue/2871
2021-06-02 11:48:50 +02:00