-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add wrappers for futimens(2) and utimesat(2) #944
Conversation
utimes(2) is obsolete. futimens and utimensat are the newer replacements. So you should be using one of those instead. Or are you working on an OS that doesn't have them? |
Why is But I can change this to implement the other two calls if you prefer; I'm not bound to using |
Grr, except that |
Sent PR for libc in rust-lang/libc#1084. |
Alright, dependent PR addressed, so updated this one with new wrappers as you proposed. |
Sigh. It looks like libc needs a PR for FreeBSD, too. |
Sent rust-lang/libc#1085 for FreeBSD and DragonFly. |
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Expose futimens and utimensat on FreeBSD and DragonFly Should have sent this out with #1084 but I didn't notice then that these were missing (see nix-rust/nix#944). Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
Dependent libc change submitted. Forced a push to the PR to trigger another CI run here. |
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.
Apart from that one malformed comment, it LGTM.
Thanks. But one more thing: please add an entry in CHANGELOG. |
717debc
to
2be6bec
Compare
CHANGELOG entry added and branch rebased on master to avoid conflicts. |
Thanks for your contribution. |
944: Add wrappers for futimens(2) and utimesat(2) r=asomers a=jmmv Hello again! Let's see how this looks like. I don't think there is any other way of doing this via the standard library, though I see there is a `filetime` crate in the Rust nursery to add this missing functionality. Not sure what your policy for adding features into `nix` is. Co-authored-by: Julio Merino <jmmv@google.com>
Ugh, I wasn't expecting the original message in the PR review thread would appear in the commit message :-( I guess I know for next time. |
And more: I just found out the hard way that What's the policy for |
Nix doesn't attempt to guarantee consistent features across different OSes and versions, since its objective is simply to expose OS functionality. If a Nix function returns ENOSYS on older OSes, that's fine. |
But then, would it be OK to also implement |
Yeah, I think that's ok. |
PR nix-rust#944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems.
PR nix-rust#944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems.
946: Add a wrapper for utimes(2) r=asomers a=jmmv PR #944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. Co-authored-by: Julio Merino <julio@meroh.net>
PR nix-rust#944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR nix-rust#946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed.
PR nix-rust#944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR nix-rust#946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed.
PR nix-rust#944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR nix-rust#946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed.
967: Add a wrapper for lutimes(2) r=asomers a=jmmv PR #944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR #946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed. Co-authored-by: Julio Merino <julio@meroh.net>
PR nix-rust#944 added wrappers for the more-modern futimens(2) and utimesat(2), but unfortunately these APIs are not available on old-ish systems. In particular, macOS Sierra and below don't implement them, making the new APIs unusable. Whether we should care about such "old" systems is debatable, but the problem is that, at the moment, this is the only macOS version usable on Travis to test kexts and, thus, to test FUSE file systems. This should have been part of PR nix-rust#946, which added a wrapper for utimes(2) following this same rationale, but missed lutimes(2) because I simply didn't notice it existed.
Hello again!
Let's see how this looks like. I don't think there is any other way of doing this via the standard library, though I see there is a
filetime
crate in the Rust nursery to add this missing functionality. Not sure what your policy for adding features intonix
is.