Commit graph

1117 commits

Author SHA1 Message Date
Mike McLean
1344062bdd fix typo and extend unit test to cover where it occurred 2019-11-19 12:01:14 -05:00
Mike McLean
727de7d953 support batch operation in BulkInsertProcessor 2019-11-19 12:01:14 -05:00
Tomas Kopecek
116bf7adbc rename set_record to add_record 2019-11-19 12:01:14 -05:00
Tomas Kopecek
6de0700ac8 use BulkInsertProcessor for hub mass inserts
Fixes: https://pagure.io/koji/issue/1712
2019-11-19 12:01:14 -05:00
Yu Ming Zhu
ac91dc857b policy test: ImportedTest - accept dict as build
and invalid build will raise `koji.GenericError`

fixes: #1796
2019-11-19 14:13:57 +01:00
Ken Dreyer
e800b1d5a6 hub: new addArchiveType RPC
Add a new hub method for inserting new archivetype records.

This closely matches addBType.

The purpose of this change is to make it easier to permit content
generators to import files with extensions that we have not defined in
the upstream packaged koji SQL file.
2019-11-19 09:06:47 +01:00
Ken Dreyer
68bcc06427 rm old test code
Some files in the tree had bits of code that you could run if you
executed the files directly as scripts. Now that we have unit tests and
the "fakehub" tool, we do not need this code.
2019-11-18 10:45:57 +01:00
Ken Dreyer
0589e5ca46 hub: document cg_import parameters
Document the parameters for the CGImport API call.
2019-11-18 09:42:30 +01:00
Jim Foraker
fde8aab177 hub: Fix issue with listing users and old versions of Postgres
Koji was using the array_remove() SQL function, which was not introduced
until Postgres 9.4.  RHEL 7 ships with Postgres 9.2.  This construct
was being used to ensure that the krb_principals arrays in user
dictionaries were empty if no principals were defined, instead of
having a single value of None.  Instead we use QueryProcessor's result
transformation support to remove the None entry.

Signed-off-by: Jim Foraker <foraker1@llnl.gov>
2019-11-06 13:01:25 -05:00
Jim Foraker
b1aaf531aa hub: Fix permissions in readPackageList()
The recent changes to kerberos principal handling broke proper reporting
of package ownership, due to an obvious typo.

Signed-off-by: Jim Foraker <foraker1@llnl.gov>
2019-11-04 15:05:23 -08:00
Tomas Kopecek
1a2b10ae8e More default values in example kojihub.conf
Fixes: https://pagure.io/koji/issue/1661
2019-10-31 11:24:40 +01:00
Tomas Kopecek
79a7da7c0b CGUninitBuild for cancelling CG reservations
Fixes: https://pagure.io/koji/issue/1610
2019-10-16 10:03:46 +02:00
Tomas Kopecek
86fc5cdbd3 fix log message to show package name
Fixes: https://pagure.io/koji/issue/1693
2019-10-16 09:20:51 +02:00
Yu Ming Zhu
3e124f685a fix editUser api for multiple kerberos support 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
180cf894e2 hub: [get_group_members] return field is not named as alias 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
68901dde1c hub: [getUser] support dict userInfo 2019-10-15 09:16:43 +02:00
Yuming Zhu
b2b8d5f9cc strict per item in config_files 2019-10-15 09:14:16 +02:00
Yu Ming Zhu
4c1928f377 extract read_config_files util for config parsing 2019-10-15 09:14:16 +02:00
Ken Dreyer
c01820e50d hub: new listCGs RPC
Add a new hub method for listing new content generator records.

The purpose of this change is to make it easier for administrators to
determine what content generators are present and what user accounts
have access to those.
2019-10-15 08:54:34 +02:00
Brendan Reilly
fb82f04837 Tag permission can be used for un/tagBuildBypass
Fixes: #1510
2019-10-14 10:25:39 +02:00
Brendan Reilly
fda86ce710 Added editUser api call
Fixes: #862
2019-10-14 10:14:50 +02:00
Ken Dreyer
d2a8c10efc hub: remove reference to PythonOption
With mod_python we could use Apache's PythonOption directive. That
directive does not exist with mod_wsgi and we have to use SetEnv
instead.

