Projects
Wiki     Timeline     Roadmap     Browse Source     View Tickets     New Ticket     Search

Ticket #37 (closed Defect: Software changed)

Opened 2 years ago

Last modified 2 years ago

pykerberos: support for heimdal/linux

Reported by: agx@… Owned by: wsanchez@…
Priority: 1: Blocker Milestone: Linux Port
Component: PyKerberos Severity: Other
Keywords: review Cc:

Description

Hi, attached is a bunch of patches that adds support for linux/heimdal. They might not be as clean as possible but should show fairly well what to do. Please apply as approprioate. The patch order is:

  • printf-cleanups: generic cleanups
  • include-stdlib: include stdlib for definition of free(3)
  • kerberos-includes: fixup kerberos includes for non macosx
  • declare-nt-service: gss_krb5_nt_service_name is declared differently in heimdal
  • python-include: include "python.h"
  • fix-setup: detect "linux2" and pass correct linker flags

Cheers,

-- Guido

Attachments

PyKerberos.patch (1.8 KB) - added by andrew@… 2 years ago.
Make the MacOS X specific includes more specific.
printf-cleanups (3.6 KB) - added by agx@… 2 years ago.
include-stdlib (0.7 KB) - added by agx@… 2 years ago.
include stdlib.h for declaration of free(2)
declare-nt-service (1.2 KB) - added by agx@… 2 years ago.
python-include (472 bytes) - added by agx@… 2 years ago.
kerberos-includes (1.1 KB) - added by agx@… 2 years ago.
Remove Kerberos/ from the include statements
fix-setup (0.5 KB) - added by agx@… 2 years ago.
Fix include path for linux

Change History

Changed 2 years ago by andrew@…

Make the MacOS X specific includes more specific.

Changed 2 years ago by wsanchez@…

  • priority changed from 5: Not set to 1: Blocker
  • status changed from new to assigned
  • milestone set to Linux Port

Changed 2 years ago by wsanchez@…

  • keywords review added

Changed 2 years ago by agx@…

Changed 2 years ago by agx@…

include stdlib.h for declaration of free(2)

Changed 2 years ago by agx@…

Changed 2 years ago by agx@…

Changed 2 years ago by agx@…

I've updated the patches so they apply against latest SVN. Please let me know about any issues with them.

Changed 2 years ago by wsanchez@…

Where is C_MACOSX defined?

Changed 2 years ago by wsanchez@…

printf-cleanups applied in r123

Changed 2 years ago by wsanchez@…

include-stdlib applied in r124

Changed 2 years ago by wsanchez@…

The #ifdef linux stuff is undesirable, and I think we can make it work without.

Specifically, in setup.py, we should find the framework and do the right -Ifoo magic so we don't need "Kerberos/" in the includes. Parking BSD stuff into frameworks is wonky, so we should use the "regular" includes in code and fix the OS X weirdness in setup.py. I think.

Changed 2 years ago by agx@…

Remove Kerberos/ from the include statements

Changed 2 years ago by agx@…

I've updated fix-setup and kerberos-includes (as you suggested) to:

  • not use the Kerberos/ on OSX and gssapi/ prefixes on Linux
  • pass in the include patchs via setup.py
  • parse the correct link args on linux via krb5-config

declate-nt-service can be dropped since it's only needed for heimdal and I'm also building against MIT now. I'm not sure if the include patch is correct for Mac OSX, please modify if it isn't. Cheers,

-- Guido

Changed 2 years ago by wsanchez@…

I put in a fix to setup.py in r200, which is based on your patch, but took out the sys.platform conditionals.  krb5-config should work on OS X also.

Changed 2 years ago by wsanchez@…

  • status changed from assigned to closed
  • resolution set to fixed

python-include is covered in r201

Changed 2 years ago by wsanchez@…

  • status changed from closed to reopened
  • resolution fixed deleted

kerberos-includes covered in r202

Changed 2 years ago by wsanchez@…

  • status changed from reopened to closed
  • resolution set to fixed

I think r202 should work for you.  Let me know if anything else is needed.

Changed 2 years ago by agx@…

Fix include path for linux

Changed 2 years ago by agx@…

  • status changed from closed to reopened
  • resolution fixed deleted

Looks almost fine now but "krb5-config --cflags" doesn't give anything reasonable on Linux either, that's why I hardcoded the include path previously. I've update "fix-setup" again. This one patch is all that's needed now, can it be applied?

Changed 2 years ago by wsanchez@…

  • status changed from reopened to closed
  • resolution set to fixed

OK, I think the problem is actually that the #include is wrong, and OS X's krb5-config isn't broken either...

Try out r217 and let me know if that works.  (Thanks, Guido)

Note: See TracTickets for help on using tickets.