Skip to content

Packaging test run for fluent/fluent-bit#12811 - #1

Open
jakethehoffer wants to merge 8 commits into
masterfrom
qnx-build-support
Open

jakethehoffer wants to merge 8 commits into
masterfrom
qnx-build-support

Conversation

@jakethehoffer

Copy link
Copy Markdown
Owner

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.

jakethehoffer and others added 8 commits November 18, 2026 04:14
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>
@jakethehoffer jakethehoffer added the ok-package-test Run packaging tests label Nov 19, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-19T16:05:24.198863Z
We couldn’t complete this review. Comment @codex review to try again.
2ccbbad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@jakethehoffer jakethehoffer added ok-package-test Run packaging tests and removed ok-package-test Run packaging tests labels Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-package-test Run packaging tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant