Repository navigation
Packaging test run for fluent/fluent-bit#12811 - #1
Open
jakethehoffer wants to merge 8 commits into
Open
jakethehoffer wants to merge 8 commits into
jakethehoffer wants to merge 8 commits into
Conversation
On QNX Neutrino (SDP 8.0) the BSD socket calls, including accept4(), live in libsocket and inotify lives in libfsnotify. Neither is part of libc, so the configure probes FLB_HAVE_ACCEPT4, FLB_HAVE_INOTIFY and FLB_HAVE_UNIX_SOCKET fail to link and wrongly report the features missing, and the final link of fluent-bit fails. Define FLB_SYSTEM_QNX when CMAKE_SYSTEM_NAME is QNX, add both libraries to CMAKE_REQUIRED_LIBRARIES so the probes link, and add them to FLB_DEPS so the core links them. Nothing changes for other systems. Tested by cross-building with the QNX SDP 8.0 toolchain (qcc, gcc_ntox86_64): all three probes report 1 and fluent-bit links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
flb_coro.h defines _XOPEN_SOURCE with no value when it is not already set (macOS needs it for ucontext). QNX's <sys/platform.h> accepts only the values 500, 600 and 700 and stops with "#error This version of XOPEN_SOURCE is not supported", so every file that includes flb_coro.h fails to compile on QNX. QNX needs no such definition, so skip it when __QNXNTO__ is defined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
flb_output.h defines _XOPEN_SOURCE with no value when it is not already set. QNX's <sys/platform.h> accepts only the values 500, 600 and 700 and stops with "#error This version of XOPEN_SOURCE is not supported", so every file that includes flb_output.h fails to compile on QNX. QNX needs no such definition, so skip it when __QNXNTO__ is defined, as the same change does in flb_coro.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
openssl.c uses struct in6_addr and inet_pton() to tell IP addresses from host names. They are declared in <netinet/in.h> and <arpa/inet.h>, which the QNX OpenSSL and libc headers do not include on their own, so the file does not compile on QNX. Include both headers explicitly when __QNXNTO__ is defined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
net_address_unix_socket_peer_pid_raw() reads the peer process id of a unix socket with getsockopt(SO_PEERCRED) and struct ucred. QNX's <sys/socket.h> has no SO_PEERCRED, so the code does not compile there. Treat QNX like macOS and FreeBSD: the code that needs struct ucred and SO_PEERCRED is compiled out and the function reports that no peer pid is available. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
flb_tail_file_name() finds the path of an open file by following the symlink /proc/<pid>/fd/<fd> on Linux. QNX has no such symlink. The documented QNX way to turn an open file descriptor back into a path is iofdinfo() from <sys/iomgr.h>; with _FDINFO_FLAG_LOCALPATH it returns the path as the local filesystem sees it. Add a QNX branch that calls iofdinfo(), fails on an error or a truncated path, and terminates the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
tail_fs_add() asks inotify for IN_ATTRIB | IN_IGNORED | IN_MODIFY | IN_Q_OVERFLOW. IN_IGNORED and IN_Q_OVERFLOW are bits the system reports on its own; Linux ignores them in a request. The QNX inotify service rejects them, so inotify_add_watch() fails with EINVAL and tail cannot follow the file. Request only IN_ATTRIB | IN_MODIFY on QNX. The other two bits are still delivered in events, and IN_MOVE_SELF is added for rotation checks as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
iofdinfo() returns the size needed to store the path, which is the path length plus one for the terminating NUL, and the path it writes is always NUL terminated. The check from the previous commit compared that size with PATH_MAX using >=, so a path of PATH_MAX - 1 bytes was rejected although it fits, and the extra terminator write was not needed. Reject only sizes greater than PATH_MAX and drop the extra write. On the QNX 8.0 target, tail now reads a file whose absolute path is 1023 bytes long. Before this change it read no lines from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jake Hoffman <122403457+jakethehoffer@users.noreply.github.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs the upstream packaging workflow (pr-package-tests.yaml) on the same head as fluent#12811. That workflow only runs for same-repo branches, so it skipped on the upstream fork PR. Not for merge.