Commit graph

5112 commits

Author SHA1 Message Date
Tomas Kopecek
4864df3442 PR#2040: koji.ClientSession: fix erroneous conversion to latin-1
Merges #2040
https://pagure.io/koji/pull-request/2040

Fixes #2093
https://pagure.io/koji/issue/2093
2020-03-25 09:54:19 +01:00
Owen W. Taylor
3227462528 koji.ClientSession: fix erroneous conversion to latin-1
For Python 3, we need to always encode what we are sending to the server as
utf-8; encoding strings that have only latin-1 as latin-1 causes us to
send something that the server can't parse. (When no encoding is specified
xmlclient.client.dumps creates an XML document with an xml declaration
for UTF-8.)
2020-03-25 09:54:11 +01:00
Tomas Kopecek
19ae3b55c0 PR#2089: propagate event to get_tag_extra
Merges #2089
https://pagure.io/koji/pull-request/2089

Fixes: #2087
https://pagure.io/koji/issue/2087
event param not propagated to get_tag_extra
2020-03-25 09:19:24 +01:00
Mike McLean
0d79e839ba propagate event to get_tag_extra
fixes https://pagure.io/koji/issue/2087
2020-03-25 09:19:18 +01:00
Tomas Kopecek
6caa66f06d PR#2047: limit size of extra field in proton msgs
Merges #2047
https://pagure.io/koji/pull-request/2047

Fixes: #2017
https://pagure.io/koji/issue/2017
protonmsg should send only basic info
2020-03-25 09:07:22 +01:00
Tomas Kopecek
52236bab4b use buildinfo copy 2020-03-25 09:07:15 +01:00
Tomas Kopecek
d1e055f1b2 limit size of extra field in proton msgs
Fixes: https://pagure.io/koji/issue/2017
2020-03-25 09:07:15 +01:00
Tomas Kopecek
336c3ba5be PR#2019: log --force usage by admins
Merges #2019
https://pagure.io/koji/pull-request/2019

Fixes: #1930
https://pagure.io/koji/issue/1930
Log when policy is overridden due to --force
2020-03-24 10:57:37 +01:00
Tomas Kopecek
1638fc6d0f fix logging package name 2020-03-24 10:57:29 +01:00
Tomas Kopecek
ccb7a15010 log --force usage by admins
Log everything related to package listing and build tagging done by
admin users via --force flag.

Fixes: https://pagure.io/koji/issue/1930
2020-03-24 10:57:29 +01:00
Tomas Kopecek
2bde581c6a PR#2083: allow to skip SRPM rebuild for scratch builds
Merges #2083
https://pagure.io/koji/pull-request/2083

Fixes: #1719
https://pagure.io/koji/issue/1719
Add rebuild_srpm option of BuildTask
2020-03-23 14:43:13 +01:00
Tomas Kopecek
718321298e allow to skip SRPM rebuild for scratch builds
Fixes: https://pagure.io/koji/issue/1719
2020-03-19 15:40:55 +01:00
Tomas Kopecek
08236dd8b4 PR#2068: use real time for events
Merges #2068
https://pagure.io/koji/pull-request/2068

Fixes: #1747
https://pagure.io/koji/issue/1747
get_event creates "not best" events
2020-03-19 14:31:56 +01:00
Tomas Kopecek
b54c32af1a use real time for events
NOW() is time of transaction start. For long transaction, there could be
race and some other transactions which ended earlier can have newer
events. clock_timestamp returns real time (changes during transaction),
so it should be better for this case.

Fixes: https://pagure.io/koji/issue/1747
2020-03-19 14:30:24 +01:00
Tomas Kopecek
8172bff053 PR#2078: Adapt older win-build docs
Merges #2078
https://pagure.io/koji/pull-request/2078

Fixes: #1836
https://pagure.io/koji/issue/1836
Document windows builds
2020-03-16 14:44:39 +01:00
Mike McLean
76c3df7650 include example spec 2020-03-16 14:44:34 +01:00
Mike McLean
250b4a80da Adapt older win-build docs
Fixes https://pagure.io/koji/issue/1836
2020-03-16 14:44:34 +01:00
Tomas Kopecek
d7fc15bc5f PR#2075: Don't use datetime timestamp() as it's not in Python 2
Merges #2075
https://pagure.io/koji/pull-request/2075

