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
ipaclient/ipapython macOS compatibility fixes #699
Conversation
|
Thanks. Do you have IPA client code working on Mac OS X? |
|
It connects via RPC and user-show works. Didn't check much further. I also created an issue: https://pagure.io/freeipa/issue/6850 EDIT: I tried it on another computer but currently python-nss fails. I'll check. |
|
Ok. Let me look at it next week when I'll have time. Could you please add a short step by step instruction how you configured IPA client on Mac OS X? |
|
There is a PEP8 error: ./ipapython/session_storage.py:11:21: E225 missing whitespace around operator |
|
I added the steps here: https://pagure.io/freeipa/issue/6850 |
ipapython/session_storage.py
Outdated
| @@ -7,9 +7,12 @@ | |||
|
|
|||
| KRB5_CC_NOSUPP = -1765328137 | |||
|
|
|||
| LIBKRB5_FILENAME = 'libkrb5.so.3' | |||
| if platform.system() == "Darwin": | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please import the sys module and use use sys.platform
import sys
...
if sys.platform == 'darwin':
LIBKRB5_FILENAME = 'libkrb5.dylib'
else:
LIBKRB5_FILENAME = 'libkrb5.so.3'
|
@neffs thanks David. Please squash your commits into a single commit ( |
Signed-off-by: David Kreitschmann <david@kreitschmann.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks a lot for your contribution!
I'm giving your PR a provisional ACK. Travis CI will take a while to finish (at least 30 minutes).
…atasync Signed-off-by: David Kreitschmann <david@kreitschmann.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fdatasync -> fsync is ok, too.
Next time, please don't add a new patch to an approved PR. It is easier for us when you create a new PR instead.
|
Please don't set ACK yet, I'm not finished with review. I do not want to replace fdatasync() with fsync(), this is not correct towards other platforms. |
|
Note that we need something similar to untitaker/python-atomicwrites@2bdd9da to behave properly on Mac OS X. |
|
I wrote that Explanation: fdatasync is a slightly optimized version of fsync that does not flush some metadata to disk, https://linux.die.net/man/2/fdatasync
When I write the code, I chose |
|
No, we don't need to sync the directory. These are cache files. It's only important that we don't have half-written cache files on disk. A missing cache file is fine. |
|
I still need to test the whole set on Mac OS X myself as we have no way to test that in CI. Thus, this PR will depend on me (or some one else from FreeIPA team) to actually test the code on Mac OS X. |
|
Ok, so far I cannot build a wheel from git repo on Mac OS X as we have a number of limitations ourselves -- we need to fix our configure to allow just generating enough of |
|
@abbra is there any reason to delay the merge? I like to get the fixes into 4.5 for the upcoming 4.5.1 release. This commit may not be sufficient for full macOS support, but it's definitely required for macOS support. There is no harm to commit it now and fix remaining issues later. |
|
Well, given that it is not officially supported yet, go ahead. |
|
IMO this can be put to 4.5.1 (ipa-4-5 branch) but in order to do it, according to FreeIPA devel processes, it needs to be attached (have a ticket link in commit message) to opened issue in 4.5.1 milestone. Otherwise it will go only to master branch (future 4.6). If this fixes 6850, then it can be reopended for it. Otherwise please open a new issue with reasoning. |
|
This got an ACK during the last developers' meeting. |
libkrb5.so.3 is called libkrb5.dylib on macOS