public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2018-09-20 22:37 Thomas Deutschmann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2018-09-20 22:37 UTC (permalink / raw
  To: gentoo-commits

commit:     a6b83f082a08073c99ad5e8b0a8564fb30083816
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 22:36:53 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Sep 20 22:37:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6b83f08

app-admin/rsyslog: fix omprog-output-capture-mt test when using Py3

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 ...-8.38.0-fix-omprog-output-capture-mt-test.patch | 66 ++++++++++++++++++++++
 app-admin/rsyslog/rsyslog-8.38.0.ebuild            |  2 +-
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/app-admin/rsyslog/files/rsyslog-8.38.0-fix-omprog-output-capture-mt-test.patch b/app-admin/rsyslog/files/rsyslog-8.38.0-fix-omprog-output-capture-mt-test.patch
new file mode 100644
index 00000000000..c78e0e502d4
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.38.0-fix-omprog-output-capture-mt-test.patch
@@ -0,0 +1,66 @@
+From 0b0a1262f2b401ea16b7d0b36d8254c500cb9d8e Mon Sep 17 00:00:00 2001
+From: Joan Sala <jsiwrk@gmail.com>
+Date: Thu, 20 Sep 2018 22:37:58 +0200
+Subject: [PATCH] testbench: fix incompatibility of one omprog test with
+ Python3
+
+Python3 writes to stderr immediately, and this caused the
+captured output to differ with respect to Python2. Simplified
+the test to do a single write to stderr. Also a cast to int
+was needed when calculating 'numRepeats'.
+
+closes #3030
+---
+ tests/omprog-output-capture-mt.sh               |  2 +-
+ .../testsuites/omprog-output-capture-mt-bin.py  | 17 +++++++----------
+ 2 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/tests/omprog-output-capture-mt.sh b/tests/omprog-output-capture-mt.sh
+index 50f5c6354..080fabd2a 100755
+--- a/tests/omprog-output-capture-mt.sh
++++ b/tests/omprog-output-capture-mt.sh
+@@ -24,7 +24,7 @@ else
+     LINE_LENGTH=511   # 512 minus 1 byte (for the newline char)
+ fi
+ 
+-export command_line="/usr/bin/stdbuf -oL -eL $srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH"
++export command_line="/usr/bin/stdbuf -oL $srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH"
+ 
+ check_command_available stdbuf
+ generate_conf
+diff --git a/tests/testsuites/omprog-output-capture-mt-bin.py b/tests/testsuites/omprog-output-capture-mt-bin.py
+index 6c81da24b..03097f37b 100755
+--- a/tests/testsuites/omprog-output-capture-mt-bin.py
++++ b/tests/testsuites/omprog-output-capture-mt-bin.py
+@@ -10,7 +10,7 @@
+ logLine = sys.stdin.readline()
+ while logLine:
+     logLine = logLine.strip()
+-    numRepeats = lineLength / len(logLine)
++    numRepeats = int(lineLength / len(logLine))
+     lineToStdout = (linePrefix + "[stdout] " + logLine*numRepeats)[:lineLength]
+     lineToStderr = (linePrefix + "[stderr] " + logLine*numRepeats)[:lineLength]
+ 
+@@ -22,16 +22,13 @@
+     # size of the block buffer is generally greater than PIPE_BUF).
+     sys.stdout.write(lineToStdout + "\n")
+ 
+-    # Write to stderr using two writes. Since stderr is unbuffered, each write will be written
+-    # immediately to the pipe, and this will cause intermingled lines in the output file.
+-    # However, we avoid this by executing this script with 'stdbuf -eL', which forces line
+-    # buffering for stderr. We could alternatively do a single write.
+-    sys.stderr.write(lineToStderr)
+-    sys.stderr.write("\n")
++    # Write to stderr using a single write. Since stderr is unbuffered, each write will be
++    # written immediately (and atomically) to the pipe.
++    sys.stderr.write(lineToStderr + "\n")
+ 
+-    # Note: In future versions of Python3, stderr will possibly be line buffered (see
+-    # https://bugs.python.org/issue13601).
+-    # Note: When writing to stderr using the Python logging module, it seems that line
++    # Note (FTR): In future versions of Python3, stderr will possibly be line buffered (see
++    # https://bugs.python.org/issue13601). The previous write will also be atomic in this case.
++    # Note (FTR): When writing to stderr using the Python logging module, it seems that line
+     # buffering is also used (although this could depend on the Python version).
+ 
+     logLine = sys.stdin.readline()

diff --git a/app-admin/rsyslog/rsyslog-8.38.0.ebuild b/app-admin/rsyslog/rsyslog-8.38.0.ebuild
index 6df02d0bab4..c8801a0aef2 100644
--- a/app-admin/rsyslog/rsyslog-8.38.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.38.0.ebuild
@@ -23,7 +23,7 @@ else
 		doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
 	"
 
-	PATCHES=()
+	PATCHES=( "${FILESDIR}"/${P}-fix-omprog-output-capture-mt-test.patch )
 fi
 
 LICENSE="GPL-3 LGPL-3 Apache-2.0"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2018-11-03 22:42 Thomas Deutschmann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2018-11-03 22:42 UTC (permalink / raw
  To: gentoo-commits

commit:     cd9eb4e731adfdc7e013c6cea127555f55739f9d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  3 22:38:47 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Nov  3 22:42:27 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd9eb4e7

app-admin/rsyslog: fix automagic dependency on dev-libs/liblogging

Closes: https://bugs.gentoo.org/667836
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...slog-8.39.0-fix-liblogging_stdlog-linking.patch | 321 +++++++++++++++++++++
 ...slog-8.38.0.ebuild => rsyslog-8.38.0-r1.ebuild} |   1 +
 app-admin/rsyslog/rsyslog-8.39.0.ebuild            |   3 +
 3 files changed, 325 insertions(+)

diff --git a/app-admin/rsyslog/files/rsyslog-8.39.0-fix-liblogging_stdlog-linking.patch b/app-admin/rsyslog/files/rsyslog-8.39.0-fix-liblogging_stdlog-linking.patch
new file mode 100644
index 00000000000..6ccf8f0252d
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.39.0-fix-liblogging_stdlog-linking.patch
@@ -0,0 +1,321 @@
+https://github.com/rsyslog/rsyslog/pull/3240
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1436,6 +1436,12 @@ fi
+ AM_CONDITIONAL(ENABLE_KSI_LS12, test x$enable_ksi_ls12 = xyes)
+ 
+ # liblogging-stdlog support
++# we use liblogging-stdlog inside the testbench, which is why we need to check for it in any case
++PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3,
++	AC_DEFINE(HAVE_LIBLOGGING_STDLOG, 1, [Define to 1 if liblogging-stdlog is available.]),
++	[AC_MSG_NOTICE([liblogging-stdlog not found, parts of the testbench will not run])]
++)
++
+ AC_ARG_ENABLE(liblogging-stdlog,
+         [AS_HELP_STRING([--enable-liblogging-stdlog],[Enable liblogging-stdlog support @<:@default=no@:>@])],
+         [case "${enableval}" in
+@@ -1445,18 +1451,15 @@ AC_ARG_ENABLE(liblogging-stdlog,
+          esac],
+         [enable_liblogging_stdlog=no]
+ )
++if test "x$enable_liblogging_stdlog" = "xyes" -a "x$HAVE_LIBLOGGING_STDLOG" != "x1"; then
++	AC_MSG_ERROR(--enable-liblogging-stdlog set but liblogging was not found)
++fi
++AM_CONDITIONAL(ENABLE_LIBLOGGING_STDLOG, [test "x$enable_liblogging_stdlog" = "xyes"])
+ if test "x$enable_liblogging_stdlog" = "xyes"; then
+-	PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3,
+-		AC_DEFINE(HAVE_LIBLOGGING_STDLOG, 1, [Define to 1 if liblogging-stdlog is available.])
+-	)
++	AC_MSG_NOTICE(DEBUG: liblogging_stdlog enabled)
++else
++	AC_MSG_NOTICE(DEBUG: liblogging_stdlog disabled)
+ fi
+-AM_CONDITIONAL(ENABLE_LIBLOGGING_STDLOG, test x$enable_liblogging_stdlog = xyes)
+-
+-# we use liblogging-stdlog inside the testbench, which is why we need to check for it in any case
+-PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3,
+-	AC_DEFINE(HAVE_LIBLOGGING_STDLOG, 1, [Define to 1 if liblogging-stdlog is available.]),
+-	[AC_MSG_NOTICE([liblogging-stdlog not found, parts of the testbench will not run])]
+-)
+ 
+ # RFC 3195 support
+ AC_ARG_ENABLE(rfc3195,
+--- a/plugins/imklog/Makefile.am
++++ b/plugins/imklog/Makefile.am
+@@ -10,6 +10,11 @@ if ENABLE_IMKLOG_LINUX
+ imklog_la_SOURCES += bsd.c
+ endif
+ 
+-imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-imklog_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++imklog_la_LDFLAGS = -module -avoid-version
+ imklog_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++imklog_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++imklog_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+--- a/plugins/immark/Makefile.am
++++ b/plugins/immark/Makefile.am
+@@ -1,6 +1,11 @@
+ pkglib_LTLIBRARIES = immark.la
+ 
+ immark_la_SOURCES = immark.c immark.h
+-immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-immark_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS)
++immark_la_LDFLAGS = -module -avoid-version
+ immark_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++immark_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++immark_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+--- a/plugins/imtcp/Makefile.am
++++ b/plugins/imtcp/Makefile.am
+@@ -1,6 +1,11 @@
+ pkglib_LTLIBRARIES = imtcp.la
+ 
+ imtcp_la_SOURCES = imtcp.c
+-imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-imtcp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++imtcp_la_LDFLAGS = -module -avoid-version
+ imtcp_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++imtcp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++imtcp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+--- a/plugins/imudp/Makefile.am
++++ b/plugins/imudp/Makefile.am
+@@ -1,6 +1,11 @@
+ pkglib_LTLIBRARIES = imudp.la
+ 
+ imudp_la_SOURCES = imudp.c
+-imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-imudp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++imudp_la_LDFLAGS = -module -avoid-version
+ imudp_la_LIBADD = $(IMUDP_LIBS)
++
++if ENABLE_LIBLOGGING_STDLOG
++imudp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++imudp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+--- a/plugins/imuxsock/Makefile.am
++++ b/plugins/imuxsock/Makefile.am
+@@ -1,6 +1,11 @@
+ pkglib_LTLIBRARIES = imuxsock.la
+ 
+ imuxsock_la_SOURCES = imuxsock.c
+-imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-imuxsock_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++imuxsock_la_LDFLAGS = -module -avoid-version
+ imuxsock_la_LIBADD =
++
++if ENABLE_LIBLOGGING_STDLOG
++imuxsock_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++imuxsock_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+--- a/plugins/mmexternal/Makefile.am
++++ b/plugins/mmexternal/Makefile.am
+@@ -1,8 +1,13 @@
+ pkglib_LTLIBRARIES = mmexternal.la
+ 
+ mmexternal_la_SOURCES = mmexternal.c
+-mmexternal_la_CPPFLAGS =  $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-mmexternal_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++mmexternal_la_CPPFLAGS =  $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
++mmexternal_la_LDFLAGS = -module -avoid-version
+ mmexternal_la_LIBADD = 
+ 
++if ENABLE_LIBLOGGING_STDLOG
++mmexternal_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++mmexternal_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
++
+ EXTRA_DIST = 
+--- a/plugins/omtesting/Makefile.am
++++ b/plugins/omtesting/Makefile.am
+@@ -1,6 +1,11 @@
+ pkglib_LTLIBRARIES = omtesting.la
+ 
+ omtesting_la_SOURCES = omtesting.c
+-omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-omtesting_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++omtesting_la_LDFLAGS = -module -avoid-version
+ omtesting_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++omtesting_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++omtesting_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -112,8 +112,15 @@ else
+ librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I\$(top_srcdir) -I\$(top_srcdir)/grammar
+ endif
+ #librsyslog_la_LDFLAGS = -module -avoid-version
+-librsyslog_la_CPPFLAGS += $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBUUID_CFLAGS) $(LIBFASTJSON_CFLAGS) ${LIBESTR_CFLAGS} ${LIBLOGGING_STDLOG_CFLAGS} -I\$(top_srcdir)/tools
+-librsyslog_la_LIBADD =  $(DL_LIBS) $(RT_LIBS) $(LIBUUID_LIBS) $(LIBFASTJSON_LIBS) ${LIBESTR_LIBS} ${LIBLOGGING_STDLOG_LIBS}
++librsyslog_la_CPPFLAGS += $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBUUID_CFLAGS) $(LIBFASTJSON_CFLAGS) ${LIBESTR_CFLAGS}
++librsyslog_la_LIBADD =  $(DL_LIBS) $(RT_LIBS) $(LIBUUID_LIBS) $(LIBFASTJSON_LIBS) ${LIBESTR_LIBS}
++
++if ENABLE_LIBLOGGING_STDLOG
++librsyslog_la_CPPFLAGS += ${LIBLOGGING_STDLOG_CFLAGS}
++librsyslog_la_LIBADD += $(LIBLOGGING_STDLOG_LIBS)
++endif
++
++librsyslog_la_CPPFLAGS += -I\$(top_srcdir)/tools
+ 
+ #
+ # regular expression support
+@@ -121,9 +128,15 @@ librsyslog_la_LIBADD =  $(DL_LIBS) $(RT_LIBS) $(LIBUUID_LIBS) $(LIBFASTJSON_LIBS
+ if ENABLE_REGEXP
+ pkglib_LTLIBRARIES += lmregexp.la
+ lmregexp_la_SOURCES = regexp.c regexp.h
+-lmregexp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmregexp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
+-lmregexp_la_LIBADD =
++lmregexp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmregexp_la_LDFLAGS = -module -avoid-version
++lmregexp_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++lmregexp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmregexp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
++
+ endif
+ 
+ #
+@@ -131,9 +144,14 @@ endif
+ # 
+ pkglib_LTLIBRARIES += lmzlibw.la
+ lmzlibw_la_SOURCES = zlibw.c zlibw.h
+-lmzlibw_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmzlibw_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
+-lmzlibw_la_LIBADD =
++lmzlibw_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmzlibw_la_LDFLAGS = -module -avoid-version
++lmzlibw_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++lmzlibw_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmzlibw_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+ 
+ 
+ if ENABLE_INET
+@@ -142,18 +160,28 @@ pkglib_LTLIBRARIES += lmnet.la lmnetstrms.la
+ # network support
+ # 
+ lmnet_la_SOURCES = net.c net.h
+-lmnet_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmnet_la_LDFLAGS = -module -avoid-version ../compat/compat_la-getifaddrs.lo $(LIBLOGGING_STDLOG_LIBS)
+-lmnet_la_LIBADD =
++lmnet_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmnet_la_LDFLAGS = -module -avoid-version ../compat/compat_la-getifaddrs.lo
++lmnet_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++lmnet_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmnet_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+ 
+ # network stream master class and stream factory
+ lmnetstrms_la_SOURCES = netstrms.c netstrms.h \
+ 			netstrm.c netstrm.h \
+ 			nssel.c nssel.h \
+ 			nspoll.c nspoll.h
+-lmnetstrms_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmnetstrms_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
+-lmnetstrms_la_LIBADD =
++lmnetstrms_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmnetstrms_la_LDFLAGS = -module -avoid-version
++lmnetstrms_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++lmnetstrms_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmnetstrms_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
+ 
+ # netstream drivers
+ 
+@@ -162,9 +190,15 @@ pkglib_LTLIBRARIES += lmnsd_ptcp.la
+ lmnsd_ptcp_la_SOURCES = nsd_ptcp.c nsd_ptcp.h \
+ 		  	nsdsel_ptcp.c nsdsel_ptcp.h \
+ 			nsdpoll_ptcp.c nsdpoll_ptcp.h
+-lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmnsd_ptcp_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
+-lmnsd_ptcp_la_LIBADD =
++lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmnsd_ptcp_la_LDFLAGS = -module -avoid-version
++lmnsd_ptcp_la_LIBADD = 
++
++if ENABLE_LIBLOGGING_STDLOG
++lmnsd_ptcp_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmnsd_ptcp_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
++
+ endif # if ENABLE_INET
+ 
+ #
+@@ -226,20 +260,30 @@ lmtcpsrv_la_SOURCES = \
+ 	tcps_sess.h \
+ 	tcpsrv.c \
+ 	tcpsrv.h
+-lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmtcpsrv_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmtcpsrv_la_LDFLAGS = -module -avoid-version
+ lmtcpsrv_la_LIBADD = 
+ 
++if ENABLE_LIBLOGGING_STDLOG
++lmtcpsrv_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmtcpsrv_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
++
+ #
+ # TCP (stream) client support
+ #
+ lmtcpclt_la_SOURCES = \
+ 	tcpclt.c \
+ 	tcpclt.h
+-lmtcpclt_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS)
+-lmtcpclt_la_LDFLAGS = -module -avoid-version $(LIBLOGGING_STDLOG_LIBS)
++lmtcpclt_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++lmtcpclt_la_LDFLAGS = -module -avoid-version
+ lmtcpclt_la_LIBADD = 
+ 
++if ENABLE_LIBLOGGING_STDLOG
++lmtcpclt_la_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++lmtcpclt_la_LDFLAGS += $(LIBLOGGING_STDLOG_LIBS)
++endif
++
+ 
+ #
+ # support library for Guardtime KSI-LS12
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -37,7 +37,14 @@ rsyslogd_SOURCES = \
+ 	iminternal.h \
+ 	\
+ 	../dirty.h
+-rsyslogd_CPPFLAGS =  $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBLOGGING_STDLOG_CFLAGS) -DSD_EXPORT_SYMBOLS
++rsyslogd_CPPFLAGS =  $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
++
++if ENABLE_LIBLOGGING_STDLOG
++rsyslogd_CPPFLAGS += $(LIBLOGGING_STDLOG_CFLAGS)
++endif
++
++rsyslogd_CPPFLAGS += -DSD_EXPORT_SYMBOLS
++
+ # note: it looks like librsyslog.la must be explicitely given on LDDADD,
+ # otherwise dependencies are not properly calculated (resulting in a
+ # potentially incomplete build, a problem we had several times...)

