Commit graph

289 commits

Author SHA1 Message Date
Mike McLean
175f047288 s/LiveMEDIA/LiveMedia 2016-05-16 14:02:08 -04:00
Mike McLean
c1d309e78c fixing up cli task display 2016-05-16 14:02:07 -04:00
Mike McLean
e562402709 [*] don't obscure traceback in retry code 2016-05-16 14:02:06 -04:00
Jon Disnard
41fa543e09 koji: Add LMC error handler, and misc glue.
Signed-off-by: Jon Disnard <jdisnard@redhat.com>
2016-05-16 14:02:05 -04:00
Mike McLean
b0cdd312ec add krb_rdns option. see https://fedorahosted.org/koji/ticket/328 2016-05-11 16:58:41 -04:00
Dennis Gilmore
654434f66a set strict to true so dnf does not ignore broken deps
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-11 15:57:17 -04:00
Dennis Gilmore
0ea9bdec33 set install_weak_deps to 0 by default
yum ignores values it does not understand and dnf by default installs weak
dependecies, after talking to the FPC we should disable weka deps and
anything needed should be pulled in explicitly

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-11 15:57:17 -04:00
Mike McLean
e5f582312d catch pyssl import errors 2016-04-11 12:17:42 -04:00
Mike McLean
014e9aee4b acquire import lock in get_profile_module
see: https://pagure.io/koji/issue/58
2016-04-11 12:09:29 -04:00
Mike McLean
2a292308de preserve upload blocksize default in api 2016-03-24 15:59:16 -04:00
Mike McLean
3158c8d526 fix merge issue 2016-03-24 15:48:07 -04:00
Mike McLean
acbe00ff1b Merge branch 'upload_blocksize'
Conflicted with the recent profiles changes. Option defaults now live in koji/__init__.py
2016-03-24 15:06:41 -04:00
Xibo Ning
2f507ec69a make the upload block size configurable 2016-03-24 14:52:27 -04:00
Dennis Gilmore
17376ced20 Enable keepcache in koji dnf conf
Supermin needs access to the pristine RPMs from which the buildroot
is installed, in order to grab the /etc (configuration) files into
the libguestfs appliance (the binaries etc are not baked into the
appliance for obvious security/maintainability reasons).

For years we got these from the yum cache, but problem: dnf defaults
to keepcache=0 and so doesn't save these RPMs.

Therefore enable keepcache like yum.

From https://fedorahosted.org/rel-eng/ticket/6274

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-03-21 16:13:16 -04:00
Tomas Mlcoch
86876a1bc9 Support for koji profiles.
This patch is dmach's patch [1] refactored according to mikem's comments [2].

[1] https://lists.fedoraproject.org/pipermail/buildsys/2015-August/004857.html
[2] https://lists.fedoraproject.org/pipermail/buildsys/2015-October/004900.html

Signed-off-by: Tomas Mlcoch <tmlcoch@redhat.com>
2016-03-21 15:45:26 -04:00
Tomas Mlcoch
d20e62b76e Move config processing from CLI to koji.read_config()
This patch is dmach's patch [1] refactored according to mikem's comments [2].

[1] https://lists.fedoraproject.org/pipermail/buildsys/2015-August/004858.html
[2] https://lists.fedoraproject.org/pipermail/buildsys/2015-October/004900.html

Signed-off-by: Tomas Mlcoch <tmlcoch@redhat.com>
2016-03-21 15:45:26 -04:00
Ralph Bean
8d4f5e04ed Remove Enum.getvalue, since it is unused. 2016-03-15 11:29:41 -04:00
Ralph Bean
4383033362 Add nocover to some blocks we won't test. 2016-03-15 11:29:41 -04:00
Ralph Bean
01bb6e63fa Test krbv failing when krbV is not installed. 2016-03-15 11:29:41 -04:00
Mike McLean
33cf1ab6f2 avoid masking exceptions in retry code 2016-01-05 17:56:40 -05:00
Mike McLean
7e56b133a0 handle Unexpected EOF exceptions on reads 2016-01-05 17:56:40 -05:00
Mike McLean
cdf8c2497d fix using https url with non-ssl auth in python 2.7.9+
In python 2.7.9, a context option was added to httplib.HTTPSConnection and
changed its behavior to performs certificate and hostname checks by default.

While this is definitely an improvement, we were relying on the old behavior.
This change restores that (until we can switch to proper verification).
2015-12-11 16:39:14 -05:00
Mike McLean
9453272a50 remove additional dead ssl code
I've been meaning to do this for a while. No part of Koji uses the
removed code anymore (some of it was never used by Koji)
2015-12-11 16:34:44 -05:00
Till Maas
ffcf1a30eb Remove dead client CA code
The client CA is only needed to for authentication on the server side,
not for authentication on the client side. Therefore remove it from all
client login code.
2015-12-10 18:51:10 -05:00
Mike McLean
964561b426 fall back to client side info for authtype 2015-12-03 19:50:10 -05:00
Mike Bonnet
5569c058c1 print the correct authentication method in "koji moshimoshi" 2015-12-01 18:51:53 -05:00
Till Maas
3a13307598 Increase default SSL timeout to 600
60 is not enough to process a full release like Rawhide and last I
checked the code to use a different timeout than the default timeout
does not work. Therefore use a working default value.

Signed-off-by: Till Maas <opensource@till.name>
2015-11-27 18:39:13 +01:00
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