]> TLD Linux GIT Repositories - packages/syslog-ng.git/commitdiff
- file seek fix from upstream, deleted unused patches, seem to work fine
authorMarcin Krol <hawk@tld-linux.org>
Mon, 21 Apr 2025 19:56:40 +0000 (21:56 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 21 Apr 2025 19:56:40 +0000 (21:56 +0200)
bison.patch [deleted file]
file_seek.patch [new file with mode: 0644]
shebang.patch [deleted file]
syslog-ng.spec

diff --git a/bison.patch b/bison.patch
deleted file mode 100644 (file)
index 7363c5e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp -x '*.orig' syslog-ng-syslog-ng-4.8.0.org/Makefile.am syslog-ng-syslog-ng-4.8.0/Makefile.am
---- syslog-ng-syslog-ng-4.8.0.org/Makefile.am  2024-07-23 13:41:56.000000000 +0200
-+++ syslog-ng-syslog-ng-4.8.0/Makefile.am      2024-08-18 17:09:08.425595005 +0200
-@@ -24,7 +24,7 @@
- SUBDIRS                       =
- DIST_SUBDIRS          =
- AM_MAKEFLAGS          = --no-print-directory
--AM_YFLAGS             = -Wno-yacc -Wno-other -Werror=conflicts-sr -Werror=conflicts-rr -Wcounterexamples
-+AM_YFLAGS             = -Wnone -Werror=conflicts-sr -Werror=conflicts-rr -Wcounterexamples
- AM_TESTS_ENVIRONMENT  = top_srcdir="$(top_srcdir)" CRITERION_TEST_PATTERN='!(*/*performance*)' ASAN_OPTIONS="detect_odr_violation=0"
- if ENABLE_SANITIZER
diff --git a/file_seek.patch b/file_seek.patch
new file mode 100644 (file)
index 0000000..c4cf17f
--- /dev/null
@@ -0,0 +1,42 @@
+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 --git a/shebang.patch b/shebang.patch
deleted file mode 100644 (file)
index f3744c9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -urNp -x '*.orig' syslog-ng-syslog-ng-4.8.0.org/lib/merge-grammar.py syslog-ng-syslog-ng-4.8.0/lib/merge-grammar.py
---- syslog-ng-syslog-ng-4.8.0.org/lib/merge-grammar.py 2024-07-23 13:41:56.000000000 +0200
-+++ syslog-ng-syslog-ng-4.8.0/lib/merge-grammar.py     2024-08-18 17:09:09.933622711 +0200
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python3
-+#!/usr/bin/python3
- #############################################################################
- # Copyright (c) 2010-2017 Balabit
- #
index 5dd4d2555ef91bbe43f7d87707cde54f972f81f1..eab9d2a47d8edfa199b1d0394884be51aeb86973 100644 (file)
@@ -36,7 +36,7 @@ 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
-Release:       0.1
+Release:       1
 License:       GPL v2+ with OpenSSL exception
 Group:         Daemons
 #Source0Download: https://github.com/syslog-ng/syslog-ng/releases
@@ -64,8 +64,8 @@ Patch4:               man-paths.patch
 Patch5:                %{name}-link.patch
 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
@@ -418,6 +418,7 @@ rmdir lib/ivykis
 %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