From fdd40539b6f6fbbb52d7b0c714dd31098597979e Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Nov 26 2018 17:24:36 +0000 Subject: Import did-0.11 --- diff --git a/.gitignore b/.gitignore index 9a0052f..1331b26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /did-0.6.tar.bz2 /did-0.9.tar.bz2 +/did-0.11.tar.bz2 diff --git a/Port-to-python-gssapi.patch b/Port-to-python-gssapi.patch deleted file mode 100644 index 578e64a..0000000 --- a/Port-to-python-gssapi.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 776ae1d92d28d2c291f4cd42471eb87441f29fe5 Mon Sep 17 00:00:00 2001 -From: Robbie Harwood -Date: Mon, 19 Feb 2018 16:47:44 -0500 -Subject: [PATCH] Port to python-gssapi - -As part of this, migrate any urllib2_kerberos code to urllib-gssapi. ---- - .travis.yml | 2 +- - Makefile | 2 +- - did.spec | 7 +++++-- - did/cli.py | 8 ++++---- - did/plugins/jira.py | 4 ++-- - did/plugins/rt.py | 18 ++++++++++-------- - docs/conf.py | 2 +- - examples/dockerfile | 2 +- - setup.py | 6 +++--- - 9 files changed, 28 insertions(+), 23 deletions(-) - -diff --git a/Makefile b/Makefile -index cd0514b..2c1ac9b 100644 ---- a/Makefile -+++ b/Makefile -@@ -79,7 +79,7 @@ clean: - run_docker: build_docker - @echo - @echo "Please note: this is a first cut at doing a container version as a result; known issues:" -- @echo "* kerberos auth may not be working correctly" -+ @echo "* GSSAPI auth may not be working correctly" - @echo "* container runs as privileged to access the conf file" - @echo "* output directory may not be quite right" - @echo -diff --git a/did/cli.py b/did/cli.py -index 623f3e4..8ea5c52 100644 ---- a/did/cli.py -+++ b/did/cli.py -@@ -12,7 +12,7 @@ from __future__ import unicode_literals, absolute_import - import re - import sys - import argparse --import kerberos -+import gssapi - from dateutil.relativedelta import relativedelta as delta - - import did.base -@@ -205,7 +205,7 @@ def main(arguments=None): - did.base.Config.path(), did.base.Config.example().strip())) - raise - -- except kerberos.GSSError as error: -- log.debug(error) -+ except gssapi.exceptions.GSSError as error: -+ log.debug(error.gen_msg()) - raise did.base.ConfigError( -- "Kerberos authentication failed. Try kinit.") -+ "GSSAPI authentication failed. Try kinit.") -diff --git a/did/plugins/jira.py b/did/plugins/jira.py -index 874b21f..9c62a1d 100644 ---- a/did/plugins/jira.py -+++ b/did/plugins/jira.py -@@ -39,7 +39,7 @@ import urllib - import urllib2 - import cookielib - import dateutil.parser --import urllib2_kerberos -+import urllib_gssapi - - from did.utils import log, pretty, listed - from did.base import Config, ReportError -@@ -254,7 +254,7 @@ class JiraStats(StatsGroup): - urllib2.HTTPSHandler(debuglevel=0), - urllib2.HTTPRedirectHandler, - urllib2.HTTPCookieProcessor(cookie), -- urllib2_kerberos.HTTPKerberosAuthHandler) -+ urllib_gssapi.HTTPSPNEGOAuthHandler) - - log.debug("Connecting to {0}".format(self.auth_url)) - if self.auth_type == 'basic': -diff --git a/did/plugins/rt.py b/did/plugins/rt.py -index a6f470b..f75f700 100644 ---- a/did/plugins/rt.py -+++ b/did/plugins/rt.py -@@ -15,7 +15,9 @@ from __future__ import absolute_import, unicode_literals - import httplib - import urllib - import urlparse --import kerberos -+import gssapi -+ -+from base64 import b64encode, b64decode - - from did.utils import log, pretty - from did.base import ReportError, Config -@@ -36,18 +38,18 @@ class RequestTracker(object): - self.url_string = parent.url - - def get(self, path): -- """ Perform a GET request with Kerberos authentication """ -- # Prepare Kerberos ticket granting ticket """ -- _, ctx = kerberos.authGSSClientInit( -- 'HTTP@{0}'.format(self.url.netloc)) -- kerberos.authGSSClientStep(ctx, "") -- tgt = kerberos.authGSSClientResponse(ctx) -+ """ Perform a GET request with GSSAPI authentication """ -+ # Generate token -+ service_name = gssapi.Name('HTTP@{0}'.format(self.url.netloc), -+ gssapi.NameType.hostbased_service) -+ ctx = gssapi.SecurityContext(usage="initiate", name=service_name) -+ data = b64encode(ctx.step()).decode() - - # Make the connection - connection = httplib.HTTPSConnection(self.url.netloc, 443) - log.debug("GET {0}".format(path)) - connection.putrequest("GET", path) -- connection.putheader("Authorization", "Negotiate {0}".format(tgt)) -+ connection.putheader("Authorization", "Negotiate {0}".format(data)) - connection.putheader("Referer", self.url_string) - connection.endheaders() - -diff --git a/examples/dockerfile b/examples/dockerfile -index e289169..92a2f6e 100644 ---- a/examples/dockerfile -+++ b/examples/dockerfile -@@ -1,7 +1,7 @@ - FROM fedora - MAINTAINER langdon - RUN yum clean all && yum -y update --RUN yum -y install python python-pip make gcc krb5-devel python-devel python-setuptools python-kerberos python-nitrate python-dateutil python-urllib2_kerberos -+RUN yum -y install python python-pip make gcc krb5-devel python-devel python-setuptools python-gssapi python-nitrate python-dateutil python-urllib-gssapi - RUN yum clean all - - COPY . /opt/did --- -2.16.1 - diff --git a/did.spec b/did.spec index 4b41382..a18a3a4 100644 --- a/did.spec +++ b/did.spec @@ -1,6 +1,6 @@ Name: did -Version: 0.9 -Release: 9%{?dist} +Version: 0.11 +Release: 1%{?dist} Summary: What did you do last week, month, year? License: GPLv2+ @@ -8,15 +8,11 @@ License: GPLv2+ URL: https://github.com/psss/did Source: https://github.com/psss/did/releases/download/%{version}/did-%{version}.tar.bz2 -Patch0: Port-to-python-gssapi.patch - BuildArch: noarch BuildRequires: git BuildRequires: python2-devel -Requires: python2-gssapi -Requires: python2-urllib-gssapi +Requires: python2-gssapi python2-requests-gssapi Requires: python2-nitrate python2-dateutil python2-bugzilla -%{?el6:Requires: python-argparse} %description Comfortably gather status report data (e.g. list of committed @@ -48,32 +44,53 @@ install -pm 644 did.1.gz %{buildroot}%{_mandir}/man1 %license LICENSE %changelog -* Tue Jul 17 2018 Miro Hrončok - 0.9-9 +* Mon Nov 26 2018 Petr Šplíchal 0.11-1 +- Validate plugin types in config [fix #148] +- Use email for searching Jira issues [fix #122] +- Handle authentication errors in the Jira plugin +- Update shebang to explicitly use python2 +- Add a new section Questions to docs [fix #155] +- Raise error on unsuccessful request [fix #154] +- New plugin for Pagure stats [fix #153] +- Use requests-gssapi for Jira stats +- Fix problems with the Sentry plugin +- Merge configurable ssl verify for gitlab [#136] +- Merge the improved gitlab search [#137] +- Merge the new redmine plugin [#135] +- Some minor adjustments for the redmine plugin +- GitHub stats about reviewed PRs [#127] +- Remove zero-fill from Jira issues [fix #149] +- Add oauth2client to docs requirements [fix #152] +- Adjust until limit of the sentry plugin [fix #151] +- Update test data for the sentry & google plugins - Update Python macros to new packaging standards - (See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package) - -* Thu Jul 12 2018 Fedora Release Engineering - 0.9-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Mar 05 2018 Robbie Harwood - 9.9-7 -- Apply patch to port from pykerberos to python-gssapi -- Resolves: #1546884 - -* Wed Feb 07 2018 Iryna Shcherbina - 0.9-6 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Wed Feb 07 2018 Fedora Release Engineering - 0.9-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.9-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 0.9-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jul 19 2016 Fedora Release Engineering - 0.9-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages +- Port to python-gssapi +- Fixed issue with failing tests +- Remove the idonethis plugin +- Merge the new sentry plugin +- Add basic Redmine support +- Add basic GitLab support +- Add search for subscribed bugs +- Add did.spec to MANIFEST.in +- Merge fix for bugs patched when created [#109] +- Merge the new Bugzilla query syntax [#111] +- Fetch only needed stats during GitHub testing +- Merge support for pull request separation [#114] +- Show month name / week number by default [#106] + +* Wed Jan 11 2017 Martin Frodl 0.10-1 +- New plugin for Google Apps +- Document how to generate documentation locally +- Mock C modules while building documentation +- Make all make versions happy +- Add requirements.txt to fix docs building +- Properly handle GitHub issues with Unicode names +- Add login key to github section in example config +- Update install docs with fresh Fedora instructions +- Update coveralls links in README +- List install dependencies for Debian-based systems +- Use another Trac instance in plugin test +- Move kerberos to extra requires * Mon Apr 04 2016 Petr Šplíchal 0.9-1 - New plugins supported: Trello, bit.ly, idonethis diff --git a/sources b/sources index 84e9ca0..72be3e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2d8ad4bd1f845e73dc7f5798e8cee4ac did-0.9.tar.bz2 +SHA512 (did-0.11.tar.bz2) = 21dfd1003f6e4c420e23e3f0a698386ce239aa915cab346e2cfee7f00f1a003045812901c149ba3f12a52dc87c30ad884fc4c4a8a21dda8384d68747c179aed9