diff --git a/app-admin/rsyslog/rsyslog-8.38.0.ebuild b/app-admin/rsyslog/rsyslog-8.38.0-r1.ebuild
similarity index 99%
rename from app-admin/rsyslog/rsyslog-8.38.0.ebuild
rename to app-admin/rsyslog/rsyslog-8.38.0-r1.ebuild
index 85b70fb0b96..bd4d4f30836 100644
--- a/app-admin/rsyslog/rsyslog-8.38.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.38.0-r1.ebuild
@@ -36,6 +36,7 @@ RESTRICT="!test? ( test )"
 RDEPEND="
 	>=dev-libs/libfastjson-0.99.8:=
 	>=dev-libs/libestr-0.1.9
+	>=dev-libs/liblogging-1.0.1:=[stdlog]
 	>=sys-libs/zlib-1.2.5
 	curl? ( >=net-misc/curl-7.35.0 )
 	dbi? ( >=dev-db/libdbi-0.8.3 )

diff --git a/app-admin/rsyslog/rsyslog-8.39.0.ebuild b/app-admin/rsyslog/rsyslog-8.39.0.ebuild
index a6766a584f5..625f19668b4 100644
--- a/app-admin/rsyslog/rsyslog-8.39.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.39.0.ebuild
@@ -22,6 +22,8 @@ else
 		https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
 		doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
 	"
