-
Notifications
You must be signed in to change notification settings - Fork 7
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
port to musl and add alpine CI build #182
Conversation
Problem: Some source files in src/imp include wait.h directly when the more portable solution is to include sys/wait.h. Update the locations in which wait.h is included to instead include sys/wait.h.
Problem: Some systems may not have the definitions of TMPFS_MAGIC and CGROUP_SUPER_MAGIC available (for example musl libc). Add definitions for these two values as found in linux/magic.h in RHEL 8.
Problem: A couple sources are missing a required stdint.h include.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #182 +/- ##
==========================================
- Coverage 85.92% 85.88% -0.05%
==========================================
Files 36 36
Lines 4918 4918
==========================================
- Hits 4226 4224 -2
- Misses 692 694 +2
|
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.
All looks good to me!
@@ -79,7 +79,7 @@ static time_t strtotime (const char *s) | |||
{ |
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.
Commit message typo here. Says %T-%m-%d
(twice) but should be %Y-%m-%d
.
Edit: Title also.
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.
Thanks. Got it and force-pushed. Will set MWP.
Problem: The %F format specifier used in strptime(3) and strftime(3) is a non-POSIX alias for %Y-%m-%d, so it fails in systems based on musl libc. Replace the %F alias with the full format %T-%m-%d.
Problem: The glob(3) implementation on musl libc does not return GLOB_ABORTED when the parent directory of the pattern does not exist, but a unit test for cf_update_glob() depends on this behavior. Skip the test if glob(3) doesn't behave as expected in this situation.
Problem: musl libc doesn't have fgetpwent_r(3), so compilation of t/src/getpwuid.c fails. The program is not multithreaded, so switch to fgetpwent(3) and getpwuid(3).
Problem: flux-security is not tested on the musl libc based alpine distribution. Add an alpine build to generate-matrix.py.
Problem: The build.os parameter is now required for readthedocs. Add a build section to readthedocs.yml.
44adb43
to
30b82cb
Compare
This PR fixes some musl libc portability issues in flux-security and adds an alpine Linux CI build so we don't break it again.