-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
enable utmpx feature for musl #7740
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 utmpx feature for musl #7740
Conversation
GNU testsuite comparison:
|
cc6a852
to
179d60f
Compare
GNU testsuite comparison:
|
179d60f
to
0060e1c
Compare
GNU testsuite comparison:
|
I'll check the test failure. I can reproduce locally with |
0060e1c
to
fa03130
Compare
I'd like to emphasize the trade-off of this PR:
|
e718696
to
d09a756
Compare
GNU testsuite comparison:
|
bump libc to 0.2.172 musl provides stubs of utmpx functions, and those stubs are available in the libc crate version 0.2.172. Thus let's enable the feature so that it can compile with musl. Note that those stubs always return a success exit value, and commands such as "users" will report an empty list of users, when calling those stubs. This is consistent with the behavior of GNU coreutils which does the same thing. The coreutils utillities using utmpx are "pinky", "uptime", "users", "who". This is the expected behavior when using those utilities compiled with those musl utmpx stubs: ``` root@qemuarm64:~# users root@qemuarm64:~# echo $? 0 root@qemuarm64:~# pinky Login Name TTY Idle When Where root@qemuarm64:~# echo $? 0 root@qemuarm64:~# uptime 12:58:47 up 0 min, 0 users, load average: 0.07, 0.02, 0.00 root@qemuarm64:~# echo $? 0 root@qemuarm64:~# who root@qemuarm64:~# echo $? 0 ``` Closes uutils#1361 Signed-off-by: Etienne Cordonnier <[email protected]>
After the addition of utmpx, feat_os_unix_musl is now identical to feat_os_unix and is thus not needed any more. Signed-off-by: Etienne Cordonnier <[email protected]>
musl libc only provides stub functions for utmpx, thus this test cannot pass with musl libc. Signed-off-by: Etienne Cordonnier <[email protected]>
d09a756
to
0692a29
Compare
I think the failure of |
GNU testsuite comparison:
|
0692a29
to
1ec4478
Compare
Signed-off-by: Etienne Cordonnier <[email protected]>
1ec4478
to
bc8acbb
Compare
GNU testsuite comparison:
|
musl provides stubs of the utmpx functions, and those stubs are provided in the libc crate version 0.2.172. Thus let's enable the feature so that it can compile with musl. Note that those stubs always return a success exit value, and commands such as "users" will report an empty list of users, when calling those stubs.
This is consistent with the behavior of GNU coreutils which does the same thing.
The coreutils utillities using utmpx are "pinky", "uptime", "users", "who". This is the expected behavior when using those utilities compiled with those musl utmpx stubs:
Closes #1361