+
+	PATCHES=( "${FILESDIR}"/${P}-fix-liblogging_stdlog-linking.patch )
 fi
 
 LICENSE="GPL-3 LGPL-3 Apache-2.0"
@@ -80,6 +82,7 @@ DEPEND="${RDEPEND}
 	>=sys-devel/autoconf-archive-2015.02.24
 	virtual/pkgconfig
 	test? (
+		>=dev-libs/liblogging-1.0.1[stdlog]
 		jemalloc? ( <sys-libs/libfaketime-0.9.7 )
 		!jemalloc? ( sys-libs/libfaketime )
 		${PYTHON_DEPS}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2019-04-05 23:53 Thomas Deutschmann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2019-04-05 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     fef17a8d569a1fc18c54240f6e1b6135f70f2550
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  5 22:42:59 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 23:53:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fef17a8d

app-admin/rsyslog: fix tests with Py3

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...03.0-add-py3-support-to-omhttp-test.patch.patch | 83 ++++++++++++++++++++++
 app-admin/rsyslog/rsyslog-8.1903.0.ebuild          |  5 +-
 2 files changed, 87 insertions(+), 1 deletion(-)

diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch.patch
new file mode 100644
index 00000000000..6600c61666e
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch.patch
@@ -0,0 +1,83 @@
+From c82b747eaf96cc77efa530ca5844ba01b91bfc88 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@whissi.de>
+Date: Sat, 6 Apr 2019 00:28:54 +0200
+Subject: [PATCH] tests: omhttp: add Python 3 compatibility
+
+Fixes: https://github.com/rsyslog/rsyslog/issues/3599
+---
+ tests/omhttp_server.py | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/tests/omhttp_server.py b/tests/omhttp_server.py
+index 6962138fa..d3fdb3a9a 100644
+--- a/tests/omhttp_server.py
++++ b/tests/omhttp_server.py
+@@ -36,16 +36,16 @@ def validate_auth(self):
+         if 'Authorization' not in self.headers:
+             self.send_response(401)
+             self.end_headers()
+-            self.wfile.write('missing "Authorization" header')
++            self.wfile.write(b'missing "Authorization" header')
+             return False
+ 
+         auth_header = self.headers['Authorization']
+         _, b64userpwd = auth_header.split()
+-        userpwd = base64.b64decode(b64userpwd)
++        userpwd = base64.b64decode(b64userpwd).decode('utf-8')
+         if userpwd != metadata['userpwd']:
+             self.send_response(401)
+             self.end_headers()
+-            self.wfile.write('invalid auth: {0}'.format(userpwd))
++            self.wfile.write(b'invalid auth: {0}'.format(userpwd))
+             return False
+ 
+         return True
+@@ -60,16 +60,16 @@ def do_POST(self):
+         if metadata['fail_with_400_after'] != -1 and metadata['posts'] > metadata['fail_with_400_after']:
+             self.send_response(400)
+             self.end_headers()
+-            self.wfile.write('BAD REQUEST')
++            self.wfile.write(b'BAD REQUEST')
+             return
+ 
+         if metadata['posts'] > 1 and metadata['fail_every'] != -1 and metadata['posts'] % metadata['fail_every'] == 0:
+             self.send_response(500)
+             self.end_headers()
+-            self.wfile.write('INTERNAL ERROR')
++            self.wfile.write(b'INTERNAL ERROR')
+             return
+ 
+-        content_length = int(self.headers['Content-Length'])
++        content_length = int(self.headers['Content-Length'] or 0)
+         raw_data = self.rfile.read(content_length)
+ 
+         if metadata['decompress']:
+@@ -79,12 +79,12 @@ def do_POST(self):
+ 
+         if self.path not in data:
+             data[self.path] = []
+-        data[self.path].append(post_data)
++        data[self.path].append(post_data.decode('utf-8'))
+ 
+-        res = json.dumps({'msg': 'ok'})
++        res = json.dumps({'msg': 'ok'}).encode('utf8')
+ 
+         self.send_response(200)
+-        self.send_header('Content-Type', 'application/json')
++        self.send_header('Content-Type', 'application/json; charset=utf-8')
+         self.send_header('Content-Length', len(res))
+         self.end_headers()
+ 
+@@ -97,10 +97,10 @@ def do_GET(self):
+         else:
+             result = []
+ 
+-        res = json.dumps(result)
++        res = json.dumps(result).encode('utf8')
+ 
+         self.send_response(200)
+-        self.send_header('Content-Type', 'application/json')
++        self.send_header('Content-Type', 'application/json; charset=utf-8')
+         self.send_header('Content-Length', len(res))
+         self.end_headers()
+ 

diff --git a/app-admin/rsyslog/rsyslog-8.1903.0.ebuild b/app-admin/rsyslog/rsyslog-8.1903.0.ebuild
index 341d02321a0..d1896aca472 100644
--- a/app-admin/rsyslog/rsyslog-8.1903.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.1903.0.ebuild
@@ -100,7 +100,10 @@ if [[ ${PV} == "9999" ]]; then
 	DEPEND+=" >=dev-python/docutils-0.12"
 fi
 
-PATCHES=( "${FILESDIR}"/${P}-add-missing-tests.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-add-missing-tests.patch
+	"${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch.patch
+)
 
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2019-04-06  0:15 Thomas Deutschmann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2019-04-06  0:15 UTC (permalink / raw
  To: gentoo-commits

commit:     6147ad5b6c8e65442bb5da08e6e1e4a4950203b5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 00:15:26 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 00:15:41 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6147ad5b

app-admin/rsyslog: fix Py3 failure in diag.sh

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...-8.1903.0-add-py3-support-to-omhttp-test.patch} |  0
 ...8.1903.0-fix-py3-compatibility-in-diag.sh.patch | 22 ++++++++++++++++++++++
 app-admin/rsyslog/rsyslog-8.1903.0.ebuild          |  3 ++-
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch
similarity index 100%
rename from app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch.patch
rename to app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch

diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch
new file mode 100644
index 00000000000..615bb50bdb9
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch
@@ -0,0 +1,22 @@
+From f0847e46c148233b6ab5d6088ca4e1dc664e82a4 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@whissi.de>
+Date: Sat, 6 Apr 2019 02:07:51 +0200
+Subject: [PATCH] testbench: fix Python 3 compatibility
+
+---
+ tests/diag.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/diag.sh b/tests/diag.sh
+index 5b4b3df46..2926e6ac2 100755
+--- a/tests/diag.sh
++++ b/tests/diag.sh
+@@ -1334,7 +1334,7 @@ get_inode() {
+ 		printf 'FAIL: file "%s" does not exist in get_inode\n' "$1"
+ 		error_exit 100
+ 	fi
+-	python -c 'import os; import stat; print os.lstat("'$1'")[stat.ST_INO]'
++	python -c 'import os; import stat; print(os.lstat("'$1'")[stat.ST_INO])'
+ }
+ 
+ 

diff --git a/app-admin/rsyslog/rsyslog-8.1903.0.ebuild b/app-admin/rsyslog/rsyslog-8.1903.0.ebuild
index d1896aca472..dcc28922f7b 100644
--- a/app-admin/rsyslog/rsyslog-8.1903.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.1903.0.ebuild
@@ -102,7 +102,8 @@ fi
 
 PATCHES=(
 	"${FILESDIR}"/${P}-add-missing-tests.patch
-	"${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch.patch
+	"${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch
+	"${FILESDIR}"/${P}-fix-py3-compatibility-in-diag.sh.patch
 )
 
 CONFIG_CHECK="~INOTIFY_USER"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2021-10-21 18:08 Thomas Deutschmann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2021-10-21 18:08 UTC (permalink / raw
  To: gentoo-commits

commit:     1fb5670d27a2b131f998c55dec0d3c53b41ba86e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 21 15:18:49 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 21 18:08:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fb5670d

app-admin/rsyslog: skip omfwd_fast_imuxsock when running without dev-libs/liblogging[stdlog]

Bug: https://bugs.gentoo.org/819087
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...og-8.2110.0-skip-omfwd_fast_imuxsock-test.patch | 29 ++++++++++++++++++++++
 app-admin/rsyslog/rsyslog-8.2110.0.ebuild          |  8 +++---
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/app-admin/rsyslog/files/rsyslog-8.2110.0-skip-omfwd_fast_imuxsock-test.patch b/app-admin/rsyslog/files/rsyslog-8.2110.0-skip-omfwd_fast_imuxsock-test.patch
new file mode 100644
index 00000000000..88b4a6f6c6c
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.2110.0-skip-omfwd_fast_imuxsock-test.patch
@@ -0,0 +1,29 @@
+From 440fd1d51c5aa7763d3d810b542a7e373a6738eb Mon Sep 17 00:00:00 2001
+From: Michael Biebl <biebl@debian.org>
+Date: Tue, 19 Oct 2021 23:00:50 +0200
+Subject: [PATCH] testbench: skip omfwd_fast_imuxsock.sh if liblogging-stdlog
+ is not available
+
+Fixes #4712
+---
+ tests/omfwd_fast_imuxsock.sh | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/omfwd_fast_imuxsock.sh b/tests/omfwd_fast_imuxsock.sh
+index bb35b58d18..10f9f19c18 100755
+--- a/tests/omfwd_fast_imuxsock.sh
++++ b/tests/omfwd_fast_imuxsock.sh
+@@ -4,6 +4,13 @@
+ . ${srcdir:=.}/diag.sh init
+ skip_platform "SunOS"  "We have no ATOMIC BUILTINS, so OverallQueueSize counting of imdiag is NOT threadsafe and the counting will fail on SunOS"
+ 
++./syslog_caller -fsyslog_inject-l -m0 > /dev/null 2>&1
++no_liblogging_stdlog=$?
++if [ $no_liblogging_stdlog -ne 0 ];then
++  echo "liblogging-stdlog not available - skipping test"
++  exit 77
++fi
++
+ # export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
+ export NUMMESSAGES=100000
+ 

diff --git a/app-admin/rsyslog/rsyslog-8.2110.0.ebuild b/app-admin/rsyslog/rsyslog-8.2110.0.ebuild
index 3646a0ea17e..9dab13ad4b6 100644
--- a/app-admin/rsyslog/rsyslog-8.2110.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2110.0.ebuild
@@ -97,10 +97,8 @@ RDEPEND="
 	zeromq? (
 		>=net-libs/czmq-4:=[drafts]
 	)"
-DEPEND="${RDEPEND}
-	test? (
-		>=dev-libs/liblogging-1.0.1[stdlog]
-	)"
+
+DEPEND="${RDEPEND}"
 
 if [[ ${PV} == "9999" ]]; then
 	BDEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
@@ -109,6 +107,8 @@ if [[ ${PV} == "9999" ]]; then
 	BDEPEND+=" >=dev-python/docutils-0.12"
 fi
 
+PATCHES=( "${FILESDIR}"/${P}-skip-omfwd_fast_imuxsock-test.patch )
+
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2022-10-24 15:21 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2022-10-24 15:21 UTC (permalink / raw
  To: gentoo-commits

commit:     132bceef3c592d8df0463dd0ea101ff24d3d4939
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 15:20:47 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 15:21:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=132bceef

app-admin/rsyslog: add hostname log patch

Closes: https://bugs.gentoo.org/878121
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../files/rsyslog-8.2210.0-5004-hostname.patch     | 40 ++++++++++++++++++++++
 ...-8.2210.0.ebuild => rsyslog-8.2210.0-r1.ebuild} |  2 ++
 2 files changed, 42 insertions(+)

diff --git a/app-admin/rsyslog/files/rsyslog-8.2210.0-5004-hostname.patch b/app-admin/rsyslog/files/rsyslog-8.2210.0-5004-hostname.patch
new file mode 100644
index 000000000000..4f6c6cf944b6
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.2210.0-5004-hostname.patch
@@ -0,0 +1,40 @@
+From e2beca531157a4c0a27bcdda689bc53373e305b3 Mon Sep 17 00:00:00 2001
+From: Rainer Gerhards <rgerhards@adiscon.com>
+Date: Thu, 20 Oct 2022 18:08:11 +0200
+Subject: [PATCH] core bugfix: local hostname invalid if no global() config
+ object given
+
+The local hostname is invalidly set to "[localhost]" on rsyslog startup
+if no global() config object is present in rsyslog.conf. Sending a HUP
+corrects the hostname.
+
+This is a regression from ba00a9f25293f
+
+closes https://github.com/rsyslog/rsyslog/issues/4975,
+closes https://github.com/rsyslog/rsyslog/issues/4825
+---
+ runtime/glbl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/runtime/glbl.c b/runtime/glbl.c
+index 3a9350b903..ed9a307804 100644
+--- a/runtime/glbl.c
++++ b/runtime/glbl.c
+@@ -1396,6 +1396,7 @@ glblDoneLoadCnf(void)
+ 		stddbg = -1;
+ 	}
+ 
++finalize_it:
+ 	/* we have now read the config. We need to query the local host name now
+ 	 * as it was set by the config.
+ 	 *
+@@ -1404,8 +1405,7 @@ glblDoneLoadCnf(void)
+ 	 * are taken from that queue, the hostname will be adapted.
+ 	 */
+ 	queryLocalHostname();
+-
+-finalize_it:	RETiRet;
++	RETiRet;
+ }
+ 
+ 

