-
Notifications
You must be signed in to change notification settings - Fork 293
enhancement: better alpine compatibility #6728
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
Conversation
Signed-off-by: Sebastien Marie <[email protected]>
|
If you don't add some locking amongst |
|
Some of these changes are small and reasonable (portability is always good!), but I'm not sure how much these are going to help you work with xapi on alpine. UPD: I'd love to be proven wrong - if these are the only blockers for you currently, that'd be great |
|
Commits 1, 4 and 5 are trivial and fine. The use of non-recursive functions needs more careful review |
|
@freddy77 I agree that concurrent threads could lead to problems. but the current code isn't different: concurrent calls to The
so if reentrance is mandated the current code is already wrong. @last-genius the sole problem I had with dependencies is |
|
Why not using |
| if (rc != ENOENT) { | ||
| unlink(tmp_name); | ||
| return rc; | ||
| } |
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.
This can be dangerous. Potentially for an error we are truncating /etc/passwd file instead of returning error.
|
yes, For now, I will drop the changes for |
Signed-off-by: Sebastien Marie <[email protected]>
Signed-off-by: Sebastien Marie <[email protected]>
e5041e3 to
909f18c
Compare
last-genius
left a comment
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.
I believe Andy used to have the maintainer status and his approvals were green, did anything change?
|
I've never been a maintainer in Xapi. |
The following PR fixes few build errors while running
makeandmake teston alpine linux.It mostly adds compatibility declaration on C stuff (unixpwd and forkexecd compoments).
The more important changes is regarding
getpwent_randgetspent_rusage in unixpwd.As it, these functions doesn't exists in musl-libc. So I switched back to more standard variants (
getpwentandgetspent). There are explicitly not reentrants, butgetpwent_randgetspent_rweren't fully reentrants too (due toFILEsharing between threads), so I assume it doesn't introduce regression from this point of vue.With the PR, I am able to run
./configure && make && make testwithout errors (tested on alpine edge).