-
Notifications
You must be signed in to change notification settings - Fork 68
update-api-time #452
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
base: master
Are you sure you want to change the base?
update-api-time #452
Conversation
osa1
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.
These changes are not right. time::now returns in local time zone. E.g. it returns 8:39 for me right now. now_utc returns in UTC, e.g. it returns 7:39 at the same time.
Is this patch being used right now in Debian? It would be unfortunate if you already shipped this.
|
|
||
| match fcntl(libc::STDIN_FILENO, FcntlArg::F_SETFL(new_stdin_flags)) { | ||
| let stdin_fd = unsafe { std::os::fd::BorrowedFd::borrow_raw(libc::STDIN_FILENO) }; | ||
| match fcntl(stdin_fd.as_raw_fd(), FcntlArg::F_SETFL(new_stdin_flags)) { |
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.
The changes in this file are unrelated. Are they needed to build tiny on Debian? Why?
Please revert them from this PR as they're not related to the time library.
| tls_connector(sasl).connect(name.clone(), tcp_stream).await? | ||
| } else { | ||
| TLS_CONNECTOR.connect(name, tcp_stream).await? | ||
| TLS_CONNECTOR.connect(name.clone(), tcp_stream).await? |
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.
Unrelated changes in this file. Please revert the file.
|
Hi!
@@ -528,11 +530,12 @@ fn set_stdin_nonblocking() -> Option<OFlag> {
let mut new_stdin_flags = current_stdin_flags;
new_stdin_flags.set(OFlag::O_NONBLOCK, true);
- match fcntl(libc::STDIN_FILENO, FcntlArg::F_SETFL(new_stdin_flags)) {
+ let stdin_fd = unsafe { std::os::fd::BorrowedFd::borrow_raw(libc::STDIN_FILENO) };
+ match fcntl(stdin_fd.as_raw_fd(), FcntlArg::F_SETFL(new_stdin_flags)) {
The changes in this file are unrelated. Are they needed to build tiny on Debian? Why?
This change is for you to apply, if you wish.
It basically changes how the stdin file descriptor is handled, migrating from a raw integer to Rust's BorrowedFd type.
From what I've researched, new Rust APIs (like std::os::fd) require these types instead of raw integers.
This also prepares the code for future Rust updates, not to mention the security factor, something Debian places a strong emphasis on.
But feel free.
As I said before,
The patches we make in Debian are intended to adapt them to our environment.
That's why I didn't send them all to you beforehand. But since you requested it, I did.
There are upstream users who don't like us applying patches to their code, finding it invasive.
Therefore, we maintainers only do this when the Debian developer requests it, or when the developer themselves requests it.
I hope I'm contributing to tiny, I really liked it.
Nilson F. Silva
________________________________
De: Ömer Sinan Ağacan ***@***.***>
Enviado: sexta-feira, 17 de outubro de 2025 04:41
Para: osa1/tiny ***@***.***>
Cc: Nilsonfsilva ***@***.***>; Author ***@***.***>
Assunto: Re: [osa1/tiny] update-api-time (PR #452)
@osa1 commented on this pull request.
These changes are not right. time::now returns in local time zone. E.g. it returns 8:39 for me right now. now_utc returns in UTC, e.g. it returns 7:39 at the same time.
Is this patch being used right now in Debian? It would be unfortunate if you already shipped this.
________________________________
In crates/term_input/src/lib.rs<#452 (comment)>:
@@ -528,11 +530,12 @@ fn set_stdin_nonblocking() -> Option<OFlag> {
let mut new_stdin_flags = current_stdin_flags;
new_stdin_flags.set(OFlag::O_NONBLOCK, true);
- match fcntl(libc::STDIN_FILENO, FcntlArg::F_SETFL(new_stdin_flags)) {
+ let stdin_fd = unsafe { std::os::fd::BorrowedFd::borrow_raw(libc::STDIN_FILENO) };
+ match fcntl(stdin_fd.as_raw_fd(), FcntlArg::F_SETFL(new_stdin_flags)) {
The changes in this file are unrelated. Are they needed to build tiny on Debian? Why?
Please revert them from this PR as they're not related to the time library.
________________________________
In crates/libtiny_client/src/stream.rs<#452 (comment)>:
} else {
- TLS_CONNECTOR.connect(name, tcp_stream).await?
+ TLS_CONNECTOR.connect(name.clone(), tcp_stream).await?
Unrelated changes in this file. Please revert the file.
—
Reply to this email directly, view it on GitHub<#452 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVZIS72YQCIZERLLO3WGTZL3YCMTPAVCNFSM6AAAAACJNP2LF2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGNBYGY4TCNBZHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi!
As promised, here's the PR. Remembering that the changes were made starting with release 0.13.0.