diff --git a/app-admin/rsyslog/rsyslog-8.2210.0.ebuild b/app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild
similarity index 99%
rename from app-admin/rsyslog/rsyslog-8.2210.0.ebuild
rename to app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild
index 87f42ed5e63c..124a6ec61a3d 100644
--- a/app-admin/rsyslog/rsyslog-8.2210.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild
@@ -114,6 +114,8 @@ if [[ ${PV} == "9999" ]]; then
 	BDEPEND+=" >=dev-python/docutils-0.12"
 fi
 
+PATCHES=( "${FILESDIR}"/${P}-5004-hostname.patch )
+
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2023-02-13 22:42 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2023-02-13 22:42 UTC (permalink / raw
  To: gentoo-commits

commit:     1388126a51519fd0a2d1aea3e32499f0938c44f1
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 22:32:08 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 22:42:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1388126a

app-admin/rsyslog: remove configure bashisms

Closes: https://bugs.gentoo.org/881381
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../files/rsyslog-8.2112.0-pr5024-configure.patch  | 44 ++++++++++++++++++++++
 app-admin/rsyslog/rsyslog-8.2112.0-r1.ebuild       |  2 +
 app-admin/rsyslog/rsyslog-8.2206.0-r1.ebuild       |  2 +
 app-admin/rsyslog/rsyslog-8.2208.0-r1.ebuild       |  2 +
 app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild       |  7 +++-
 app-admin/rsyslog/rsyslog-8.2212.0.ebuild          |  2 +
 6 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/app-admin/rsyslog/files/rsyslog-8.2112.0-pr5024-configure.patch b/app-admin/rsyslog/files/rsyslog-8.2112.0-pr5024-configure.patch
new file mode 100644
index 000000000000..eae9fbc4d024
--- /dev/null
+++ b/app-admin/rsyslog/files/rsyslog-8.2112.0-pr5024-configure.patch
@@ -0,0 +1,44 @@
+From e3c750b98564bc66b50ae35e91f5222c441f8b75 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Maciej=20Bar=C4=87?= <xgqt@gentoo.org>
+Date: Wed, 16 Nov 2022 15:17:31 +0100
+Subject: [PATCH] configure.ac: remove bashisms
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+replace [[ ]] with test and == with =
+
+Signed-off-by: Maciej Barć <xgqt@gentoo.org>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3a43681d72..6e66ec904b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1138,13 +1138,13 @@ AC_ARG_ENABLE(gnutls-tests,
+           no) enable_gnutls_tests="no" ;;
+            *) AC_MSG_ERROR(bad value ${enableval} for --enable-gnutls-tests) ;;
+          esac],
+-        [if [[ "$enable_gnutls" == "yes" ]]; then
++        [if test "x$enable_gnutls" = "xyes"; then
+ 		enable_gnutls_tests=yes
+ 	else
+ 		enable_gnutls_tests=no
+ 	fi]
+ )
+-if  [[ "$enable_gnutls_tests" == "yes" ]] && [[ "$enable_gnutls" != "yes" ]]; then
++if test "x$enable_gnutls_tests" = "xyes" && test "x$enable_gnutls" != "xyes"; then
+ 		AC_MSG_WARN([gnutls-tests can not be enabled without gnutls support. Disabling gnutls tests...])
+ 		enable_gnutls_tests="no"
+ fi
+@@ -1852,7 +1852,7 @@ AC_ARG_ENABLE(imfile-tests,
+          esac],
+         [enable_imfile_tests=yes]
+ )
+-if  [[ "$enable_imfile_tests" == "yes" ]] && [[ "$enable_imfile" != "yes" ]]; then
++if  test "x$enable_imfile_tests" = "xyes" && test "x$enable_imfile" != "xyes"; then
+ 		AC_MSG_WARN([imfile-tests can not be enabled without imfile support. Disabling imfile tests...])
+ 		enable_imfile_tests="no"
+ fi

