Bug 195046 - sysutils/rsyslog8 [patch] rsyslog8 doesn't build omprog output module
Summary: sysutils/rsyslog8 [patch] rsyslog8 doesn't build omprog output module
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brad Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-15 21:59 UTC by Douglas K. Rand
Modified: 2014-11-24 17:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas K. Rand 2014-11-15 21:59:41 UTC
The omprog (sending log messages to stdin of another process) module
	isn't built by default on FreeBSD, nor does it actually compile.

How-To-Repeat:
Want to send syslog messages to stdin of another program, such as
	logsurfer or sec.

Fix:
Attached patch creates a PROG config knob enabling the omprog 
	output module. It also includes a trivial patch to "fix" the
	omprog.c code with wait.h being in /usr/include/sys on FreeBSD.


diff -Nur rsyslog8.old/Makefile rsyslog8/Makefile
--- rsyslog8.old/Makefile	2014-11-15 15:23:38.354046000 -0600
+++ rsyslog8/Makefile	2014-11-15 15:32:41.269071343 -0600
@@ -23,13 +23,14 @@
 PORTSCOUT=	limit:^8\.2
 PKGNAMESUFFIX=	8
 
-OPTIONS_DEFINE=	DBI DOCS GNUTLS GSSAPI MYSQL PGSQL RELP RFC3195 SNMP
+OPTIONS_DEFINE=	DBI DOCS GNUTLS GSSAPI MYSQL PGSQL PROG RELP RFC3195 SNMP
 
 DBI_DESC=	LibDBI output module for rsyslog
 GNUTLS_DESC=	GNUTLS module for rsyslog
 GSSAPI_DESC=	GSS API input/output module for rsyslog
 MYSQL_DESC=	MySQL output module for rsyslog
 PGSQL_DESC=	PostgreSQL output module for rsyslog
+PROG_DESC=	Prog (a.k.a. pipe) output module for rsyslog
 RELP_DESC=	RELP input/output module for rsyslog
 RFC3195_DESC=	RFC3195 input support for rsyslog
 SNMP_DESC=	SNMP trap sender for rsyslog
@@ -80,6 +81,13 @@
 CONFIGURE_ARGS+=--disable-pgsql
 .endif
 
+.if ${PORT_OPTIONS:MPROG}
+CONFIGURE_ARGS+=--enable-omprog
+PLIST_FILES+=	lib/rsyslog/omprog.so
+.else
+CONFIGURE_ARGS+=--disable-omprog
+.endif
+
 .if ${PORT_OPTIONS:MRELP}
 LIB_DEPENDS+=	librelp.so:${PORTSDIR}/devel/librelp
 CONFIGURE_ARGS+=--enable-relp
diff -Nur rsyslog8.old/files/patch-plugins__omprog__omprog.c rsyslog8/files/patch-plugins__omprog__omprog.c
--- rsyslog8.old/files/patch-plugins__omprog__omprog.c	1969-12-31 18:00:00.000000000 -0600
+++ rsyslog8/files/patch-plugins__omprog__omprog.c	2014-11-15 15:28:07.234028803 -0600
@@ -0,0 +1,11 @@
+--- plugins/omprog/omprog.c.orig	2014-11-15 15:26:55.633028880 -0600
++++ plugins/omprog/omprog.c	2014-11-15 15:27:01.695054590 -0600
+@@ -36,7 +36,7 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <pthread.h>
+ #include "conf.h"
+ #include "syslogd-types.h"
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-11-23 07:38:52 UTC
Over to maintainer.
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-11-24 17:00:35 UTC
A commit references this bug:

Author: brd
Date: Mon Nov 24 17:00:24 UTC 2014
New revision: 373224
URL: https://svnweb.freebsd.org/changeset/ports/373224

Log:
  Enable the omprog output module by default.

  PR:		195046
  Submitted by:	rand@iteris.com
  Approved by:	zi

Changes:
  head/sysutils/rsyslog8/Makefile
  head/sysutils/rsyslog8/files/patch-plugins__omprog__omprog.c
  head/sysutils/rsyslog8/pkg-plist
Comment 3 Brad Davis freebsd_committer freebsd_triage 2014-11-24 17:02:35 UTC
I just enabled it by default since it does not pull in any external deps. Thanks for your submission!