Commit graph

58 commits

Author SHA1 Message Date
Tomas Kopecek
6f7f828f77 python-modernize -f lib2to3.fixes.fix_except 2018-07-11 17:37:40 -04:00
Tomas Kopecek
caae1a0a8b workaround unnecessary list conversions 2018-07-11 17:37:40 -04:00
Tomas Kopecek
be535c2854 python-modernize -f libmodernize.fixes.fix_imports_six 2018-07-11 17:37:39 -04:00
Tomas Kopecek
d92fa1fa9c python-modernize -f libmodernize.fixes.fix_file 2018-07-11 17:37:39 -04:00
Tomas Kopecek
bcee24e50c python-modernize -f libmodernize.fixes.fix_dict_six 2018-07-11 17:37:39 -04:00
Franz Chih-Ping Hsieh
f356ac4f17 force using python2 to run script
Fixes #945
2018-05-24 00:01:30 -04:00
Mike McLean
4c07073403 simplify check for krbV module 2018-04-02 16:38:27 -04:00
Mike McLean
91b306e108 Avoid failing at import time if krbV module is missing
Several parts of Koji already handled this absence gracefully. This change
extends that behavior to all places where krbV is imported.
2018-04-02 16:38:27 -04:00
Tomas Kopecek
8f22069fda drop old ssl support + compatrequests
Koji now uses ssl via python-requests

 - use_old_ssl option is removed
 - koji.ssl library removed
 - compatrequests dropped

Related: https://pagure.io/koji/issue/467
2018-01-03 12:47:03 +01:00
Mike McLean
900767cf4b add krb_canon_host option to various clients 2017-10-27 15:32:25 -04:00
Tomas Kopecek
cc9fff9840 remove has_key (not working in python3) 2017-03-07 08:15:20 -05:00
Tomas Kopecek
1494301465 use new exception syntax 2017-03-02 10:52:30 -05:00
Mike McLean
53875831df a couple more prints 2017-02-28 11:06:09 -05:00
Tomas Kopecek
c143d0b88f print statement -> print function 2017-02-28 10:55:56 -05:00
Dennis Gilmore
60f0859591 wrap sending email in try except
Sometimes the recipient email may no longer be valid due to many
reasons.  Handle the failure to send email gracefully.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2017-02-22 11:27:46 -05:00
Tomas Kopecek
7fb7bd28a9 backward-compatible default value for kojid/kojira/koji-gc certs 2017-01-13 10:46:41 -05:00
Till Maas
8e30249401 Clarify purpose of cfgmap 2016-12-19 21:48:12 +01:00
Till Maas
baa6afca60 koji-gc: Set default value for krb_rdns to False
In Fedora infra krb_rdns needs to be set to False. This matches
https://pagure.io/koji/pull-request/244
2016-12-19 12:20:09 -05:00
Till Maas
987984e863 Revert "default krb_rdns to True"
This reverts commit 02128ee577.

The second column in cfgmap is an alias and "True" is not a valid alias.
It was mistaken in the reverted commit as a default value, which it is
not. Reverting this commit should fix the following traceback that
koji-gc in Fedora currenty raises:

Traceback (most recent call last):
File "/usr/sbin/koji-gc", line 901, in <module>
options, args = get_options()
File "/usr/sbin/koji-gc", line 159, in get_options
if config.has_option(*alias):
TypeError: has_option() argument after * must be a sequence, not bool
2016-12-19 12:20:09 -05:00
Patrick Uiterwijk
3300e29b5c Make koji-gc also work with principal and keytab
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2016-12-19 12:15:35 -05:00
Till Maas
d15ff037dc Use https to link to wiki 2016-12-19 11:49:11 -05:00
Mike McLean
97264e690c let koji-gc config set more session options 2016-11-22 16:41:31 -05:00
Mike McLean
de5fe47111 koji-gc: remove --network-hack, use grab_session_options 2016-11-22 16:41:31 -05:00
Mike McLean
b4be256abd no coverage for unreached code 2016-10-25 17:16:12 -04:00
Mike McLean
a1c8808544 ImportErrors are uncovered 2016-10-25 17:16:12 -04:00
Dennis Gilmore
02128ee577 default krb_rdns to True
koji-gc fails to run if you do not set a value in your config.
it should default to a valid value.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-09-07 14:21:06 -05:00
Mike McLean
e3043f2583 honor smtp_host option in koji-gc (jflorian)
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1367945

Merges: #136
2016-08-25 19:29:34 -04:00
Mike McLean
b0cdd312ec add krb_rdns option. see https://fedorahosted.org/koji/ticket/328 2016-05-11 16:58:41 -04: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
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
ab53d2deb0 update copyright 2014-10-28 23:54:21 -04:00
Mike McLean
3472e5bda8 fix to address for gc notices (ticket 268) 2014-07-25 10:30:44 -04:00
Anthony Messina
7d1f70703d add support for the krbservice and email_domain options to koji-gc 2013-09-18 15:20:08 -04:00
Mike Bonnet
44a2f90a17 koji-gc: if the tag has the maven_include_all=True, calculate the order for Maven builds with respect to name-version rather than just package name 2013-06-25 15:21:47 -04:00
Mike Bonnet
b0c5e1ec92 koji-gc: move sorting and filtering into the database 2013-06-25 15:16:16 -04:00
Ken Dreyer
332a6d5811 better descriptions for koji-gc SSL options
The current descriptions for koji-gc's SSL options appear to be the
result of copy & paste. Update the description for each individual SSL
option to match its functionality.
2011-11-28 16:14:10 -05:00
Mike McLean
2be7751ec3 volume test for koji-gc, plus some test cleanup 2011-03-18 13:57:38 -04:00
Mike McLean
e68bbb499f make koji-gc --test show better data 2010-11-11 11:33:08 -05:00
Mike Bonnet
d8055a2274 merge master onto the mead branch 2009-06-12 14:04:55 -04:00
Mike McLean
d421286304 quiet koji-gc output a little 2009-04-23 15:17:38 -04:00
Mike McLean
f273899018 Merge branch 'master' into mead
Conflicts:
	builder/kojid
	cli/koji
	hub/kojihub.py
	www/kojiweb/buildinfo.chtml
	www/kojiweb/builds.chtml
	www/kojiweb/index.py
2009-03-31 15:43:08 -04:00
Mike McLean
252f5d4c38 purge gc option 2009-01-19 16:41:01 -05:00
Mike McLean
f90a3d85b7 Merge branch 'master' into mead
Conflicts:

	hub/kojihub.py
2008-11-07 17:36:55 -05:00
Mike McLean
86e63c5de1 policy framework and tagging policies 2008-10-27 14:00:58 -04:00
Dennis Gilmore
329a9b5fa4 add missing / from default serverca path 2008-10-14 12:48:42 -05:00
Mike Bonnet
53cb7ebf4c check for archives in koji-gc 2008-10-14 11:37:48 -04:00
Mike McLean
352e6b169b gc: fix age calculation for untagged builds 2008-05-19 18:11:22 -04:00
Mike McLean
a9f090092b package koji-gc
also changed default config location for koji-gc
2008-05-19 18:11:22 -04:00
Mike McLean
db8486e61d actually read default conf file. add limit option to buildReferences call. 2008-01-04 14:26:46 -07:00
Mike McLean
24a547abe9 change default actions in koji-gc 2007-12-14 15:37:35 -05:00