diff --git a/app-admin/rsyslog/rsyslog-8.2112.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.2112.0-r1.ebuild
index 966d7a160de0..dc51fa17b90d 100644
--- a/app-admin/rsyslog/rsyslog-8.2112.0-r1.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2112.0-r1.ebuild
@@ -115,6 +115,8 @@ fi
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 
+PATCHES=( "${FILESDIR}"/${PN}-8.2112.0-pr5024-configure.patch )
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/app-admin/rsyslog/rsyslog-8.2206.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.2206.0-r1.ebuild
index a3a544366833..db90e08def7a 100644
--- a/app-admin/rsyslog/rsyslog-8.2206.0-r1.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2206.0-r1.ebuild
@@ -117,6 +117,8 @@ fi
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 
+PATCHES=( "${FILESDIR}"/${PN}-8.2112.0-pr5024-configure.patch )
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/app-admin/rsyslog/rsyslog-8.2208.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.2208.0-r1.ebuild
index 5bb2f9c0d333..47f4429d19fc 100644
--- a/app-admin/rsyslog/rsyslog-8.2208.0-r1.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2208.0-r1.ebuild
@@ -117,6 +117,8 @@ fi
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 
+PATCHES=( "${FILESDIR}"/${PN}-8.2112.0-pr5024-configure.patch )
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild
index c8b36f38a08a..fddffc4ef68c 100644
--- a/app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2210.0-r1.ebuild
@@ -114,11 +114,14 @@ if [[ ${PV} == "9999" ]]; then
 	BDEPEND+=" >=dev-python/docutils-0.12"
 fi
 
