+++ /dev/null
-diff --git a/modules/affile/file-reader.c b/modules/affile/file-reader.c
-index 712bac5c91a..203c2086d35 100644
---- a/modules/affile/file-reader.c
-+++ b/modules/affile/file-reader.c
-@@ -163,10 +163,26 @@ _recover_state(LogPipe *s, GlobalConfig *cfg, LogProtoServer *proto)
- }
-
- static gboolean
--_can_check_eof(gint fd)
-+_can_check_eof(FileReader *self, gint fd)
- {
- struct stat st;
-- return fstat(fd, &st) == 0 && S_ISFIFO(st.st_mode) == 0;
-+
-+ if (fstat(fd, &st) == -1 || S_ISFIFO(st.st_mode) || S_ISSOCK(st.st_mode) || S_ISCHR(st.st_mode))
-+ return FALSE;
-+
-+ off_t pos = lseek(fd, 0, SEEK_CUR);
-+ if (pos == -1)
-+ return FALSE;
-+
-+ off_t reset = lseek(fd, pos, SEEK_SET);
-+ if (reset != pos)
-+ {
-+ msg_trace("File seek pos is different after testing if seekable",
-+ evt_tag_str("follow_filename", self->filename->str),
-+ evt_tag_int("fn", fd));
-+ }
-+
-+ return TRUE;
- }
-
- static gboolean
-@@ -263,7 +279,7 @@ _construct_poll_events(FileReader *self, gint fd)
- return NULL;
- }
-
-- if (_can_check_eof(fd))
-+ if (_can_check_eof(self, fd))
- poll_events_set_checker(poll_events, _reader_check_watches, self);
-
- return poll_events;
diff -urNp -x '*.orig' syslog-ng-syslog-ng-4.8.0.org/configure.ac syslog-ng-syslog-ng-4.8.0/configure.ac
--- syslog-ng-syslog-ng-4.8.0.org/configure.ac 2024-08-18 17:09:04.681526217 +0200
+++ syslog-ng-syslog-ng-4.8.0/configure.ac 2024-08-18 17:09:04.841529157 +0200
-@@ -2164,7 +2164,7 @@ if test "x$linking_mode" = "xdynamic"; t
+@@ -2208,7 +2210,7 @@
# syslog-ng binary is linked with the default link command (e.g. libtool)
SYSLOGNG_LINK='$(LINK)'
else
-- SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $EVTLOG_NO_LIBTOOL_LIBS $SECRETSTORAGE_NO_LIBTOOL_LIBS $LD_START_STATIC -Wl,${WHOLE_ARCHIVE_OPT} $GLIB_LIBS $PCRE2_LIBS $REGEX_LIBS -Wl,${NO_WHOLE_ARCHIVE_OPT} $IVYKIS_NO_LIBTOOL_LIBS $LD_END_STATIC $LIBCAP_LIBS $DL_LIBS"
-+ SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $EVTLOG_NO_LIBTOOL_LIBS $SECRETSTORAGE_NO_LIBTOOL_LIBS $LD_START_STATIC -Wl,${WHOLE_ARCHIVE_OPT} $GLIB_LIBS $PCRE2_LIBS $REGEX_LIBS -Wl,${NO_WHOLE_ARCHIVE_OPT} $LD_END_STATIC $IVYKIS_LIBS $LIBCAP_LIBS $DL_LIBS"
+- SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $EVTLOG_NO_LIBTOOL_LIBS $SECRETSTORAGE_NO_LIBTOOL_LIBS $LD_START_STATIC -Wl,${WHOLE_ARCHIVE_OPT} $GLIB_LIBS $PCRE2_LIBS $REGEX_LIBS -Wl,${NO_WHOLE_ARCHIVE_OPT} $IVYKIS_NO_LIBTOOL_LIBS $LD_END_STATIC $LIBCAP_LIBS $DL_LIBS $LIBUNWIND_LIBS"
++ SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $EVTLOG_NO_LIBTOOL_LIBS $SECRETSTORAGE_NO_LIBTOOL_LIBS $LD_START_STATIC -Wl,${WHOLE_ARCHIVE_OPT} $GLIB_LIBS $PCRE2_LIBS $REGEX_LIBS -Wl,${NO_WHOLE_ARCHIVE_OPT} $LD_END_STATIC $IVYKIS_LIBS $LIBCAP_LIBS $DL_LIBS"
TOOL_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $SECRETSTORAGE_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE2_LIBS $REGEX_LIBS $IVYKIS_LIBS $DL_LIBS"
CORE_DEPS_LIBS=""
%define libivykis_version 0.43.2
%define glib2_ver 1:2.32.0
-%define mver 4.8
+%define mver 4.9
Summary: Syslog-ng - new generation of the system logger
Summary(pl.UTF-8): Syslog-ng - systemowy demon logujący nowej generacji
Summary(pt_BR.UTF-8): Daemon de log nova geração
Name: syslog-ng
-Version: 4.8.1
+Version: 4.9.0
Release: 1
License: GPL v2+ with OpenSSL exception
Group: Daemons
#Source0Download: https://github.com/syslog-ng/syslog-ng/releases
Source0: https://github.com/syslog-ng/syslog-ng/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 6a5852343f9a34449c3812b474728aa7
+# Source0-md5: 83e9f6daac2b5767da6232e68067a6e0
Source1: %{name}.init
Source2: %{name}.conf
Source3: %{name}.logrotate
Patch6: no_shared_ivykis.patch
Patch7: 32bit.patch
Patch9: glib-static.patch
-Patch10: file_seek.patch
URL: https://syslog-ng.org/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
%patch -P6 -p1
%patch -P7 -p1
%patch -P9 -p1
-%patch -P10 -p1
%{__sed} -i -e 's|/usr/bin/awk|/bin/awk|' scl/syslogconf/convert-syslogconf.awk
%{__sed} -i -e '1s,/usr/bin/env python3$,%{__python3},' lib/merge-grammar.py
--enable-smtp%{!?with_smtp:=no} \
--enable-spoof-source \
--enable-ssl \
+ --disable-stackdump \
--enable-systemd=no \
--with-systemd-journal=auto \
--enable-tcp-wrapper \