Remove the PythonOption directive and describe how to use SetEnv.
2019-10-14 10:05:08 +02:00
Yu Ming Zhu
5629ff59a0 doc: GssapiLocalName should be off 2019-10-10 13:04:06 +00:00
Yuming Zhu
7b60e0e7eb backwards compatibility for ProxyDNs change 2019-10-10 13:04:06 +00:00
Yuming Zhu
0c4d57d958 adding some notes in documents 2019-10-10 13:02:55 +00:00
Yuming Zhu
d662fb837d keep on using REMOTE_USER
and handover realm translation to auth_to_local rules in /etc/krb5.conf
2019-10-10 13:02:55 +00:00
Yu Ming Zhu
4a3dc40147 use GSS_NAME instead of REMOTE_USER for GSSAPI auth
jira: https://projects.engineering.redhat.com/browse/BST-475
2019-10-10 13:01:24 +00:00
Yu Ming Zhu
855ffa6b5c hub: fix condition mistake in get_user 2019-10-10 16:37:57 +02:00
Yu Ming Zhu
6179d8f9d8 hub: remove asList in queryOpts of list_user_krb_principals 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
0e411f215b hub: backward compatible for cli moshimoshi command 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
ab37e28d4d hub: add AllowedKrbRealms option and (add|remove)UserKrbPrincipal API 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
aaeb41e57b change users and krb_principal operations 2019-10-10 16:37:56 +02:00
Yuming Zhu
473bc1460b hub: [getRPMFile] add strict behavior 2019-10-10 18:18:32 +08:00
Mike McLean
a9f3afdef7 whitespace: adjust indentations 2019-10-09 08:41:15 -04:00
Mike McLean
c49660be33 hub: use joinpath instead of os.path.join 2019-10-09 08:41:15 -04:00
Tomas Kopecek
873a159e08 drop unused host.repoAddRPM call
Fixes: https://pagure.io/koji/issue/1655
2019-10-09 09:17:20 +02:00
Tomas Kopecek
b8017bfff5 docs for build.extra.source
Fixes: https://pagure.io/koji/issue/1673
2019-10-09 09:14:04 +02:00
Tomas Kopecek
ff57615460 Subselect gives better performance
Original query based on JOINs is 1000x slower in better cases. Sub-query
helps a lot here.

Fixes: https://pagure.io/koji/issue/1674
2019-10-09 09:12:47 +02:00
Tomas Kopecek
0d6d9a51a6 swapped values in message
Related: https://pagure.io/koji/issue/1090
2019-10-03 16:03:03 +02:00
Yu Ming Zhu
2e8611254c fix unavailable id column 2019-09-30 15:47:56 +02:00
Yu Ming Zhu
24afeca663 hub: [groupListRemove] raise Error when no group for tag
Fixes: https://pagure.io/koji/issue/1090
2019-09-30 15:47:45 +02:00
Pat Riehecky
f3ace6b400 hub: add missing package list check 2019-09-30 15:22:54 +02:00
Tomas Kopecek
3de3f61fbb move tag/package owners to separate table
Changing owner is triggering repo regeneration in kojira. As it is
something which doesn't have any effect on repodata, let's put it to
separate table and let kojira ignore these changes.

Fixes: https://pagure.io/koji/issue/956
2019-08-29 15:44:24 +02:00
Tomas Kopecek
bf5da96053 Fix lookup_name usage + tests
Fixes: https://pagure.io/koji/issue/1632
2019-08-28 15:46:02 +02:00
Mike McLean
da1153fc33 raise an error when adding an archive of the wrong type 2019-08-28 15:17:27 +02:00
Mike McLean
ba83f877ff correct error text 2019-08-28 15:17:27 +02:00
Mike McLean
b67de2c26e pass correct buildinfo to callbacks 2019-08-19 11:07:43 -04:00
Mike McLean
a5f2d582cc rework update of reserved builds
Fixes: https://pagure.io/koji/issue/1603
2019-08-16 17:19:57 -04:00
Mike McLean
2a00b1a7a2 fix btype lookup in list_archive_files()
Fixes: https://pagure.io/koji/issue/1507
2019-08-15 17:00:51 -04:00
Tomas Kopecek
07f0cba77a use right top limit
randint's top limit is included in range, so original value 256 can be
reached and as such hex-digit 100 is emitted enlarging the string.

Fixes: https://pagure.io/koji/issue/1611
2019-08-14 11:20:00 +02:00