Fixes #2075
https://pagure.io/koji/issue/2076
2020-03-16 10:46:54 +01:00
Adam Williamson
9b86c5081e Don't use datetime timestamp() as it's not in Python 2
The `timestamp()` method for `datetime.datetime` instances was
only added in Python 3. It does not exist in Python 2. So we
can't safely use it here.

I believe this should do the right thing, taking advantage of a
couple of existing utility functions in koji.util.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-03-16 10:46:47 +01:00
Tomas Kopecek
8c9558ae53 PR#2028: make xz options configurable
Merges #2028
https://pagure.io/koji/pull-request/2028

Fixes: #1901
https://pagure.io/koji/issue/1901
 builder/kojid: revert using only 2 processors for xz compression and lower preset to 6
2020-03-16 10:30:23 +01:00
Tomas Kopecek
f505d6bb1a make xz options configurable
Fixes: https://pagure.io/koji/issue/1901
2020-03-16 10:30:16 +01:00
Tomas Kopecek
d9db047883 PR#2079: prune old docs about interaction with Fedora's koji
Merges #2079
https://pagure.io/koji/pull-request/2079

Fixes: #2062
https://pagure.io/koji/issue/2062
remove references to fedora-packager-setup and SSL auth for koji.fedoraproject.org
2020-03-16 09:37:36 +01:00
Tomas Kopecek
77edc71aac prune old docs about interaction with Fedora's koji
Fixes: https://pagure.io/koji/issue/2062
2020-03-12 12:36:07 +01:00
Tomas Kopecek
33c307cbc2 PR#2030: raise error on non-existing tag
Merges #2030
https://pagure.io/koji/pull-request/2030

Fixes: #1101
https://pagure.io/koji/issue/1101
checkTagAccess API call should raise GenericError exception for non existing tag
2020-03-11 13:54:08 +01:00
Tomas Kopecek
55307406d3 raise error on non-existing tag
Fixes: https://pagure.io/koji/issue/1101
2020-03-11 13:53:59 +01:00
Tomas Kopecek
f950bbda12 PR#1749: rpm: remove references to EOL fedora versions
Merges #1749
https://pagure.io/koji/pull-request/1749

Fixes #1900
https://pagure.io/koji/issue/1900
2020-03-11 13:35:14 +01:00
Ken Dreyer
f8d18ab04a rpm: remove references to EOL fedora versions
Remove the references to old, EOL versions of Fedora.
2020-03-11 13:35:06 +01:00
Tomas Kopecek
1dd5e665f5 PR#1194: client: use default CA store during SSL auth if serverca is unset
Merges #1194
https://pagure.io/koji/pull-request/1194

Fixes #1568
https://pagure.io/koji/issue/1568
2020-03-11 13:33:46 +01:00
Ken Dreyer
19dabc0eda client: use default CA store during client auth if serverca is unset
Prior to this change, if the following conditions were true:

1) A Koji client uses SSL authentication,
2) The user does not set the "serverca" option for their profile,
3) The user does not have a "~/.koji/serverca.crt" file present,

Then Koji did not use the default CA store to validate the hub's CA.
read_defaults() was setting the "serverca" value to an empty string ""
in these cases. This led to an AuthError in ssl_login() for the empty
string:

  raise AuthError("Server CA %s doesn't exist or is not accessible" % serverca)

Update ssl_login() to ignore empty strings in this case, treating them
the same as None.

The code in _sendOneCall() already checks this value in a similar way,
with "if verify:", so we're matching that behavior here.

With this change, Koji clients will fall back to using the default CA
store.
2020-03-11 13:33:39 +01:00
Tomas Kopecek
714d2b25cd PR#2073: trivial flake8 warning fix
Merges #2073
https://pagure.io/koji/pull-request/2073
2020-03-10 12:20:51 +01:00
Tomas Kopecek
9207a8e2af trivial flake8 warning fix 2020-03-10 12:19:45 +01:00
Tomas Kopecek
3bd42f123a PR#2048: use only gssapi_login in CLI
Merges #2048
https://pagure.io/koji/pull-request/2048

