Bug 976301

Summary: python-kerberos lakes a python3 variant
Product: [Fedora] Fedora Reporter: William Brown <william>
Component: python-kerberosAssignee: Rob Crittenden <rcritten>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: abokovoy, dpal, mcepl, mcepl, mhlavink, mkosek, mschmidt, nalin, rcritten, sochotni
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-kerberos-1.2.4-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 18:06:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch from upstream
none
packaging patch
none
Update to current upstream release, build for both python2 and python3 none

Description William Brown 2013-06-20 10:16:43 UTC
Description of problem:
Using python3, there is no python3-kerberos module.

As such here is the upstream issue relating to this.

http://trac.calendarserver.org/ticket/798

Additionally, there is a patch on this ticket that in the mean time could be applied in the rpm to provide a python3-kerberos variant.

Comment 1 Matěj Cepl 2014-02-16 00:28:12 UTC
Created attachment 863651 [details]
patch from upstream

Comment 2 Michal Hlavinka 2014-06-27 12:14:02 UTC
Created attachment 912794 [details]
packaging patch

This patch adds all the changes required to build both python-kerberos and python3-kerberos from one srpm. It includes previous patch backported to match the python-kerberos release we have in rawhide right now.

Comment 3 Stanislav Ochotnicky 2014-06-27 13:57:04 UTC
So why not just rebase to 1.1.5 released on pypi[1]? I just tested with both Python 3.3 and 2.7 and it works.

https://pypi.python.org/pypi/pykerberos

Comment 4 Rob Crittenden 2014-06-27 15:27:20 UTC
Michal thanks for the patch but it seems to be missing pykerberos-python3support-python26compatible.patch. The gsswrap patch I made is not python3-clean yet, not sure if you covered that or not.

I'd prefer to wait for an official upstream release. There has been some rumbling recently that they may actually package up what is currently in HEAD and release it, which AFAICT is what the pypi maintainer did.

Comment 5 Michal Hlavinka 2014-06-30 14:18:20 UTC
Hi Rob, no, nothing is missing. 
$ fedpkg co python-kerberos
$ cd python-kerberos
$ wget https://bugzilla.redhat.com/attachment.cgi?id=912794 -O python3-support.patch
$ patch <python3-support.patch

That's all. This will create the patch that you think is missing and update python-kerberos.spec

Comment 6 Rob Crittenden 2014-07-30 15:40:50 UTC
The tests are failing due to setting a NULL pointer.

Kerberos service principal for host/puma.example.com succeeded: host/puma.example.com

*** Running basic test
Kerberos authentication for admin succeeded

*** Running GSSAPI test
Status for authGSSClientInit = Complete
Status for authGSSServerInit = Complete
Status for authGSSClientStep = Continue
Status for authGSSServerStep = Complete
Status for authGSSClientStep = Complete
Server user name: admin
Client user name: admin
Status for authGSSClientClean = CompleteTraceback (most recent call last):
  File "test.py", line 230, in <module>
    main()
  File "test.py", line 67, in main
    testGSSAPI(service)
  File "test.py", line 128, in testGSSAPI
    print("Status for authGSSClientClean = %s" % statusText(rc))
ValueError: PyCapsule_SetPointer called with null pointer

I don't know a lot about porting to python 3 but the docs explicitly state that PyCapsule_SetPointer can't be used to set a NULL pointer, https://docs.python.org/3/c-api/capsule.html

Comment 7 Jaroslav Reznik 2015-03-03 16:53:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 8 Michal Schmidt 2016-02-18 15:34:00 UTC
Created attachment 1128262 [details]
Update to current upstream release, build for both python2 and python3

The current upstream release is 1.2.4. It has support for Python 3. Let's update to that.

Comment 9 Rob Crittenden 2016-02-18 15:41:53 UTC
I'll take a look, thanks for the patch. It's too bad upstream stopped doing releases via tags and branches.

Comment 11 Rob Crittenden 2016-02-18 18:06:15 UTC
Basic sanity checking looks good using the upstream test.py script (modified to handle python 3) and I did some basic testing with IPA client and server in F-23.