apple / ccs-pykerberos

Python Kerberos library used by CalendarServer
https://www.calendarserver.org
Apache License 2.0
117 stars 65 forks source link

pykerberos: support for heimdal/linux #1

Closed macosforgebot closed 18 years ago

macosforgebot commented 18 years ago

agx@… originally submitted this as ticket:37


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:

Cheers,

-- Guido

macosforgebot commented 18 years ago

andrew@… originally submitted this as attachment:PyKerberos.patch:⁠ticket:37


Make the MacOS X specific includes more specific.

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:1:⁠ticket:37

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:2:⁠ticket:37

macosforgebot commented 18 years ago

agx@… originally submitted this as attachment:printf-cleanups:⁠ticket:37

macosforgebot commented 18 years ago

agx@… originally submitted this as attachment:include-stdlib:⁠ticket:37


include stdlib.h for declaration of free(2)

macosforgebot commented 18 years ago

agx@… originally submitted this as attachment:declare-nt-service:⁠ticket:37

macosforgebot commented 18 years ago

agx@… originally submitted this as attachment:python-include:⁠ticket:37

macosforgebot commented 18 years ago

agx@… originally submitted this as comment:3:⁠ticket:37


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

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:4:⁠ticket:37


Where is C_MACOSX defined?

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:5:⁠ticket:37


printf-cleanups applied in r123

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:6:⁠ticket:37


include-stdlib applied in r124

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:7:⁠ticket:37


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.

macosforgebot commented 18 years ago

agx@… originally submitted this as attachment:kerberos-includes:⁠ticket:37


Remove Kerberos/ from the include statements

macosforgebot commented 18 years ago

agx@… originally submitted this as comment:8:⁠ticket:37


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

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

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:9:⁠ticket:37


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.

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:10:⁠ticket:37


python-include is covered in r201

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:11:⁠ticket:37


kerberos-includes covered in r202

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:12:⁠ticket:37


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

macosforgebot commented 18 years ago

agx@… originally submitted this as attachment:fix-setup:⁠ticket:37


Fix include path for linux

macosforgebot commented 18 years ago

agx@… originally submitted this as comment:13:⁠ticket:37


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?

macosforgebot commented 18 years ago

@wsanchez originally submitted this as comment:14:⁠ticket:37


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)