-PATCHES=( "${FILESDIR}"/${P}-5004-hostname.patch )
-
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.2112.0-pr5024-configure.patch
+	"${FILESDIR}"/${P}-5004-hostname.patch
+)
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/app-admin/rsyslog/rsyslog-8.2212.0.ebuild b/app-admin/rsyslog/rsyslog-8.2212.0.ebuild
index 52db3cff05f8..f28fabbba2c3 100644
--- a/app-admin/rsyslog/rsyslog-8.2212.0.ebuild
+++ b/app-admin/rsyslog/rsyslog-8.2212.0.ebuild
@@ -117,6 +117,8 @@ fi
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
 
+PATCHES=( "${FILESDIR}"/${PN}-8.2112.0-pr5024-configure.patch )
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/
@ 2024-06-24 20:08 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2024-06-24 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     674ec4fbbe6745ff3a18e57fcbda464874495538
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 24 19:26:15 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Jun 24 20:08:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=674ec4fb

app-admin/rsyslog: remove /var/empty/dev/log sock

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-admin/rsyslog/files/50-default-r2.conf   | 103 ++++++
 app-admin/rsyslog/files/README.gentoo-r1     |  39 ++
 app-admin/rsyslog/rsyslog-8.2404.0-r1.ebuild | 509 +++++++++++++++++++++++++++
 3 files changed, 651 insertions(+)

diff --git a/app-admin/rsyslog/files/50-default-r2.conf b/app-admin/rsyslog/files/50-default-r2.conf
new file mode 100644
index 000000000000..07f27b6820a1
--- /dev/null
+++ b/app-admin/rsyslog/files/50-default-r2.conf
@@ -0,0 +1,103 @@
+#######################
+### DEFAULT ACTIONS ###
+#######################
+
+auth,authpriv.* action(
+	name="action_auth"
+	type="omfile"
+	File="/var/log/auth.log"
+	FileCreateMode="0600"
+	FileOwner="root"
+	FileGroup="adm"
+	Sync="off"
+)
+
+cron.* action(
+	name="action_cron"
+	type="omfile"
+	File="/var/log/cron.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+daemon.* action(
+	name="action_daemon"
+	type="omfile"
+	File="/var/log/daemon.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+kern.* action(
+	name="action_kern"
+	type="omfile"
+	File="/var/log/kern.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+lpr.* action(
+	name="action_lpr"
+	type="omfile"
+	File="/var/log/lpr.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+mail.* action(
+	name="action_mail"
+	type="omfile"
+	File="/var/log/mail.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+news.* action(
+	name="action_news"
+	type="omfile"
+	File="/var/log/news.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+user.* action(
+	name="action_user"
+	type="omfile"
+	File="/var/log/user.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+*.=debug;auth,authpriv,news,mail.none action(
+	name="action_debug"
+	type="omfile"
+	File="/var/log/debug.log"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
+	name="action_messages"
+	type="omfile"
+	File="/var/log/messages"
+	FileOwner="root"
+	FileGroup="adm"
+)
+
+# Uncomment the following directive to re-enable the
+# deprecated "/var/log/syslog" log file (don't forget to re-enable log
+# rotation in "/etc/logrotate.d/rsyslog" if you do that!)
+#*.*;auth,authpriv.none action(
+#	name="action_syslog"
+#	type="omfile"
+#	File="/var/log/syslog"
+#	FileOwner="root"
+#	FileGroup="adm"
+#)
+
+*.emerg action(
+	name="action_emerge"
+	type="omusrmsg"
+	Users="*"
+	action.execOnlyOnceEveryInterval="10"
+)

diff --git a/app-admin/rsyslog/files/README.gentoo-r1 b/app-admin/rsyslog/files/README.gentoo-r1
new file mode 100644
index 000000000000..98f63a39cada
--- /dev/null
+++ b/app-admin/rsyslog/files/README.gentoo-r1
@@ -0,0 +1,39 @@
+Introduction
+============
+
+Since rsyslog version 7.6 we are shipping a new default Gentoo
+configuration. See bug #501982 to learn more about what we were trying to
+achieve by rewriting the entire configuration.
+
+
+Important changes
+=================
+
+1. "/var/log/syslog" log file is now deprecated
+
+   Beginning with rsyslog-7.6, the "/var/log/syslog" log file will no
+   longer being written per default. We are considering this file as
+   deprecated/obsolet for the typical user/system.
+   The content from this log file is still availble through other
+   (dedicated) log files, see
+
+     - /var/log/cron.log
+     - /var/log/daemon.log
+     - /var/log/mail.log
+     - /var/log/messages
+
+   If you really need the old "/var/log/syslog" log file, all you have to
+   do is uncommenting the corresponding configuration directive in
+   "/etc/rsyslog.d/50-default.conf".
+
+   If you do so, don't forget to re-enable log rotation in
+   "/etc/logrotate.d/rsyslog", too.
+
+
+2. "/var/empty/dev/log" no longer default
+
+   Before version 8.2404.0-r1 there was an additional input socket in
+   "/var/empty/dev/log" (default chroot location) in 8.2404.0-r1 that socket
+   was removed form the default configuration. Users can enable that socket
+   if they need to on their own but it shouldn't be necessary when running new
+   versions of openssh.

