Commit graph

262 commits

Author SHA1 Message Date
Mike McLean
d31e774a1c Merge remote-tracking branch 'origin/master' into cgen 2015-09-21 15:43:01 -04:00
Ralph Bean
6a075b05f2 Remove koji._forceAscii.
It isn't used anywhere else in the source and its presence is confusing.

(We're supposed to use koji.fixEncoding(..) now, right?)
2015-09-17 15:38:35 -04:00
Mike Bonnet
42647193fb Resolve the canonical hostname when constructing the Kerberos server principal
Kerberos authentication will fail if the server principal uses a CNAME.  Resolving
the hostname in the server URL to the canonical hostname associated with the IP
address allows authentication to succeed.
2015-09-17 15:38:35 -04:00
Ralph Bean
9103bda257 Be more careful when detect cert-expiry exceptions.
We ran into this in the Fedora koji instance today after an upgrade last night.
The inline comments explain the reasoning
2015-08-18 15:45:35 -04:00
Mike McLean
94d95cbd84 correct error message in fastUpload 2015-08-05 15:53:49 -04:00
Mathieu Bridon
ab0b2e465d Better catch SSL errors
Commit 4de27c52de made Koji to not retry
on SSL errors.

However, it turns out that some SSL errors are transient, and Koji
should still retry for them.

This commit changes that, so that we are more specific about which SSL
errors should be fatal: expired or revoked certificates.

https://bugzilla.redhat.com/show_bug.cgi?id=1207178
2015-07-24 14:16:11 -05:00
Mathieu Bridon
4de27c52de Don't retry on SSL failures
With the current code, trying to SSL-login with a bad certificate will
just make it look like the client code is hanging.

That's because it tries and tries again, silently, until it reaches it's
maximum retry limit.

But in the case of an SSL error, such as an expired client cert, there's
really no point in retrying.
2015-07-10 12:51:08 -05:00
Mike McLean
a0285163b5 honor tag['extra']['mock.package_manager'] 2015-06-24 09:46:15 -04:00
Mike McLean
e8a30591fa Merge remote-tracking branch 'origin' into cgen 2015-06-18 14:26:18 -04:00
Mike McLean
554a244876 Avoid errors logging anonymous retries (ticket 317)
see: https://fedorahosted.org/koji/ticket/317
2015-06-06 17:39:01 -04:00
Mike McLean
f68099f584 fix more #pylint issues 2015-06-06 17:38:52 -04:00
Pavol Babincak
9e89ebb9a4 Ran reindent.py from cpython tools on all python scripts
Citing from reindent docs:

    Change Python (.py) files to use 4-space indents and no hard tab
    characters. Also trim excess spaces and tabs from ends of lines, and
    remove empty lines at the end of files.  Also ensure the last line
    ends with a newline.

Citing from PEP 8:

    Use 4 spaces per indentation level.

    Python 2 code indented with a mixture of tabs and spaces should be
    converted to using spaces exclusively.

    Don't write string literals that rely on significant trailing
    whitespace. Such trailing whitespace is visually indistinguishable
    and some editors (or more recently, reindent.py) will trim them.

Also PyLint recommends not to have trailing whitespace on any line.
2015-05-13 16:39:53 -04:00
Mike Bonnet
381645a453 mergeScratch(): import rpms from a scratch build into an existing build
The mergeScratch() method allows importing rpms built by a scratch build into an existing build, if that build
did not produce rpms matching the arch of the scratch build.  This is useful for bootstrapping a new arch into
existing builds, and avoiding a mass-rebuild to add arch support.
2015-05-04 12:38:11 -04:00
Mike McLean
91bae287e0 handle callnum=None (anon_retry) in retry error messages 2015-05-04 12:15:20 -04:00
Mike McLean
e1f928af6b cg br schema pass 1 2015-04-09 15:29:16 -04:00
Pavol Babincak
a80ab75b32 Make koji.plugin.export_in() decorator working
Python raised problem with local variable before:

    UnboundLocalError: local variable 'alias' referenced before
    assignment
2015-04-02 15:56:54 -04:00
Mike McLean
8d3166f13f Support conf.d in kojihub and kojiweb 2015-02-04 05:33:34 -05:00
Dennis Gilmore
5b5b7d95ea ssl: use the best possible connection method.
tell pyOpenSSL to use the best possible connection method,
disable SSLv2 and SSLv3

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-01-23 16:11:22 -06:00
Ralph Bean
2ce5ac7d39 Add new {pre,post}RPMSign plugin callbacks.
I'd like to use these in Fedora Infrastructure for the fedmsg plugin so
we can see when rawhide rpms get signed by sigul.
2014-12-12 16:23:52 -05:00
Mike Bonnet
631f8cc254 use os.lchown() so dangling symlinks don't cause errors 2014-10-28 23:54:21 -04:00
Mike Bonnet
ab53d2deb0 update copyright 2014-10-28 23:54:21 -04:00
Mike Bonnet
7a6544a53d fix a few errors revealed by pylint 2014-10-28 23:54:21 -04:00
Mike Bonnet
1e8b7211ee add --ini and --section options to maven-build and wrapper-rpm
Support use of a .ini file to pass parameters to maven-build and wrapper-rpm.
2014-10-28 23:54:20 -04:00
Mike Bonnet
d60bf0529e move maven-chain parsing into util so it can be used by other utilities 2014-10-28 23:54:20 -04:00
Mike McLean
61ed1260d3 log failed queries 2014-10-22 15:00:44 -04:00
Mike McLean
07d1eb8109 use TLSv1. https://bugzilla.redhat.com/show_bug.cgi?id=1152823 2014-10-16 14:53:14 -04:00
Mike McLean
73f325e29d return all results when waiting on all subtasks 2014-06-13 11:23:38 -04:00
Mike Bonnet
7704f4cf8c BaseTaskHandler.wait() should only get results for finished subtasks 2014-06-13 11:23:38 -04:00
Mike Bonnet
e626fca4d9 support running a sequence of Maven builds in dependency order
The new "koji chainmaven" command allows Maven builds to be run in depdencency order,
without needing to wait for repo regens.  A config file specifies the parameters and
dependencies for each build in the sequence.  Each build is launched as soon as all
dependent builds are complete, and is able to reference the output of all of its
dependencies.  If the build source URL and parameters match the latest build of the
same package in the destination tag, the build will not be re-run.
2014-06-13 11:23:37 -04:00
Mike McLean
9e8ba23c20 add overwrite option to uploadWrapper 2014-05-12 20:13:52 -04:00
Mike McLean
480eec6afa make first call retry immediately 2014-04-30 11:14:56 -04:00
Mike McLean
3fa9f36bbb fix typos 2014-03-22 14:41:04 -04:00
Anthony Towns
7454bac53f If attempting kerberos login for user with no kerberos principal,
try updating record rather than creating a user that already exists.
2014-03-17 21:20:35 -04:00
Mike McLean
ada844a5ff obsolete comment 2014-03-03 13:51:59 -05:00
Mathieu Bridon
b3b726e968 Don't hardcode /var/lib/mock
The builder configuration allows setting this to a different folder.
2014-03-03 13:41:49 -05:00
Mike McLean
3576b2ddb1 support --latest for mock-config command 2014-02-28 18:13:12 -05:00
Mike McLean
caddcd75ae check for fast upload support 2014-02-26 16:40:57 -05:00
Dennis Gilmore
06dd5b93bb ppc64le is a new arch that needs to be seperated from all others
ppc64 little endinan is incompatiable with all other ppc64 arches
it is only compatiable with noarch, its a new basearch in yum and
separated in rpm. this patch makes sure we treat it seperate in koji
2014-01-22 17:18:22 -06:00
Jay Greguske
c940c252be fix task option ordering for images 2014-01-10 15:40:11 -05:00
Dan Horák
8cba161a3e allow setting the timeout for builds from config file 2013-12-09 11:52:14 -06:00
Mike Bonnet
1570145475 handle files and symlinks in safe_rmtree 2013-09-25 17:09:22 -04:00
Mike McLean
4319ba0be8 don't check cnx if we don't have one 2013-09-09 15:51:07 -04:00
Mike Bonnet
b5da4d0587 clean up plugin logging 2013-06-11 19:11:43 -04:00
Mike McLean
0a7cff19c9 ensuredir fix for relative paths 2013-05-20 16:22:30 -04:00
Mike McLean
e41a2d94c4 provide handler to _read_xmlrpc_response() 2013-04-19 17:26:15 -04:00
Mike McLean
073c65000c use wsgi.url_scheme instead of HTTPS 2013-03-25 15:37:09 -04:00
Mike McLean
16e1b8be05 rewrite ensuredir function to avoid os.makedirs race 2013-03-06 15:44:26 -05:00
Dennis Gilmore
582a0679e7 change default ssl timeout to 60 seconds 2013-03-06 12:41:47 -06:00
Mike McLean
6a6ebaa1bf check for a target before waiting on a repo 2012-11-29 16:53:07 -05:00
Mike McLean
cadb5209c0 rework PathInfo handlers for images 2012-11-29 16:53:06 -05:00