Fixes: #1906
https://pagure.io/koji/issue/1906
Deprecate/drop non-gssapi code
2020-03-09 15:13:42 +01:00
Tomas Kopecek
bb9c72092b use only gssapi_login in CLI
Fixes: https://pagure.io/koji/issue/1906
2020-03-09 15:13:36 +01:00
Tomas Kopecek
5b09f4de5f PR#2016: Add detail about known koji signatures to buildinfo
Merges #2016
https://pagure.io/koji/pull-request/2016

Fixes: #1980
https://pagure.io/koji/issue/1980
Koji buildinfo NVR should report any stored signatures
2020-03-09 15:11:46 +01:00
Tomas Kopecek
f05427e89d Add detail about known koji signatures to buildinfo
Fixes: https://pagure.io/koji/issue/1980
2020-03-09 15:11:41 +01:00
Tomas Kopecek
2678617444 PR#2027: raise GenericError instead of TypeError in filterResults
Merges #2027
https://pagure.io/koji/pull-request/2027

Fixes: #1421
https://pagure.io/koji/issue/1421
API filterResults returns Fault for API call which not returns list and non exist API call
2020-03-09 11:35:22 +01:00
Tomas Kopecek
1f391a7edc raise GenericError on non-existing API call
count, filterResults and countAndFilterResults now raises GenericError
if unknown API call is made

Fixes: https://pagure.io/koji/issue/1421
2020-03-05 16:27:32 +01:00
Tomas Kopecek
1919ce80de raise GenericError instead of TypeError in filterResults
Fixes: https://pagure.io/koji/issue/1421
2020-03-05 16:23:02 +01:00
Tomas Kopecek
ebbe59a48c PR#2009: CG: add and update buildinfo.extra.typeinfo if it doesn't exist
Merges #2009
https://pagure.io/koji/pull-request/2009

Fixes: #2008
https://pagure.io/koji/issue/2008
CG: when build.extra.typeinfo doesn't exist, legacy build.extra.(image|win|maven) isn't copied to typeinfo
2020-03-05 15:18:01 +01:00
Yu Ming Zhu
853953b625 CG: add and update buildinfo.extra.typeinfo if it doesn't exist
fixes: #2008
2020-03-05 15:17:54 +01:00
Tomas Kopecek
694b5ce565 PR#2032: 1.20.1 release notes
Merges #2032
https://pagure.io/koji/pull-request/2032

Fixes: #2031
https://pagure.io/koji/issue/2031
1.20.1 release notes
2020-03-05 14:05:19 +01:00
Tomas Kopecek
2cf1373afb update for last fix 2020-03-05 14:02:47 +01:00
Tomas Kopecek
f59257ef13 fix typo 2020-03-05 14:02:47 +01:00
Tomas Kopecek
e4fa53f8ea 1.20.1 release notes
Fixes: https://pagure.io/koji/issue/2031
2020-03-05 14:02:47 +01:00
Tomas Kopecek
86827f7bb3 PR#2060: build_references: fix the type of event_id used by max
Merges #2060
https://pagure.io/koji/pull-request/2060

Fixes: #1961
https://pagure.io/koji/issue/1961
SQL effectivity for build_references
2020-03-05 13:50:48 +01:00
Yuming Zhu
fa613108a5 build_references: fix the type of event_id used by max
fixes: #1961
2020-03-04 16:58:29 +08:00
Mike McLean
25fb4e673c PR#2049: extending flake8 rules
Merges #2049
https://pagure.io/koji/pull-request/2049

Fixes: #2050
https://pagure.io/koji/issue/2050
extending flake8 rules
2020-03-03 18:00:12 -05:00
Yuming Zhu
20ee6081e0 flake8: apply rules for koji-sidetag-cleanup 2020-03-03 21:38:22 +08:00
Yuming Zhu
d21083a11b still use BaseException for logging purpose 2020-03-03 21:38:22 +08:00
Yuming Zhu
cf34706f04 use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00