Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable specification of krb5-config via environment variable #253

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

neirbowj
Copy link
Contributor

@neirbowj neirbowj commented Jun 2, 2021

Closes #250

@neirbowj
Copy link
Contributor Author

neirbowj commented Jun 2, 2021

Build look good with py36, py37, py38 (default), and py39 on FreeBSD 12.2-RELEASE amd64 against:

setup.py Outdated Show resolved Hide resolved
Signed-off-by: John W. O'Brien <john@saltant.com>
@frozencemetery
Copy link
Member

Hmm, okay. I think I had a perhaps more invasive change in mind.

Right now we've got $GSSAPI_LINKER_ARGS (overrides link_args, but can be derived from krb5_config), $GSSAPI_COMPILER_ARGS (overrides compile_args, but can be derived from krb5_config), and $GSSAPI_MAIN_LIB (overrides main_lib, but can be derived from link_args and platform goo). So what I had in mind was:

  1. The freebsd stanza should respect link_args and compile_args if they're already set - this allows for proper overriding with the existing env vars.
  2. Optionally, some of the code in setup.py could move around to make more sense, or move into helper functions for clarity. I think classes is probably overkill, though.
  3. As an optional add-on, we add a variable for the location of krb5_config. This is then used to derive link_args and compile_args if they're not set (and the it makes sense on the platform etc.).

Since I'm being fussy here, please let me know if you'd rather I make those changes :)

@neirbowj
Copy link
Contributor Author

  1. The freebsd stanza should respect link_args and compile_args if they're already set - this allows for proper overriding with the existing env vars.

Unless I'm missing something, it already works this way. More to the point, the FBSD logic only affects kc (whether to rely on the PATH by default, or call by absolute path), which is the later used to learn link_args and compile_args if they are not already supplied in the environment.

  1. Optionally, some of the code in setup.py could move around to make more sense, or move into helper functions for clarity. I think classes is probably overkill, though.

Makes complete sense to me. That's a little more than I think I can sign up to at the moment, though.

  1. As an optional add-on, we add a variable for the location of krb5_config. This is then used to derive link_args and compile_args if they're not set (and the it makes sense on the platform etc.).

Now I really feel like I'm missing something. kc is a variable with the location of krb5-config. It is already used to set link_args and compile_args if they are not already set, and they are not known in a platform-dependent manner.

@frozencemetery
Copy link
Member

Hmm, you're right - I managed to confuse myself somewhere in there. We merely set krb5-config, but don't actually invoke it. So this should be fine then.

@frozencemetery
Copy link
Member

@jborean93 Before I merge, are you okay with the new variable name?

@frozencemetery frozencemetery merged commit 4c23c75 into pythongssapi:main Jun 22, 2021
@jborean93
Copy link
Contributor

jborean93 commented Jun 22, 2021

My apologies @frozencemetery just saw this, the new name is fine with me (although it's already merged :)).

@neirbowj neirbowj deleted the fbsd_krb5cfg branch July 5, 2021 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable krb5-config auto-detect override in setup.py on FreeBSD
3 participants