diff --git a/koji-pr246-kojigc-krb_rds-support.patch b/koji-pr246-kojigc-krb_rds-support.patch new file mode 100644 index 0000000..fcf2fbf --- /dev/null +++ b/koji-pr246-kojigc-krb_rds-support.patch @@ -0,0 +1,69 @@ +From 9a21b78ff5d03f82edb20644684f78fe69aa97d9 Mon Sep 17 00:00:00 2001 +From: Till Maas +Date: Dec 17 2016 16:03:25 +0000 +Subject: [PATCH 1/2] Revert "default krb_rdns to True" + + +This reverts commit 02128ee5777b560619314cc0220e1ed7ca16b28c. + +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 +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 + +--- + +diff --git a/util/koji-gc b/util/koji-gc +index b43f8aa..bf534ed 100755 +--- a/util/koji-gc ++++ b/util/koji-gc +@@ -131,7 +131,7 @@ def get_options(): + ['keytab', None, 'string'], + ['principal', None, 'string'], + ['krbservice', None, 'string'], +- ['krb_rdns', True, 'boolean'], ++ ['krb_rdns', None, 'boolean'], + ['runas', None, 'string'], + ['user', None, 'string'], + ['password', None, 'string'], + +From 1cc9e3052142421ff97e92defed393775ad56441 Mon Sep 17 00:00:00 2001 +From: Till Maas +Date: Dec 18 2016 09:35:22 +0000 +Subject: [PATCH 2/2] 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 + +--- + +diff --git a/util/koji-gc b/util/koji-gc +index bf534ed..9cb2144 100755 +--- a/util/koji-gc ++++ b/util/koji-gc +@@ -52,6 +52,8 @@ def get_options(): + parser.add_option("--principal", help=_("specify a Kerberos principal to use")) + parser.add_option("--krbservice", default="host", + help=_("the service name of the principal being used by the hub")) ++ parser.add_option("--krb-rdns", action="store_true", default=False, ++ help=_("get reverse dns FQDN for krb target")) + parser.add_option("--runas", metavar="USER", + help=_("run as the specified user (requires special privileges)")) + parser.add_option("--user", help=_("specify user")) +@@ -111,6 +113,7 @@ def get_options(): + (options, args) = parser.parse_args() + + defaults = parser.get_default_values() ++ + config = ConfigParser.ConfigParser() + cf = getattr(options, 'config_file', None) + if cf: + diff --git a/koji-pr248-kojigc-keytab-support.patch b/koji-pr248-kojigc-keytab-support.patch new file mode 100644 index 0000000..44691e1 --- /dev/null +++ b/koji-pr248-kojigc-keytab-support.patch @@ -0,0 +1,24 @@ +From db1eb36c1b74de65ddf479859a437eab1823727b Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Dec 17 2016 18:27:49 +0000 +Subject: Make koji-gc also work with principal and keytab + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/util/koji-gc b/util/koji-gc +index b43f8aa..74f1de7 100755 +--- a/util/koji-gc ++++ b/util/koji-gc +@@ -352,7 +352,7 @@ def activate_session(session): + elif options.user: + #authenticate using user/password + session.login() +- elif has_krb_creds(): ++ elif has_krb_creds() or (options.keytab and options.principal): + try: + if options.keytab and options.principal: + session.krb_login(principal=options.principal, keytab=options.keytab, proxyuser=options.runas) + diff --git a/koji.spec b/koji.spec index f7dcd14..24050a8 100644 --- a/koji.spec +++ b/koji.spec @@ -9,15 +9,19 @@ Name: koji Version: 1.11.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2 and GPLv2+ # koji.ssl libs (from plague) are GPLv2+ Summary: Build system tools Group: Applications/System -URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra +URL: https://pagure.io/koji/ +Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch0: fedora-config.patch +# https://pagure.io/koji/pull-request/246 +# https://pagure.io/koji/pull-request/248 +Patch1: koji-pr246-kojigc-krb_rds-support.patch +Patch2: koji-pr248-kojigc-keytab-support.patch -Source: koji-%{version}.tar.bz2 BuildArch: noarch Requires: python-krbV >= 1.0.13 Requires: rpm-python @@ -167,6 +171,8 @@ koji-web is a web UI to the Koji system. %prep %setup -q %patch0 -p1 -b orig +%patch1 -p1 -b .246 +%patch2 -p1 -b .248 %build @@ -334,6 +340,11 @@ fi %endif %changelog +* Fri Jan 06 2017 Till Maas - 1.11.0-2 +- Update upstream URLs +- Add upstream koji-gc kerberos patches +- Use Source0 + * Fri Dec 09 2016 Dennis Gilmore - 1.11.0-1 - update to 1.11.0 - setup fedora config for kerberos and flag day