diff --git a/app-admin/rsyslog/rsyslog-8.2404.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.2404.0-r1.ebuild
new file mode 100644
index 000000000000..514cb65782b2
--- /dev/null
+++ b/app-admin/rsyslog/rsyslog-8.2404.0-r1.ebuild
@@ -0,0 +1,509 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit autotools linux-info python-any-r1 systemd
+
+DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
+HOMEPAGE="https://www.rsyslog.com/
+	https://github.com/rsyslog/rsyslog/"
+
+if [[ "${PV}" == *9999* ]]; then
+	EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
+	DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
+
+	inherit git-r3
+else
+	SRC_URI="
+		https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
+		doc? (
+			https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz
+		)
+	"
+
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="GPL-3 LGPL-3 Apache-2.0"
+SLOT="0"
+
+IUSE="clickhouse curl dbi debug doc elasticsearch +gcrypt gnutls imhttp"
+IUSE+=" impcap jemalloc kafka kerberos kubernetes mdblookup"
+IUSE+=" mongodb mysql normalize omhttp omhttpfs omudpspoof +openssl"
+IUSE+=" postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp +ssl"
+IUSE+=" systemd test usertools +uuid xxhash zeromq"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	kubernetes? ( normalize )
+	ssl? ( || ( gnutls openssl ) )
+"
+
+BDEPEND=">=dev-build/autoconf-archive-2015.02.24
+	sys-apps/lsb-release
+	virtual/pkgconfig
+	test? (
+		jemalloc? ( <sys-libs/libfaketime-0.9.7 )
+		!jemalloc? ( sys-libs/libfaketime )
+		${PYTHON_DEPS}
+	)"
+
+RDEPEND="
+	>=dev-libs/libfastjson-0.99.8:=
+	>=dev-libs/libestr-0.1.9
+	>=sys-libs/zlib-1.2.5
+	curl? ( >=net-misc/curl-7.35.0 )
+	dbi? ( >=dev-db/libdbi-0.8.3 )
+	elasticsearch? ( >=net-misc/curl-7.35.0 )
+	gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
+	imhttp? (
+		dev-libs/apr-util
+		www-servers/civetweb
+		virtual/libcrypt:=
+	)
+	impcap? ( net-libs/libpcap )
+	jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
+	kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
+	kerberos? ( virtual/krb5 )
+	kubernetes? ( >=net-misc/curl-7.35.0 )
+	mdblookup? ( dev-libs/libmaxminddb:= )
+	mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
+	mysql? ( dev-db/mysql-connector-c:= )
+	normalize? (
+		>=dev-libs/liblognorm-2.0.3:=
+	)
+	clickhouse? ( >=net-misc/curl-7.35.0 )
+	omhttpfs? ( >=net-misc/curl-7.35.0 )
+	omudpspoof? ( >=net-libs/libnet-1.1.6 )
+	postgres? ( >=dev-db/postgresql-8.4.20:= )
+	rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
+	redis? (
+		>=dev-libs/hiredis-0.11.0:=
+		dev-libs/libevent[threads(+)]
+	)
+	relp? ( >=dev-libs/librelp-1.2.17:= )
+	rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
+	rfc5424hmac? (
+		>=dev-libs/openssl-0.9.8y:0=
+	)
+	snmp? ( >=net-analyzer/net-snmp-5.7.2 )
+	ssl? (
+		gnutls? ( >=net-libs/gnutls-2.12.23:0= )
+		openssl? (
+			dev-libs/openssl:0=
+		)
+	)
+	systemd? ( >=sys-apps/systemd-234 )
+	uuid? ( sys-apps/util-linux:0= )
+	xxhash? ( dev-libs/xxhash:= )
+	zeromq? (
+		>=net-libs/czmq-4:=[drafts]
+	)"
+
+DEPEND="
+	${RDEPEND}
+	elibc_musl? ( sys-libs/queue-standalone )
+"
+
+if [[ "${PV}" == "9999" ]]; then
+	BDEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
+	BDEPEND+=" >=app-alternatives/lex-2.5.39-r1"
+	BDEPEND+=" >=app-alternatives/yacc-2.4.3"
+	BDEPEND+=" >=dev-python/docutils-0.12"
+fi
+
+CONFIG_CHECK="~INOTIFY_USER"
+WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
+
+PATCHES=( "${FILESDIR}/${PN}-8.2112.0-pr5024-configure.patch" )
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+	if [[ "${PV}" == "9999" ]]; then
+		git-r3_fetch
+		git-r3_checkout
+	else
+		unpack "${P}.tar.gz"
+	fi
+
+	if use doc; then
+		if [[ "${PV}" == "9999" ]]; then
+			local _EGIT_BRANCH=
+			if [[ -n "${EGIT_BRANCH}" ]]; then
+				# Cannot use rsyslog commits/branches for documentation repository
+				_EGIT_BRANCH="${EGIT_BRANCH}"
+
+				unset EGIT_BRANCH
+			fi
+
+			git-r3_fetch "${DOC_REPO_URI}"
+			git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
+
+			if [[ -n "${_EGIT_BRANCH}" ]]; then
+				# Restore previous EGIT_BRANCH information
+				EGIT_BRANCH=${_EGIT_BRANCH}
+			fi
+		else
+			cd "${S}" || die "Cannot change dir into '${S}'"
+			mkdir docs || die "Failed to create docs directory"
+			cd docs || die "Failed to change dir into '${S}/docs'"
+
+			unpack "${PN}-doc-${PV}.tar.gz"
+		fi
+	fi
+}
+
+src_prepare() {
+	default
+
+	# Bug: https://github.com/rsyslog/rsyslog/issues/3626
+	sed -i \
+		-e '\|^#!/bin/bash$|a exit 77' \
+		tests/mmkubernetes-cache-expir*.sh \
+		|| die "Failed to disable known test failure mmkubernetes-cache-expir*.sh"
+
+	sed -i \
+		-e '\|^#!/bin/bash$|a exit 0' \
+		tests/omprog-close-unresponsive*.sh \
+		|| die "Failed to disable test omprog-close-unresponsive*.sh"
+
+	sed -i \
+		-e '\|^#!/bin/bash$|a exit 0' \
+		tests/uxsock_simple.sh \
+		|| die "Failed to disable test uxsock_simple.sh"
+
+	eautoreconf
+}
+
+src_configure() {
+	# Maintainer notes:
+	# * Guardtime support is missing because libgt isn't yet available
+	#   in portage.
+	# * Hadoop's HDFS file system output module is currently not
+	#   supported in Gentoo because nobody is able to test it
+	#   (JAVA dependency).
+	# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
+	#   upstream PR 129 and 136) so we need to export HIREDIS_*
+	#   variables because rsyslog's build system depends on pkg-config.
+
+	if use redis ; then
+		export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
+		export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
+	fi
+
+	local -a myeconfargs=(
+		--disable-debug-symbols
+		--disable-generate-man-pages
+		--without-valgrind-testbench
+		--disable-liblogging-stdlog
+		--disable-imfile-tests  # Some imfile tests fail (noticed in version 8.2208.0)
+		$(use_enable test testbench)
+		$(use_enable test libfaketime)
+		$(use_enable test extended-tests)
+		# Input Plugins without dependencies
+		--enable-imbatchreport
+		--enable-imdiag
+		--enable-imdocker
+		--enable-imfile
+		--enable-improg
+		--enable-impstats
+		--enable-imptcp
+		# Message Modificiation Plugins without dependencies
+		--enable-mmanon
+		--enable-mmaudit
+		--enable-mmcount
+		--enable-mmfields
+		--enable-mmjsonparse
+		--enable-mmpstrucdata
+		--enable-mmrm1stspace
+		--enable-mmsequence
+		--enable-mmtaghostname
+		--enable-mmutf8fix
+		# Output Modification Plugins without dependencies
+		--enable-mail
+		--enable-omprog
+		--enable-omruleset
+		--enable-omstdout
+		--enable-omuxsock
+		# Misc
+		--enable-fmhash
+		--enable-fmunflatten
+		$(use_enable xxhash fmhash-xxhash)
+		--enable-pmaixforwardedfrom
+		--enable-pmciscoios
+		--enable-pmcisconames
+		--enable-pmdb2diag
+		--enable-pmlastmsg
+		$(use_enable normalize pmnormalize)
+		--enable-pmnull
+		--enable-pmpanngfw
+		--enable-pmsnare
+		# DB
+		$(use_enable dbi libdbi)
+		$(use_enable mongodb ommongodb)
+		$(use_enable mysql)
+		$(use_enable postgres pgsql)
+		$(use_enable redis imhiredis)
+		$(use_enable redis omhiredis)
+		# Debug
+		$(use_enable debug)
+		$(use_enable debug diagtools)
+		$(use_enable debug valgrind)
+		# Misc
+		$(use_enable clickhouse)
+		$(use_enable curl fmhttp)
+		$(use_enable elasticsearch)
+		$(use_enable gcrypt libgcrypt)
+		$(use_enable imhttp)
+		$(use_enable impcap)
+		$(use_enable jemalloc)
+		$(use_enable kafka imkafka)
+		$(use_enable kafka omkafka)
+		$(use_enable kerberos gssapi-krb5)
+		$(use_enable kubernetes mmkubernetes)
+		$(use_enable normalize mmnormalize)
+		$(use_enable mdblookup mmdblookup)
+		$(use_enable omhttp)
+		$(use_enable omhttpfs)
+		$(use_enable omudpspoof)
+		$(use_enable rabbitmq omrabbitmq)
+		$(use_enable relp)
+		$(use_enable rfc3195)
+		$(use_enable rfc5424hmac mmrfc5424addhmac)
+		$(use_enable snmp)
+		$(use_enable snmp mmsnmptrapd)
+		$(use_enable gnutls)
+		$(use_enable openssl)
+		$(use_enable systemd imjournal)
+		$(use_enable systemd omjournal)
+		$(use_enable usertools)
+		$(use_enable uuid)
+		$(use_enable zeromq imczmq)
+		$(use_enable zeromq omczmq)
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	default
+
+	if use doc && [[ "${PV}" == "9999" ]]; then
+		einfo "Building documentation ..."
+		local doc_dir="${S}/docs"
+		cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
+		sphinx-build -b html source build || die "Building documentation failed!"
+	fi
+}
+
+src_test() {
+	local _has_increased_ulimit=
+
+	# Sometimes tests aren't executable (i.e. when added via patch)
+	einfo "Adjusting permissions of test scripts ..."
+	find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
+		die "Failed to adjust test scripts permission"
+
+	if ulimit -n 3072; then
+		_has_increased_ulimit="true"
+	fi
+
+	if ! emake --jobs 1 check; then
+		eerror "Test suite failed! :("
+
+		if [[ -z "${_has_increased_ulimit}" ]]; then
+			eerror "Probably because open file limit couldn't be set to 3072."
+		fi
+
+		if has userpriv ${FEATURES}; then
+			eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
+				"before you submit a bug report."
+		fi
+
+	fi
+}
+
+src_install() {
+	local -a DOCS=(
+		AUTHORS
+		ChangeLog
+		"${FILESDIR}"/README.gentoo-r1
+	)
+
+	use doc && local -a HTML_DOCS=( "${S}/docs/build/." )
+
+	default
+
+	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+
+	systemd_newunit "${FILESDIR}/${PN}.service" ${PN}.service
+
+	keepdir /var/spool/${PN}
+	keepdir /etc/ssl/${PN}
+	keepdir /etc/${PN}.d
+
+	insinto /etc
+	newins "${FILESDIR}/${PN}.conf" ${PN}.conf
+
+	insinto /etc/rsyslog.d/
+	newins "${FILESDIR}/50-default-r2.conf" 50-default.conf
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
+
+	if use mysql; then
+		insinto /usr/share/${PN}/scripts/mysql
+		doins plugins/ommysql/createDB.sql
+	fi
+
+	if use postgres; then
+		insinto /usr/share/${PN}/scripts/pgsql
+		doins plugins/ompgsql/createDB.sql
+	fi
+
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	local advertise_readme=0
+
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		# This is a new installation
+
+		advertise_readme=1
+
+		if use mysql || use postgres; then
+			echo
+			elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
+			elog "  /usr/share/doc/${PF}/scripts"
+		fi
+
+		if use ssl; then
+			echo
+			elog "To create a default CA and certificates for your server and clients, run:"
+			elog "  emerge --config =${PF}"
+			elog "on your logging server. You can run it several times,"
+			elog "once for each logging client. The client certificates will be signed"
+			elog "using the CA certificate generated during the first run."
+		fi
+	fi
+
+	if [[ ${advertise_readme} -gt 0 ]]; then
+		# We need to show the README file location
+
+		echo ""
+		elog "Please read"
+		elog ""
+		elog "  ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
+		elog ""
+		elog "for more details."
+	fi
+}
+
+pkg_config() {
+	if ! use ssl ; then
+		einfo "There is nothing to configure for rsyslog unless you"
+		einfo "used USE=ssl to build it."
+
+		return 0
+	fi
+
+	if ! hash certtool &>/dev/null; then
+		die "certtool not found! Is net-libs/gnutls[tools] is installed?"
+	fi
+
+	# Make sure the certificates directory exists
+	local CERTDIR="${EROOT}/etc/ssl/${PN}"
+	if [[ ! -d "${CERTDIR}" ]]; then
+		mkdir "${CERTDIR}" || die
+	fi
+	einfo "Your certificates will be stored in ${CERTDIR}"
+
+	# Create a default CA if needed
+	if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
+		einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
+		certtool --generate-privkey \
+			--outfile "${CERTDIR}/${PN}_ca.privkey.pem" || die
+		chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
+
+		cat > "${T}/${PF}.$$" <<- _EOF
+		cn = Portage automated CA
+		ca
+		cert_signing_key
+		expiration_days = 3650
+		_EOF
+
+		certtool --generate-self-signed \
+			--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
+			--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
+			--template "${T}/${PF}.$$" || die
+		chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
+
+		# Create the server certificate
+		echo
+		einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
+		read -r CN
+
+		einfo "Creating private key and certificate for server ${CN}..."
+		certtool --generate-privkey \
+			--outfile "${CERTDIR}/${PN}_${CN}.key.pem" || die
+		chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
+
+		cat > "${T}/${PF}.$$" <<- _EOF
+		cn = ${CN}
+		tls_www_server
+		dns_name = ${CN}
+		expiration_days = 3650
+		_EOF
+
+		certtool --generate-certificate \
+			--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
+			--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
+			--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
+			--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
+			--template "${T}/${PF}.$$" &>/dev/null
+		chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
+
+	else
+		einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
+	fi
+
+	# Create a client certificate
+	echo
+	einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
+	read -r CN
+
+	einfo "Creating private key and certificate for client ${CN}..."
+	certtool --generate-privkey \
+		--outfile "${CERTDIR}/${PN}_${CN}.key.pem" || die
+	chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
+
+	cat > "${T}/${PF}.$$" <<- _EOF
+	cn = ${CN}
+	tls_www_client
+	dns_name = ${CN}
+	expiration_days = 3650
+	_EOF
+
+	certtool --generate-certificate \
+		--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
+		--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
+		--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
+		--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
+		--template "${T}/${PF}.$$" || die
+	chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
+
+	rm -f "${T}/${PF}.$$"
+
+	echo
+	einfo "Here is the documentation on how to encrypt your log traffic:"
+	einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-24 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-05 23:53 [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/, app-admin/rsyslog/files/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2024-06-24 20:08 Maciej Barć
2023-02-13 22:42 Maciej Barć
2022-10-24 15:21 Maciej Barć
2021-10-21 18:08 Thomas Deutschmann
2019-04-06  0:15 Thomas Deutschmann
2018-11-03 22:42 Thomas Deutschmann
2018-09-20 22:37 Thomas Deutschmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox