-
Notifications
You must be signed in to change notification settings - Fork 30
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
NetBSD support #84
NetBSD support #84
Conversation
Please note that I have modified this PR quite a bit to be more descriptive and convey all the information I have about the NetBSD target. |
@Byron Thanks for you support.
This is unknown territory for me, so I've asked for a review on my patch to
|
@Byron PR submitted to When both PRs are merged, we can enable the trash feature on the packages that are currently built with it disabled. |
Thanks for the update, and for seeing it through! It's much appreciated. |
Not a git wizard, have no clue on how to squash non-consecutive commits so, rust-lang/libc#3361 Regarding the CI, both NetBSD and OpenBSD have been added to cirrus-ci, https://cirrus-ci.com/build/6221284932583424
|
@Byron I'm clearly missing something 😞 rust-lang/libc#3361 (comment) |
My best guess is that on linux, this function isn't used because it's not actually accessible from the crate-root anymore, maybe due to compile-time conditionals. It's definitely not easy to deal with software that builds on so many platforms. |
Thanks! I'm getting the same but, as a warning, not an error:
So yes, I'm defining two functions that are never used. Still, it solves my issue compiling |
@Byron 😄
|
backtrace definitions and support for getmntinfo and getvfsstat After the failures of merging #3361 as a follow-up to #3359 I've spent sometime making sure everything is indeed supported and defined. ``` ~> grep -r "MNT_WAIT" /usr/include/sys/fstypes.h; grep -r "MNT_NOWAIT" /usr/include/sys/fstypes.h; grep -r "MNT_LAZY" /usr/include/sys/fstypes.h #define MNT_WAIT 1 /* synchronously wait for I/O to complete */ #define MNT_NOWAIT 2 /* start all I/O, but do not wait for it */ #define MNT_LAZY 3 /* push data not written by filesystem syncer */ ``` ``` ~> grep -r "getmntinfo" /usr/include/sys/; grep -r "getvfsstat" /usr/include/sys/ /usr/include/sys/statvfs.h:int getmntinfo(struct statvfs **, int) /usr/include/sys/statvfs.h: __RENAME(__getmntinfo90); /usr/include/sys/fstypes.h: * waitfor flags to vfs_sync() and getvfsstat() /usr/include/sys/statvfs.h:int getvfsstat(struct statvfs *, size_t, int) /usr/include/sys/statvfs.h: __RENAME(__getvfsstat90); /usr/include/sys/syscall.h:/* syscall: "compat_90_getvfsstat" ret: "int" args: "struct statvfs90 *" "size_t" "int" */ /usr/include/sys/syscall.h:#define SYS_compat_90_getvfsstat 356 /usr/include/sys/syscall.h:/* syscall: "__getvfsstat90" ret: "int" args: "struct statvfs *" "size_t" "int" */ /usr/include/sys/syscall.h:#define SYS___getvfsstat90 483 /usr/include/sys/syscallargs.h:struct compat_90_sys_getvfsstat_args { /usr/include/sys/syscallargs.h:check_syscall_args(compat_90_sys_getvfsstat) /usr/include/sys/syscallargs.h:struct sys___getvfsstat90_args { /usr/include/sys/syscallargs.h:check_syscall_args(sys___getvfsstat90) /usr/include/sys/syscallargs.h:int compat_90_sys_getvfsstat(struct lwp *, const struct compat_90_sys_getvfsstat_args *, register_t *); /usr/include/sys/syscallargs.h:int sys___getvfsstat90(struct lwp *, const struct sys___getvfsstat90_args *, register_t *); ``` Also, I've made sure the code compiles with rustc 1.72.0 without warning or errors. ``` ~> cargo build --release Updating crates.io index Compiling libc v0.2.148 (/home/pin/Git/libc) Finished release [optimized] target(s) in 8.87s ``` Moreover, the _move to trash_ functionality has again been verified using [simp](https://github.com/Kl4rry/simp) compiled with this commit as patch, in combination with the patch submited to [trash-rs](Byron/trash-rs#84). `@JohnTitor` Please give bors another try
@Byron rust-lang/libc PR has been merged, rust-lang/libc#3368 (comment) |
Thanks for the update. |
@Byron I think it's unreasonable to wait with this PR until a fix for DragonFly comes-up. Looking at the definitions that Now, I don't use DragonFly and doing things in the blind, without a test environment is tough and, most probably not advisable, as it could make things worst. To fix this we need someone with insights into DragonFly which, may or, may not show-up. I don't see why we need to wait for this, another PR to fix DragonFly could come at a later point. |
Thanks again! I think once there is anything I should do, you'd have to spell it out for me. All I have is to look at the tasks in the PR description - from what I can gather, we'd now wait until |
😆 Will do.
Correct. Once As for DragonFly, someone with a native environment needs to add the missing bits to the
Nah! You didn't create them at all. For NetBSD, there were missing pieces both on Hope it's clear and sorry if I wasn't before. I'll ping you once a new release of the |
Thanks for the clarification, sounds good! |
Thanks for the update. Can you mark the required |
Fixed:
DragonFly issue needs fixing in |
Test if it makes the CI happy
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 for all the effort that went into this!
I will create a new release soon.
The improvement is now available in the new release. |
Thank you! |
A step closer to fix #83
@Byron don't know if it's feasible with a partial fix but, the remaining issue needs to be fixed in
libc
crate.Tasks
statvfs
callslibc::getmntinfo
orlibc::get_mount_points
Warning
CI doesn't currently test that target, and it being green falsely suggests that this PR works as is.