[update] rsyslog 8.32.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[update] rsyslog 8.32.0

Remi Locherer
Hi,

This updates rsyslogd to the current version and adds two new modules.
It needs the updated librelp that I sent earlier.

I looked into upstreaming the remaining patch but that is not necessary.
The next version of rsyslog will include <sys/wait.h> for all platforms.

I tested it on i386 (imudp + omrelp) and on amd64 (imrelp, ommysql,
omelasticsearch).

The "CFLAGS += -march=i686" seems not to be needed anymore for i386.
I guess because clang is now used.

Comments, OKs?

Remi


Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/Makefile,v
retrieving revision 1.38
diff -u -p -r1.38 Makefile
--- Makefile 4 Nov 2017 14:50:02 -0000 1.38
+++ Makefile 8 Feb 2018 13:36:18 -0000
@@ -4,42 +4,48 @@ BROKEN-powerpc = 64-bit atomics (__sync_
 
 COMMENT-main = syslog daemon supporting databases, TCP, SSL, RELP
 COMMENT-mysql = MySQL plugin for rsyslog
+COMMENT-normalize = liblognorm plugin for rsyslog
 COMMENT-pgsql = PostgreSQL plugin for rsyslog
+COMMENT-elasticsearch = Elasticsearch plugin for rsyslog
 
-MULTI_PACKAGES = -main -mysql -pgsql
+MULTI_PACKAGES = -main -mysql -normalize -pgsql -elasticsearch
 
-V = 8.16.0
+V = 8.32.0
 DISTNAME = rsyslog-$V
 PKGNAME-main = rsyslog-$V
 PKGNAME-mysql = rsyslog-mysql-$V
+PKGNAME-normalize = rsyslog-normalize-$V
 PKGNAME-pgsql = rsyslog-pgsql-$V
+PKGNAME-elasticsearch = rsyslog-elasticsearch-$V
 CATEGORIES = sysutils
-REVISION-main = 3
-REVISION-mysql = 1
-REVISION-pgsql = 1
 
 HOMEPAGE = http://www.rsyslog.com/
 
 # GPLv3+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB-main += c estr ffi gcrypt gmp gnutls gpg-error hogweed iconv
-WANTLIB-main += idn2 intl json-c nettle p11-kit pthread relp tasn1
+WANTLIB-main += c curl estr fastjson ffi gcrypt gmp gnutls gpg-error
+WANTLIB-main += hogweed idn2 nettle p11-kit pthread relp tasn1
 WANTLIB-main += unistring uuid z
 
 WANTLIB-mysql += crypto m mysqlclient pthread ssl ${COMPILER_LIBCXX} z
 
+WANTLIB-normalize += lognorm
+
 WANTLIB-pgsql += crypto pq ssl
 
-LIB_DEPENDS-main = devel/json-c \
- devel/libestr>=0.1.2 \
+LIB_DEPENDS-main = devel/libfastjson \
+ devel/libestr \
+ net/curl \
  security/libgcrypt \
  security/gnutls \
- sysutils/librelp>=1.2.9
+ sysutils/librelp
 # XXX should port to using libc UUID functions
 LIB_DEPENDS-main += sysutils/e2fsprogs
 LIB_DEPENDS-mysql = databases/mariadb
 RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-normalize = devel/liblognorm
+RUN_DEPENDS-normalize = ${PKGNAME-main}:${PKGPATH},-main
 LIB_DEPENDS-pgsql = databases/postgresql
 RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
 
@@ -51,8 +57,10 @@ LIBTOOL_FLAGS = --tag=disable-static
 CONFIGURE_ARGS += --enable-pgsql \
  --enable-mysql \
  --enable-mail \
+ --enable-mmnormalize \
  --enable-gnutls \
  --enable-relp \
+ --enable-elasticsearch \
  --disable-liblogging-stdlog
 CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include"
 
@@ -65,10 +73,5 @@ post-install:
     ${PREFIX}/share/examples/rsyslog/createDB_mysql.sql
  ${INSTALL_DATA} ${WRKSRC}/plugins/ompgsql/createDB.sql \
     ${PREFIX}/share/examples/rsyslog/createDB_pgsql.sql
-
-.if ${MACHINE_ARCH:Mi386}
-# 64-bit atomics
-CFLAGS += -march=i686
-.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 15 Mar 2016 23:25:51 -0000 1.4
+++ distinfo 8 Feb 2018 13:36:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (rsyslog-8.16.0.tar.gz) = T+T5fBCJkIbZi5QB1+jSvP9hx8P3zehieJHjb8bsG3Y=
-SIZE (rsyslog-8.16.0.tar.gz) = 2132012
+SHA256 (rsyslog-8.32.0.tar.gz) = lkb9wzpjFEZMumgyNxYBCopVw961I815i6i0Gg76QLg=
+SIZE (rsyslog-8.32.0.tar.gz) = 2478990
Index: files/rsyslog.conf
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/files/rsyslog.conf,v
retrieving revision 1.1
diff -u -p -r1.1 rsyslog.conf
--- files/rsyslog.conf 15 Mar 2016 23:25:51 -0000 1.1
+++ files/rsyslog.conf 8 Feb 2018 13:36:18 -0000
@@ -6,14 +6,14 @@
 # like we have with the default config. For more advanced
 # things, RainerScript configuration is suggested.
 #
-# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
-# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html 
+# For more information see http://www.rsyslog.com/doc/rsyslog_conf.html 
 # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
 
 #### MODULES ####
 
 module(load="imuxsock") # provides support for local system logging (e.g. via logger command)
-module(load="imklog")   # provides kernel logging support (previously done by rklogd)
+# on OpenBSD sendsyslog(2) is used for logging - imklog will not receive logs
+#module(load="imklog")   # provides kernel logging support (previously done by rklogd)
 #module(load"immark")  # provides --MARK-- message capability
 
 # Provides UDP syslog reception
@@ -39,6 +39,10 @@ $ActionFileDefaultTemplate RSYSLOG_Tradi
 # Include all config files in /etc/rsyslog.d/
 $IncludeConfig ${SYSCONFDIR}/rsyslog.d/*.conf
 
+# Drop root privileges
+# See http://wiki.rsyslog.com/index.php/Security#Dropping_Privileges
+$PrivDropToUser _rsyslogd
+$PrivDropToGroup _rsyslogd
 
 #### RULES ####
 
Index: patches/patch-grammar_lexer_l
===================================================================
RCS file: patches/patch-grammar_lexer_l
diff -N patches/patch-grammar_lexer_l
--- patches/patch-grammar_lexer_l 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-grammar_lexer_l,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- grammar/lexer.l.orig Thu Mar  3 13:18:38 2016
-+++ grammar/lexer.l Thu Mar  3 13:18:52 2016
-@@ -97,7 +97,7 @@ extern int yydebug;
- /* somehow, I need these prototype even though the headers are
-  * included. I guess that's some autotools magic I don't understand...
-  */
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
- int fileno(FILE *stream);
- #endif
-
Index: patches/patch-plugins_mmexternal_mmexternal_c
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/patches/patch-plugins_mmexternal_mmexternal_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-plugins_mmexternal_mmexternal_c
--- patches/patch-plugins_mmexternal_mmexternal_c 15 Mar 2016 23:25:51 -0000 1.1
+++ patches/patch-plugins_mmexternal_mmexternal_c 8 Feb 2018 13:36:18 -0000
@@ -1,12 +1,13 @@
 $OpenBSD: patch-plugins_mmexternal_mmexternal_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- plugins/mmexternal/mmexternal.c.orig Thu Mar  3 13:19:44 2016
-+++ plugins/mmexternal/mmexternal.c Thu Mar  3 13:19:51 2016
+Index: plugins/mmexternal/mmexternal.c
+--- plugins/mmexternal/mmexternal.c.orig
++++ plugins/mmexternal/mmexternal.c
 @@ -31,7 +31,7 @@
  #include <errno.h>
  #include <unistd.h>
  #include <fcntl.h>
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+-#if defined(_AIX) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFlyBSD__) || defined(__APPLE__)
++#if defined(_AIX) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFlyBSD__) || defined(__APPLE__) || defined(__OpenBSD__)
  #include <sys/wait.h>
  #else
  #include <wait.h>
Index: patches/patch-tools_rsyslogd_c
===================================================================
RCS file: patches/patch-tools_rsyslogd_c
diff -N patches/patch-tools_rsyslogd_c
--- patches/patch-tools_rsyslogd_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-tools_rsyslogd_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- tools/rsyslogd.c.orig Thu Mar  3 13:20:29 2016
-+++ tools/rsyslogd.c Thu Mar  3 13:21:39 2016
-@@ -29,7 +29,7 @@
- #ifdef HAVE_LIBLOGGING_STDLOG
- #  include <liblogging/stdlog.h>
- #endif
--#ifdef OS_SOLARIS
-+#if defined(OS_SOLARIS) || defined(__OpenBSD__)
- # include <errno.h>
- #else
- # include <sys/errno.h>
Index: pkg/DESCR-elasticsearch
===================================================================
RCS file: pkg/DESCR-elasticsearch
diff -N pkg/DESCR-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-elasticsearch 8 Feb 2018 13:36:18 -0000
@@ -0,0 +1,2 @@
+Elasticsearch plugin for Rsyslog.
+
Index: pkg/DESCR-normalize
===================================================================
RCS file: pkg/DESCR-normalize
diff -N pkg/DESCR-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-normalize 8 Feb 2018 13:36:18 -0000
@@ -0,0 +1 @@
+liblognorm plugin for rsyslog
Index: pkg/PLIST-elasticsearch
===================================================================
RCS file: pkg/PLIST-elasticsearch
diff -N pkg/PLIST-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-elasticsearch 8 Feb 2018 13:36:18 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/omelasticsearch.so
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 15 Mar 2016 23:25:51 -0000 1.2
+++ pkg/PLIST-main 8 Feb 2018 13:36:18 -0000
@@ -1,4 +1,6 @@
 @comment $OpenBSD: PLIST-main,v 1.2 2016/03/15 23:25:51 sthen Exp $
+@newgroup _rsyslogd:800
+@newuser _rsyslogd:800:_rsyslogd:daemon:Rsyslog Daemon:/nonexistent:/sbin/nologin
 lib/rsyslog/
 lib/rsyslog/imklog.so
 lib/rsyslog/immark.so
@@ -26,3 +28,4 @@ lib/rsyslog/omtesting.so
 share/examples/rsyslog/
 share/examples/rsyslog/rsyslog.conf
 @sample ${SYSCONFDIR}/rsyslog.conf
+@rcscript ${RCDIR}/rsyslogd
Index: pkg/PLIST-normalize
===================================================================
RCS file: pkg/PLIST-normalize
diff -N pkg/PLIST-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-normalize 8 Feb 2018 13:36:18 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/mmnormalize.so
Index: pkg/rsyslogd.rc
===================================================================
RCS file: pkg/rsyslogd.rc
diff -N pkg/rsyslogd.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/rsyslogd.rc 8 Feb 2018 13:36:18 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/rsyslogd"
+
+rc_reload=NO
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.0

Remi Locherer
On Thu, Feb 08, 2018 at 03:17:46PM +0100, Remi Locherer wrote:

> Hi,
>
> This updates rsyslogd to the current version and adds two new modules.
> It needs the updated librelp that I sent earlier.
>
> I looked into upstreaming the remaining patch but that is not necessary.
> The next version of rsyslog will include <sys/wait.h> for all platforms.
>
> I tested it on i386 (imudp + omrelp) and on amd64 (imrelp, ommysql,
> omelasticsearch).
>
> The "CFLAGS += -march=i686" seems not to be needed anymore for i386.
> I guess because clang is now used.

In the meantime rsyslog 8.33.0 was released. Updated diff below.

Feedback, OKs?

Remi


Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile 18 Feb 2018 14:36:30 -0000 1.39
+++ Makefile 5 Mar 2018 22:56:43 -0000
@@ -4,44 +4,53 @@ BROKEN-powerpc = 64-bit atomics (__sync_
 
 COMMENT-main = syslog daemon supporting databases, TCP, SSL, RELP
 COMMENT-mysql = MySQL plugin for rsyslog
+COMMENT-normalize = liblognorm plugin for rsyslog
 COMMENT-pgsql = PostgreSQL plugin for rsyslog
+COMMENT-elasticsearch = Elasticsearch plugin for rsyslog
 
-MULTI_PACKAGES = -main -mysql -pgsql
+MULTI_PACKAGES = -main -mysql -normalize -pgsql -elasticsearch
 
-V = 8.16.0
+V = 8.33.0
 DISTNAME = rsyslog-$V
 PKGNAME-main = rsyslog-$V
 PKGNAME-mysql = rsyslog-mysql-$V
+PKGNAME-normalize = rsyslog-normalize-$V
 PKGNAME-pgsql = rsyslog-pgsql-$V
+PKGNAME-elasticsearch = rsyslog-elasticsearch-$V
 CATEGORIES = sysutils
-REVISION-main = 4
-REVISION-mysql = 1
-REVISION-pgsql = 1
 
 HOMEPAGE = http://www.rsyslog.com/
 
+MAINTAINER = Remi Locherer <[hidden email]>
+
 # GPLv3+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB-main += c estr ffi gcrypt gmp gnutls gpg-error hogweed iconv
-WANTLIB-main += idn2 intl json-c nettle p11-kit pthread relp tasn1
+WANTLIB-main += c curl estr fastjson ffi gcrypt gmp gnutls gpg-error
+WANTLIB-main += hogweed idn2 nettle p11-kit pthread relp tasn1
 WANTLIB-main += unistring uuid z
 
 WANTLIB-mysql += crypto m mysqlclient pthread ssl ${COMPILER_LIBCXX} z
 
+WANTLIB-normalize += lognorm
+
 WANTLIB-pgsql += crypto pq ssl
 
-LIB_DEPENDS-main = devel/json-c \
- devel/libestr>=0.1.2 \
- security/libgcrypt \
- security/gnutls \
- sysutils/librelp>=1.2.9
+LIB_DEPENDS-main = devel/libfastjson \
+ devel/libestr \
+ net/curl \
+ security/libgcrypt \
+ security/gnutls \
+ sysutils/librelp
 # XXX should port to using libc UUID functions
-LIB_DEPENDS-main += sysutils/e2fsprogs
-LIB_DEPENDS-mysql = databases/mariadb
-RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
-LIB_DEPENDS-pgsql = databases/postgresql
-RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-main += sysutils/e2fsprogs
+LIB_DEPENDS-mysql = databases/mariadb
+RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-normalize = devel/liblognorm
+RUN_DEPENDS-normalize = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-pgsql = databases/postgresql
+RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
+RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
 
 MASTER_SITES = http://www.rsyslog.com/files/download/rsyslog/ \
  http://download.rsyslog.com/rsyslog/
@@ -51,8 +60,10 @@ LIBTOOL_FLAGS = --tag=disable-static
 CONFIGURE_ARGS += --enable-pgsql \
  --enable-mysql \
  --enable-mail \
+ --enable-mmnormalize \
  --enable-gnutls \
  --enable-relp \
+ --enable-elasticsearch \
  --disable-liblogging-stdlog
 CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include"
 
@@ -65,10 +76,5 @@ post-install:
     ${PREFIX}/share/examples/rsyslog/createDB_mysql.sql
  ${INSTALL_DATA} ${WRKSRC}/plugins/ompgsql/createDB.sql \
     ${PREFIX}/share/examples/rsyslog/createDB_pgsql.sql
-
-.if ${MACHINE_ARCH:Mi386}
-# 64-bit atomics
-CFLAGS += -march=i686
-.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 15 Mar 2016 23:25:51 -0000 1.4
+++ distinfo 26 Feb 2018 22:44:45 -0000
@@ -1,2 +1,2 @@
-SHA256 (rsyslog-8.16.0.tar.gz) = T+T5fBCJkIbZi5QB1+jSvP9hx8P3zehieJHjb8bsG3Y=
-SIZE (rsyslog-8.16.0.tar.gz) = 2132012
+SHA256 (rsyslog-8.33.0.tar.gz) = LfOdkbrdt1xXWqA1Jc2dTSCq11ARxtbSXvdzrCb/XBI=
+SIZE (rsyslog-8.33.0.tar.gz) = 2487783
Index: files/rsyslog.conf
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/files/rsyslog.conf,v
retrieving revision 1.1
diff -u -p -r1.1 rsyslog.conf
--- files/rsyslog.conf 15 Mar 2016 23:25:51 -0000 1.1
+++ files/rsyslog.conf 26 Feb 2018 22:43:08 -0000
@@ -6,14 +6,14 @@
 # like we have with the default config. For more advanced
 # things, RainerScript configuration is suggested.
 #
-# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
-# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html 
+# For more information see http://www.rsyslog.com/doc/rsyslog_conf.html 
 # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
 
 #### MODULES ####
 
 module(load="imuxsock") # provides support for local system logging (e.g. via logger command)
-module(load="imklog")   # provides kernel logging support (previously done by rklogd)
+# on OpenBSD sendsyslog(2) is used for logging - imklog will not receive logs
+#module(load="imklog")   # provides kernel logging support (previously done by rklogd)
 #module(load"immark")  # provides --MARK-- message capability
 
 # Provides UDP syslog reception
@@ -39,6 +39,10 @@ $ActionFileDefaultTemplate RSYSLOG_Tradi
 # Include all config files in /etc/rsyslog.d/
 $IncludeConfig ${SYSCONFDIR}/rsyslog.d/*.conf
 
+# Drop root privileges
+# See http://wiki.rsyslog.com/index.php/Security#Dropping_Privileges
+$PrivDropToUser _rsyslogd
+$PrivDropToGroup _rsyslogd
 
 #### RULES ####
 
Index: patches/patch-grammar_lexer_l
===================================================================
RCS file: patches/patch-grammar_lexer_l
diff -N patches/patch-grammar_lexer_l
--- patches/patch-grammar_lexer_l 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-grammar_lexer_l,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- grammar/lexer.l.orig Thu Mar  3 13:18:38 2016
-+++ grammar/lexer.l Thu Mar  3 13:18:52 2016
-@@ -97,7 +97,7 @@ extern int yydebug;
- /* somehow, I need these prototype even though the headers are
-  * included. I guess that's some autotools magic I don't understand...
-  */
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
- int fileno(FILE *stream);
- #endif
-
Index: patches/patch-plugins_mmexternal_mmexternal_c
===================================================================
RCS file: patches/patch-plugins_mmexternal_mmexternal_c
diff -N patches/patch-plugins_mmexternal_mmexternal_c
--- patches/patch-plugins_mmexternal_mmexternal_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-plugins_mmexternal_mmexternal_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- plugins/mmexternal/mmexternal.c.orig Thu Mar  3 13:19:44 2016
-+++ plugins/mmexternal/mmexternal.c Thu Mar  3 13:19:51 2016
-@@ -31,7 +31,7 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
- #include <sys/wait.h>
- #else
- #include <wait.h>
Index: patches/patch-runtime_msg_c
===================================================================
RCS file: patches/patch-runtime_msg_c
diff -N patches/patch-runtime_msg_c
--- patches/patch-runtime_msg_c 18 Feb 2018 14:36:30 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-runtime_msg_c,v 1.1 2018/02/18 14:36:30 bket Exp $
-
-Index: runtime/msg.c
---- runtime/msg.c.orig
-+++ runtime/msg.c
-@@ -27,6 +27,8 @@
-  * A copy of the GPL can be found in the file "COPYING" in this distribution.
-  * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
-  */
-+#define JSON_C_VER_013 (13 << 8)
-+
- #include "config.h"
- #include <stdio.h>
- #include <stdarg.h>
-@@ -43,7 +45,9 @@
- #include <libestr.h>
- #include <json.h>
- /* For struct json_object_iter, should not be necessary in future versions */
-+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
- #include <json_object_private.h>
-+#endif
- #if HAVE_MALLOC_H
- #  include <malloc.h>
- #endif
Index: patches/patch-tools_rsyslogd_c
===================================================================
RCS file: patches/patch-tools_rsyslogd_c
diff -N patches/patch-tools_rsyslogd_c
--- patches/patch-tools_rsyslogd_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-tools_rsyslogd_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- tools/rsyslogd.c.orig Thu Mar  3 13:20:29 2016
-+++ tools/rsyslogd.c Thu Mar  3 13:21:39 2016
-@@ -29,7 +29,7 @@
- #ifdef HAVE_LIBLOGGING_STDLOG
- #  include <liblogging/stdlog.h>
- #endif
--#ifdef OS_SOLARIS
-+#if defined(OS_SOLARIS) || defined(__OpenBSD__)
- # include <errno.h>
- #else
- # include <sys/errno.h>
Index: pkg/DESCR-elasticsearch
===================================================================
RCS file: pkg/DESCR-elasticsearch
diff -N pkg/DESCR-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-elasticsearch 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+Elasticsearch plugin for Rsyslog.
+
Index: pkg/DESCR-normalize
===================================================================
RCS file: pkg/DESCR-normalize
diff -N pkg/DESCR-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-normalize 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1 @@
+liblognorm plugin for rsyslog
Index: pkg/PLIST-elasticsearch
===================================================================
RCS file: pkg/PLIST-elasticsearch
diff -N pkg/PLIST-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-elasticsearch 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/omelasticsearch.so
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 15 Mar 2016 23:25:51 -0000 1.2
+++ pkg/PLIST-main 6 Mar 2018 21:38:54 -0000
@@ -1,4 +1,6 @@
 @comment $OpenBSD: PLIST-main,v 1.2 2016/03/15 23:25:51 sthen Exp $
+@newgroup _rsyslogd:803
+@newuser _rsyslogd:803:_rsyslogd:daemon:Rsyslog Daemon:/nonexistent:/sbin/nologin
 lib/rsyslog/
 lib/rsyslog/imklog.so
 lib/rsyslog/immark.so
@@ -26,3 +28,4 @@ lib/rsyslog/omtesting.so
 share/examples/rsyslog/
 share/examples/rsyslog/rsyslog.conf
 @sample ${SYSCONFDIR}/rsyslog.conf
+@rcscript ${RCDIR}/rsyslogd
Index: pkg/PLIST-normalize
===================================================================
RCS file: pkg/PLIST-normalize
diff -N pkg/PLIST-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-normalize 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/mmnormalize.so
Index: pkg/rsyslogd.rc
===================================================================
RCS file: pkg/rsyslogd.rc
diff -N pkg/rsyslogd.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/rsyslogd.rc 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/rsyslogd"
+
+rc_reload=NO
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Remi Locherer
On Tue, Mar 06, 2018 at 10:43:46PM +0100, Remi Locherer wrote:

> On Thu, Feb 08, 2018 at 03:17:46PM +0100, Remi Locherer wrote:
> > Hi,
> >
> > This updates rsyslogd to the current version and adds two new modules.
> > It needs the updated librelp that I sent earlier.
> >
> > I looked into upstreaming the remaining patch but that is not necessary.
> > The next version of rsyslog will include <sys/wait.h> for all platforms.
> >
> > I tested it on i386 (imudp + omrelp) and on amd64 (imrelp, ommysql,
> > omelasticsearch).
> >
> > The "CFLAGS += -march=i686" seems not to be needed anymore for i386.
> > I guess because clang is now used.
>
> In the meantime rsyslog 8.33.0 was released. Updated diff below.

Few hours ago 8.33.1 was released. In the changelog they say:
  - 8.33.0 tarball release was actually pre-8.33.0

Everything that I tested with 8.32.0 is still ok.

OK?

Remi


Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile 18 Feb 2018 14:36:30 -0000 1.39
+++ Makefile 6 Mar 2018 21:53:56 -0000
@@ -4,44 +4,53 @@ BROKEN-powerpc = 64-bit atomics (__sync_
 
 COMMENT-main = syslog daemon supporting databases, TCP, SSL, RELP
 COMMENT-mysql = MySQL plugin for rsyslog
+COMMENT-normalize = liblognorm plugin for rsyslog
 COMMENT-pgsql = PostgreSQL plugin for rsyslog
+COMMENT-elasticsearch = Elasticsearch plugin for rsyslog
 
-MULTI_PACKAGES = -main -mysql -pgsql
+MULTI_PACKAGES = -main -mysql -normalize -pgsql -elasticsearch
 
-V = 8.16.0
+V = 8.33.1
 DISTNAME = rsyslog-$V
 PKGNAME-main = rsyslog-$V
 PKGNAME-mysql = rsyslog-mysql-$V
+PKGNAME-normalize = rsyslog-normalize-$V
 PKGNAME-pgsql = rsyslog-pgsql-$V
+PKGNAME-elasticsearch = rsyslog-elasticsearch-$V
 CATEGORIES = sysutils
-REVISION-main = 4
-REVISION-mysql = 1
-REVISION-pgsql = 1
 
 HOMEPAGE = http://www.rsyslog.com/
 
+MAINTAINER = Remi Locherer <[hidden email]>
+
 # GPLv3+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB-main += c estr ffi gcrypt gmp gnutls gpg-error hogweed iconv
-WANTLIB-main += idn2 intl json-c nettle p11-kit pthread relp tasn1
+WANTLIB-main += c curl estr fastjson ffi gcrypt gmp gnutls gpg-error
+WANTLIB-main += hogweed idn2 nettle p11-kit pthread relp tasn1
 WANTLIB-main += unistring uuid z
 
 WANTLIB-mysql += crypto m mysqlclient pthread ssl ${COMPILER_LIBCXX} z
 
+WANTLIB-normalize += lognorm
+
 WANTLIB-pgsql += crypto pq ssl
 
-LIB_DEPENDS-main = devel/json-c \
- devel/libestr>=0.1.2 \
- security/libgcrypt \
- security/gnutls \
- sysutils/librelp>=1.2.9
+LIB_DEPENDS-main = devel/libfastjson \
+ devel/libestr \
+ net/curl \
+ security/libgcrypt \
+ security/gnutls \
+ sysutils/librelp
 # XXX should port to using libc UUID functions
-LIB_DEPENDS-main += sysutils/e2fsprogs
-LIB_DEPENDS-mysql = databases/mariadb
-RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
-LIB_DEPENDS-pgsql = databases/postgresql
-RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-main += sysutils/e2fsprogs
+LIB_DEPENDS-mysql = databases/mariadb
+RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-normalize = devel/liblognorm
+RUN_DEPENDS-normalize = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-pgsql = databases/postgresql
+RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
+RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
 
 MASTER_SITES = http://www.rsyslog.com/files/download/rsyslog/ \
  http://download.rsyslog.com/rsyslog/
@@ -51,8 +60,10 @@ LIBTOOL_FLAGS = --tag=disable-static
 CONFIGURE_ARGS += --enable-pgsql \
  --enable-mysql \
  --enable-mail \
+ --enable-mmnormalize \
  --enable-gnutls \
  --enable-relp \
+ --enable-elasticsearch \
  --disable-liblogging-stdlog
 CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include"
 
@@ -65,10 +76,5 @@ post-install:
     ${PREFIX}/share/examples/rsyslog/createDB_mysql.sql
  ${INSTALL_DATA} ${WRKSRC}/plugins/ompgsql/createDB.sql \
     ${PREFIX}/share/examples/rsyslog/createDB_pgsql.sql
-
-.if ${MACHINE_ARCH:Mi386}
-# 64-bit atomics
-CFLAGS += -march=i686
-.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 15 Mar 2016 23:25:51 -0000 1.4
+++ distinfo 6 Mar 2018 21:54:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (rsyslog-8.16.0.tar.gz) = T+T5fBCJkIbZi5QB1+jSvP9hx8P3zehieJHjb8bsG3Y=
-SIZE (rsyslog-8.16.0.tar.gz) = 2132012
+SHA256 (rsyslog-8.33.1.tar.gz) = LaK9dz29X95OsWLVQR2slr9ZazPmKkBiYQRDaGWX46g=
+SIZE (rsyslog-8.33.1.tar.gz) = 2494338
Index: files/rsyslog.conf
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/files/rsyslog.conf,v
retrieving revision 1.1
diff -u -p -r1.1 rsyslog.conf
--- files/rsyslog.conf 15 Mar 2016 23:25:51 -0000 1.1
+++ files/rsyslog.conf 26 Feb 2018 22:43:08 -0000
@@ -6,14 +6,14 @@
 # like we have with the default config. For more advanced
 # things, RainerScript configuration is suggested.
 #
-# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
-# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html 
+# For more information see http://www.rsyslog.com/doc/rsyslog_conf.html 
 # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
 
 #### MODULES ####
 
 module(load="imuxsock") # provides support for local system logging (e.g. via logger command)
-module(load="imklog")   # provides kernel logging support (previously done by rklogd)
+# on OpenBSD sendsyslog(2) is used for logging - imklog will not receive logs
+#module(load="imklog")   # provides kernel logging support (previously done by rklogd)
 #module(load"immark")  # provides --MARK-- message capability
 
 # Provides UDP syslog reception
@@ -39,6 +39,10 @@ $ActionFileDefaultTemplate RSYSLOG_Tradi
 # Include all config files in /etc/rsyslog.d/
 $IncludeConfig ${SYSCONFDIR}/rsyslog.d/*.conf
 
+# Drop root privileges
+# See http://wiki.rsyslog.com/index.php/Security#Dropping_Privileges
+$PrivDropToUser _rsyslogd
+$PrivDropToGroup _rsyslogd
 
 #### RULES ####
 
Index: patches/patch-grammar_lexer_l
===================================================================
RCS file: patches/patch-grammar_lexer_l
diff -N patches/patch-grammar_lexer_l
--- patches/patch-grammar_lexer_l 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-grammar_lexer_l,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- grammar/lexer.l.orig Thu Mar  3 13:18:38 2016
-+++ grammar/lexer.l Thu Mar  3 13:18:52 2016
-@@ -97,7 +97,7 @@ extern int yydebug;
- /* somehow, I need these prototype even though the headers are
-  * included. I guess that's some autotools magic I don't understand...
-  */
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
- int fileno(FILE *stream);
- #endif
-
Index: patches/patch-plugins_mmexternal_mmexternal_c
===================================================================
RCS file: patches/patch-plugins_mmexternal_mmexternal_c
diff -N patches/patch-plugins_mmexternal_mmexternal_c
--- patches/patch-plugins_mmexternal_mmexternal_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-plugins_mmexternal_mmexternal_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- plugins/mmexternal/mmexternal.c.orig Thu Mar  3 13:19:44 2016
-+++ plugins/mmexternal/mmexternal.c Thu Mar  3 13:19:51 2016
-@@ -31,7 +31,7 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
- #include <sys/wait.h>
- #else
- #include <wait.h>
Index: patches/patch-runtime_msg_c
===================================================================
RCS file: patches/patch-runtime_msg_c
diff -N patches/patch-runtime_msg_c
--- patches/patch-runtime_msg_c 18 Feb 2018 14:36:30 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-runtime_msg_c,v 1.1 2018/02/18 14:36:30 bket Exp $
-
-Index: runtime/msg.c
---- runtime/msg.c.orig
-+++ runtime/msg.c
-@@ -27,6 +27,8 @@
-  * A copy of the GPL can be found in the file "COPYING" in this distribution.
-  * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
-  */
-+#define JSON_C_VER_013 (13 << 8)
-+
- #include "config.h"
- #include <stdio.h>
- #include <stdarg.h>
-@@ -43,7 +45,9 @@
- #include <libestr.h>
- #include <json.h>
- /* For struct json_object_iter, should not be necessary in future versions */
-+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
- #include <json_object_private.h>
-+#endif
- #if HAVE_MALLOC_H
- #  include <malloc.h>
- #endif
Index: patches/patch-tools_rsyslogd_c
===================================================================
RCS file: patches/patch-tools_rsyslogd_c
diff -N patches/patch-tools_rsyslogd_c
--- patches/patch-tools_rsyslogd_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-tools_rsyslogd_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- tools/rsyslogd.c.orig Thu Mar  3 13:20:29 2016
-+++ tools/rsyslogd.c Thu Mar  3 13:21:39 2016
-@@ -29,7 +29,7 @@
- #ifdef HAVE_LIBLOGGING_STDLOG
- #  include <liblogging/stdlog.h>
- #endif
--#ifdef OS_SOLARIS
-+#if defined(OS_SOLARIS) || defined(__OpenBSD__)
- # include <errno.h>
- #else
- # include <sys/errno.h>
Index: pkg/DESCR-elasticsearch
===================================================================
RCS file: pkg/DESCR-elasticsearch
diff -N pkg/DESCR-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-elasticsearch 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+Elasticsearch plugin for Rsyslog.
+
Index: pkg/DESCR-normalize
===================================================================
RCS file: pkg/DESCR-normalize
diff -N pkg/DESCR-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-normalize 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1 @@
+liblognorm plugin for rsyslog
Index: pkg/PLIST-elasticsearch
===================================================================
RCS file: pkg/PLIST-elasticsearch
diff -N pkg/PLIST-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-elasticsearch 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/omelasticsearch.so
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 15 Mar 2016 23:25:51 -0000 1.2
+++ pkg/PLIST-main 6 Mar 2018 21:38:54 -0000
@@ -1,4 +1,6 @@
 @comment $OpenBSD: PLIST-main,v 1.2 2016/03/15 23:25:51 sthen Exp $
+@newgroup _rsyslogd:803
+@newuser _rsyslogd:803:_rsyslogd:daemon:Rsyslog Daemon:/nonexistent:/sbin/nologin
 lib/rsyslog/
 lib/rsyslog/imklog.so
 lib/rsyslog/immark.so
@@ -26,3 +28,4 @@ lib/rsyslog/omtesting.so
 share/examples/rsyslog/
 share/examples/rsyslog/rsyslog.conf
 @sample ${SYSCONFDIR}/rsyslog.conf
+@rcscript ${RCDIR}/rsyslogd
Index: pkg/PLIST-normalize
===================================================================
RCS file: pkg/PLIST-normalize
diff -N pkg/PLIST-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-normalize 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/mmnormalize.so
Index: pkg/rsyslogd.rc
===================================================================
RCS file: pkg/rsyslogd.rc
diff -N pkg/rsyslogd.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/rsyslogd.rc 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/rsyslogd"
+
+rc_reload=NO
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Daniel Jakots-3
On Tue, 6 Mar 2018 23:45:50 +0100, Remi Locherer
<[hidden email]> wrote:

> > > This updates rsyslogd to the current version and adds two new
> > > modules.

/usr/ports/sysutils/rsyslog$ make lib-depends-check

rsyslog-8.33.1(sysutils/rsyslog,-main):
Missing: crypto.42 (/usr/local/sbin/rsyslogd) (system lib)
Missing: iconv.6 from libiconv-1.14p3 (/usr/local/lib/rsyslog/omrelp.so)
Missing: intl.6 from gettext-0.19.8.1p1 (/usr/local/lib/rsyslog/omrelp.so)
Missing: nghttp2.0 from nghttp2-1.31.0 (/usr/local/sbin/rsyslogd)
Missing: ssl.44 (/usr/local/sbin/rsyslogd) (system lib)
WANTLIB += crypto iconv intl nghttp2 ssl

rsyslog-normalize-8.33.1(sysutils/rsyslog,-normalize):
Missing: estr.0 from libestr-0.1.10p0 (/usr/local/lib/rsyslog/mmnormalize.so)
Missing: fastjson.0 from libfastjson-0.99.8 (/usr/local/lib/rsyslog/mmnormalize.so)
Missing: pthread.25 (/usr/local/lib/rsyslog/mmnormalize.so) (system lib)
WANTLIB += estr fastjson pthread

rsyslog-pgsql-8.33.1(sysutils/rsyslog,-pgsql):
Missing: pthread.25 (/usr/local/lib/rsyslog/ompgsql.so) (system lib)
WANTLIB += pthread

rsyslog-elasticsearch-8.33.1(sysutils/rsyslog,-elasticsearch):
Missing: crypto.42 (/usr/local/lib/rsyslog/omelasticsearch.so) (system lib)
Missing: curl.25 from curl-7.58.0p0 (/usr/local/lib/rsyslog/omelasticsearch.so)
Missing: m.10 (/usr/local/lib/rsyslog/omelasticsearch.so) (system lib)
Missing: nghttp2.0 from nghttp2-1.31.0 (/usr/local/lib/rsyslog/omelasticsearch.so)
Missing: pthread.25 (/usr/local/lib/rsyslog/omelasticsearch.so) (system lib)
Missing: ssl.44 (/usr/local/lib/rsyslog/omelasticsearch.so) (system lib)
Missing: z.5 (/usr/local/lib/rsyslog/omelasticsearch.so) (system lib)
WANTLIB += crypto curl m nghttp2 pthread ssl z
Scanning: ok
*** Error 1 in /usr/ports/sysutils/rsyslog (/usr/ports/infrastructure/mk/bsd.port.mk:2234 'lib-depends-check')


other than that, seems fine

> > > The "CFLAGS += -march=i686" seems not to be needed anymore for
> > > i386. I guess because clang is now used.  

I don't know about that but since other didn't say anything, I guess
it's fine

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Stuart Henderson
In reply to this post by Remi Locherer
On 2018/03/06 23:45, Remi Locherer wrote:
> On Tue, Mar 06, 2018 at 10:43:46PM +0100, Remi Locherer wrote:
> > On Thu, Feb 08, 2018 at 03:17:46PM +0100, Remi Locherer wrote:
> > > Hi,
> > >
> > > This updates rsyslogd to the current version and adds two new modules.
> > > It needs the updated librelp that I sent earlier.

Since this was quite a recent update, it probably makes sense to use
sysutils/librelp>=1.2.14 in LIB_DEPENDS for this.

> > > I looked into upstreaming the remaining patch but that is not necessary.
> > > The next version of rsyslog will include <sys/wait.h> for all platforms.
> > >
> > > I tested it on i386 (imudp + omrelp) and on amd64 (imrelp, ommysql,
> > > omelasticsearch).
> > >
> > > The "CFLAGS += -march=i686" seems not to be needed anymore for i386.
> > > I guess because clang is now used.

If it builds on i386 without this, then that's alright.

> > In the meantime rsyslog 8.33.0 was released. Updated diff below.
>
> Few hours ago 8.33.1 was released. In the changelog they say:
>   - 8.33.0 tarball release was actually pre-8.33.0
>
> Everything that I tested with 8.32.0 is still ok.
>
> OK?
>
> Remi
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/rsyslog/Makefile,v
> retrieving revision 1.39
> diff -u -p -r1.39 Makefile
> --- Makefile 18 Feb 2018 14:36:30 -0000 1.39
> +++ Makefile 6 Mar 2018 21:53:56 -0000
> @@ -4,44 +4,53 @@ BROKEN-powerpc = 64-bit atomics (__sync_
>  
>  COMMENT-main = syslog daemon supporting databases, TCP, SSL, RELP
>  COMMENT-mysql = MySQL plugin for rsyslog
> +COMMENT-normalize = liblognorm plugin for rsyslog
>  COMMENT-pgsql = PostgreSQL plugin for rsyslog
> +COMMENT-elasticsearch = Elasticsearch plugin for rsyslog
>  
> -MULTI_PACKAGES = -main -mysql -pgsql
> +MULTI_PACKAGES = -main -mysql -normalize -pgsql -elasticsearch
>  
> -V = 8.16.0
> +V = 8.33.1
>  DISTNAME = rsyslog-$V
>  PKGNAME-main = rsyslog-$V
>  PKGNAME-mysql = rsyslog-mysql-$V
> +PKGNAME-normalize = rsyslog-normalize-$V
>  PKGNAME-pgsql = rsyslog-pgsql-$V
> +PKGNAME-elasticsearch = rsyslog-elasticsearch-$V
>  CATEGORIES = sysutils
> -REVISION-main = 4
> -REVISION-mysql = 1
> -REVISION-pgsql = 1
>  
>  HOMEPAGE = http://www.rsyslog.com/
>  
> +MAINTAINER = Remi Locherer <[hidden email]>
> +
>  # GPLv3+
>  PERMIT_PACKAGE_CDROM = Yes
>  
> -WANTLIB-main += c estr ffi gcrypt gmp gnutls gpg-error hogweed iconv
> -WANTLIB-main += idn2 intl json-c nettle p11-kit pthread relp tasn1
> +WANTLIB-main += c curl estr fastjson ffi gcrypt gmp gnutls gpg-error
> +WANTLIB-main += hogweed idn2 nettle p11-kit pthread relp tasn1
>  WANTLIB-main += unistring uuid z
>  
>  WANTLIB-mysql += crypto m mysqlclient pthread ssl ${COMPILER_LIBCXX} z
>  
> +WANTLIB-normalize += lognorm
> +
>  WANTLIB-pgsql += crypto pq ssl

the WANTLIB block should be:

WANTLIB-main += c crypto curl estr fastjson ffi gcrypt gmp gnutls gpg-error
WANTLIB-main += hogweed iconv idn2 intl nettle nghttp2 p11-kit pthread
WANTLIB-main += relp ssl tasn1 unistring uuid z

WANTLIB-mysql += ${COMPILER_LIBCXX} crypto m mysqlclient ssl z

WANTLIB-normalize += estr fastjson lognorm pthread

WANTLIB-pgsql += crypto pq pthread ssl

WANTLIB-elasticsearch += crypto m pthread ssl z

> -LIB_DEPENDS-main = devel/json-c \
> - devel/libestr>=0.1.2 \
> - security/libgcrypt \
> - security/gnutls \
> - sysutils/librelp>=1.2.9
> +LIB_DEPENDS-main = devel/libfastjson \
> + devel/libestr \
> + net/curl \
> + security/libgcrypt \
> + security/gnutls \
> + sysutils/librelp
>  # XXX should port to using libc UUID functions
> -LIB_DEPENDS-main += sysutils/e2fsprogs
> -LIB_DEPENDS-mysql = databases/mariadb
> -RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
> -LIB_DEPENDS-pgsql = databases/postgresql
> -RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
> +LIB_DEPENDS-main += sysutils/e2fsprogs
> +LIB_DEPENDS-mysql = databases/mariadb
> +RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
> +LIB_DEPENDS-normalize = devel/liblognorm
> +RUN_DEPENDS-normalize = ${PKGNAME-main}:${PKGPATH},-main
> +LIB_DEPENDS-pgsql = databases/postgresql
> +RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
> +RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
>  
>  MASTER_SITES = http://www.rsyslog.com/files/download/rsyslog/ \
>   http://download.rsyslog.com/rsyslog/
> @@ -51,8 +60,10 @@ LIBTOOL_FLAGS = --tag=disable-static
>  CONFIGURE_ARGS += --enable-pgsql \
>   --enable-mysql \
>   --enable-mail \
> + --enable-mmnormalize \
>   --enable-gnutls \
>   --enable-relp \
> + --enable-elasticsearch \
>   --disable-liblogging-stdlog
>  CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include"
>  
> @@ -65,10 +76,5 @@ post-install:
>      ${PREFIX}/share/examples/rsyslog/createDB_mysql.sql
>   ${INSTALL_DATA} ${WRKSRC}/plugins/ompgsql/createDB.sql \
>      ${PREFIX}/share/examples/rsyslog/createDB_pgsql.sql
> -
> -.if ${MACHINE_ARCH:Mi386}
> -# 64-bit atomics
> -CFLAGS += -march=i686
> -.endif
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/rsyslog/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- distinfo 15 Mar 2016 23:25:51 -0000 1.4
> +++ distinfo 6 Mar 2018 21:54:05 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (rsyslog-8.16.0.tar.gz) = T+T5fBCJkIbZi5QB1+jSvP9hx8P3zehieJHjb8bsG3Y=
> -SIZE (rsyslog-8.16.0.tar.gz) = 2132012
> +SHA256 (rsyslog-8.33.1.tar.gz) = LaK9dz29X95OsWLVQR2slr9ZazPmKkBiYQRDaGWX46g=
> +SIZE (rsyslog-8.33.1.tar.gz) = 2494338
> Index: files/rsyslog.conf
> ===================================================================
> RCS file: /cvs/ports/sysutils/rsyslog/files/rsyslog.conf,v
> retrieving revision 1.1
> diff -u -p -r1.1 rsyslog.conf
> --- files/rsyslog.conf 15 Mar 2016 23:25:51 -0000 1.1
> +++ files/rsyslog.conf 26 Feb 2018 22:43:08 -0000
> @@ -6,14 +6,14 @@
>  # like we have with the default config. For more advanced
>  # things, RainerScript configuration is suggested.
>  #
> -# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
> -# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html 
> +# For more information see http://www.rsyslog.com/doc/rsyslog_conf.html 
>  # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
>  
>  #### MODULES ####
>  
>  module(load="imuxsock") # provides support for local system logging (e.g. via logger command)
> -module(load="imklog")   # provides kernel logging support (previously done by rklogd)
> +# on OpenBSD sendsyslog(2) is used for logging - imklog will not receive logs
> +#module(load="imklog")   # provides kernel logging support (previously done by rklogd)
>  #module(load"immark")  # provides --MARK-- message capability
>  
>  # Provides UDP syslog reception
> @@ -39,6 +39,10 @@ $ActionFileDefaultTemplate RSYSLOG_Tradi
>  # Include all config files in /etc/rsyslog.d/
>  $IncludeConfig ${SYSCONFDIR}/rsyslog.d/*.conf
>  
> +# Drop root privileges
> +# See http://wiki.rsyslog.com/index.php/Security#Dropping_Privileges
> +$PrivDropToUser _rsyslogd
> +$PrivDropToGroup _rsyslogd
>  
>  #### RULES ####
>  
> Index: patches/patch-grammar_lexer_l
> ===================================================================
> RCS file: patches/patch-grammar_lexer_l
> diff -N patches/patch-grammar_lexer_l
> --- patches/patch-grammar_lexer_l 15 Mar 2016 23:25:51 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-grammar_lexer_l,v 1.1 2016/03/15 23:25:51 sthen Exp $
> ---- grammar/lexer.l.orig Thu Mar  3 13:18:38 2016
> -+++ grammar/lexer.l Thu Mar  3 13:18:52 2016
> -@@ -97,7 +97,7 @@ extern int yydebug;
> - /* somehow, I need these prototype even though the headers are
> -  * included. I guess that's some autotools magic I don't understand...
> -  */
> --#if !defined(__FreeBSD__)
> -+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
> - int fileno(FILE *stream);
> - #endif
> -
> Index: patches/patch-plugins_mmexternal_mmexternal_c
> ===================================================================
> RCS file: patches/patch-plugins_mmexternal_mmexternal_c
> diff -N patches/patch-plugins_mmexternal_mmexternal_c
> --- patches/patch-plugins_mmexternal_mmexternal_c 15 Mar 2016 23:25:51 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-plugins_mmexternal_mmexternal_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
> ---- plugins/mmexternal/mmexternal.c.orig Thu Mar  3 13:19:44 2016
> -+++ plugins/mmexternal/mmexternal.c Thu Mar  3 13:19:51 2016
> -@@ -31,7 +31,7 @@
> - #include <errno.h>
> - #include <unistd.h>
> - #include <fcntl.h>
> --#if defined(__FreeBSD__)
> -+#if defined(__FreeBSD__) || defined(__OpenBSD__)
> - #include <sys/wait.h>
> - #else
> - #include <wait.h>
> Index: patches/patch-runtime_msg_c
> ===================================================================
> RCS file: patches/patch-runtime_msg_c
> diff -N patches/patch-runtime_msg_c
> --- patches/patch-runtime_msg_c 18 Feb 2018 14:36:30 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,24 +0,0 @@
> -$OpenBSD: patch-runtime_msg_c,v 1.1 2018/02/18 14:36:30 bket Exp $
> -
> -Index: runtime/msg.c
> ---- runtime/msg.c.orig
> -+++ runtime/msg.c
> -@@ -27,6 +27,8 @@
> -  * A copy of the GPL can be found in the file "COPYING" in this distribution.
> -  * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
> -  */
> -+#define JSON_C_VER_013 (13 << 8)
> -+
> - #include "config.h"
> - #include <stdio.h>
> - #include <stdarg.h>
> -@@ -43,7 +45,9 @@
> - #include <libestr.h>
> - #include <json.h>
> - /* For struct json_object_iter, should not be necessary in future versions */
> -+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
> - #include <json_object_private.h>
> -+#endif
> - #if HAVE_MALLOC_H
> - #  include <malloc.h>
> - #endif
> Index: patches/patch-tools_rsyslogd_c
> ===================================================================
> RCS file: patches/patch-tools_rsyslogd_c
> diff -N patches/patch-tools_rsyslogd_c
> --- patches/patch-tools_rsyslogd_c 15 Mar 2016 23:25:51 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-tools_rsyslogd_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
> ---- tools/rsyslogd.c.orig Thu Mar  3 13:20:29 2016
> -+++ tools/rsyslogd.c Thu Mar  3 13:21:39 2016
> -@@ -29,7 +29,7 @@
> - #ifdef HAVE_LIBLOGGING_STDLOG
> - #  include <liblogging/stdlog.h>
> - #endif
> --#ifdef OS_SOLARIS
> -+#if defined(OS_SOLARIS) || defined(__OpenBSD__)
> - # include <errno.h>
> - #else
> - # include <sys/errno.h>
> Index: pkg/DESCR-elasticsearch
> ===================================================================
> RCS file: pkg/DESCR-elasticsearch
> diff -N pkg/DESCR-elasticsearch
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/DESCR-elasticsearch 26 Feb 2018 22:43:08 -0000
> @@ -0,0 +1,2 @@
> +Elasticsearch plugin for Rsyslog.
> +

Please remove extra blank line ^^

> Index: pkg/DESCR-normalize
> ===================================================================
> RCS file: pkg/DESCR-normalize
> diff -N pkg/DESCR-normalize
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/DESCR-normalize 26 Feb 2018 22:43:08 -0000
> @@ -0,0 +1 @@
> +liblognorm plugin for rsyslog

Inconsistent formatting, the other DESCRs all use the form
"XXX plugin for Rsyslog."

> Index: pkg/PLIST-elasticsearch
> ===================================================================
> RCS file: pkg/PLIST-elasticsearch
> diff -N pkg/PLIST-elasticsearch
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/PLIST-elasticsearch 26 Feb 2018 22:43:08 -0000
> @@ -0,0 +1,2 @@
> +@comment $OpenBSD$
> +lib/rsyslog/omelasticsearch.so
> Index: pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-main,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST-main
> --- pkg/PLIST-main 15 Mar 2016 23:25:51 -0000 1.2
> +++ pkg/PLIST-main 6 Mar 2018 21:38:54 -0000
> @@ -1,4 +1,6 @@
>  @comment $OpenBSD: PLIST-main,v 1.2 2016/03/15 23:25:51 sthen Exp $
> +@newgroup _rsyslogd:803
> +@newuser _rsyslogd:803:_rsyslogd:daemon:Rsyslog Daemon:/nonexistent:/sbin/nologin
>  lib/rsyslog/
>  lib/rsyslog/imklog.so
>  lib/rsyslog/immark.so
> @@ -26,3 +28,4 @@ lib/rsyslog/omtesting.so
>  share/examples/rsyslog/
>  share/examples/rsyslog/rsyslog.conf
>  @sample ${SYSCONFDIR}/rsyslog.conf
> +@rcscript ${RCDIR}/rsyslogd
> Index: pkg/PLIST-normalize
> ===================================================================
> RCS file: pkg/PLIST-normalize
> diff -N pkg/PLIST-normalize
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/PLIST-normalize 26 Feb 2018 22:43:08 -0000
> @@ -0,0 +1,2 @@
> +@comment $OpenBSD$
> +lib/rsyslog/mmnormalize.so
> Index: pkg/rsyslogd.rc
> ===================================================================
> RCS file: pkg/rsyslogd.rc
> diff -N pkg/rsyslogd.rc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/rsyslogd.rc 26 Feb 2018 22:43:08 -0000
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +#
> +# $OpenBSD$
> +
> +daemon="${TRUEPREFIX}/sbin/rsyslogd"
> +
> +rc_reload=NO
> +
> +. /etc/rc.d/rc.subr
> +
> +rc_cmd $1
>

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Remi Locherer
In reply to this post by Daniel Jakots-3
On Tue, Mar 06, 2018 at 08:47:25PM -0500, Daniel Jakots wrote:

> On Tue, 6 Mar 2018 23:45:50 +0100, Remi Locherer
> <[hidden email]> wrote:
>
> > > > This updates rsyslogd to the current version and adds two new
> > > > modules.
>
> /usr/ports/sysutils/rsyslog$ make lib-depends-check
>
> rsyslog-8.33.1(sysutils/rsyslog,-main):
> Missing: crypto.42 (/usr/local/sbin/rsyslogd) (system lib)
> Missing: iconv.6 from libiconv-1.14p3 (/usr/local/lib/rsyslog/omrelp.so)
[..]
> Scanning: ok
> *** Error 1 in /usr/ports/sysutils/rsyslog (/usr/ports/infrastructure/mk/bsd.port.mk:2234 'lib-depends-check')
>

Thank you for spotting this. Fixed diff below. Also including stehn@'s
suggestion to add the required version for the librelp dependency.



Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile 18 Feb 2018 14:36:30 -0000 1.39
+++ Makefile 8 Mar 2018 00:27:06 -0000
@@ -4,44 +4,55 @@ BROKEN-powerpc = 64-bit atomics (__sync_
 
 COMMENT-main = syslog daemon supporting databases, TCP, SSL, RELP
 COMMENT-mysql = MySQL plugin for rsyslog
+COMMENT-normalize = liblognorm plugin for rsyslog
 COMMENT-pgsql = PostgreSQL plugin for rsyslog
+COMMENT-elasticsearch = Elasticsearch plugin for rsyslog
 
-MULTI_PACKAGES = -main -mysql -pgsql
+MULTI_PACKAGES = -main -mysql -normalize -pgsql -elasticsearch
 
-V = 8.16.0
+V = 8.33.1
 DISTNAME = rsyslog-$V
 PKGNAME-main = rsyslog-$V
 PKGNAME-mysql = rsyslog-mysql-$V
+PKGNAME-normalize = rsyslog-normalize-$V
 PKGNAME-pgsql = rsyslog-pgsql-$V
+PKGNAME-elasticsearch = rsyslog-elasticsearch-$V
 CATEGORIES = sysutils
-REVISION-main = 4
-REVISION-mysql = 1
-REVISION-pgsql = 1
 
 HOMEPAGE = http://www.rsyslog.com/
 
+MAINTAINER = Remi Locherer <[hidden email]>
+
 # GPLv3+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB-main += c estr ffi gcrypt gmp gnutls gpg-error hogweed iconv
-WANTLIB-main += idn2 intl json-c nettle p11-kit pthread relp tasn1
-WANTLIB-main += unistring uuid z
+WANTLIB-main += c crypto curl estr fastjson ffi gcrypt gmp gnutls
+WANTLIB-main += gpg-error hogweed iconv idn2 intl nettle nghttp2
+WANTLIB-main += p11-kit pthread relp ssl tasn1 unistring uuid z
 
 WANTLIB-mysql += crypto m mysqlclient pthread ssl ${COMPILER_LIBCXX} z
 
-WANTLIB-pgsql += crypto pq ssl
+WANTLIB-normalize += estr fastjson lognorm pthread
+
+WANTLIB-pgsql += crypto pq pthread ssl
 
-LIB_DEPENDS-main = devel/json-c \
- devel/libestr>=0.1.2 \
+WANTLIB-elasticsearch += crypto curl m nghttp2 pthread ssl z
+
+LIB_DEPENDS-main = devel/libfastjson \
+ devel/libestr \
+ net/curl \
  security/libgcrypt \
  security/gnutls \
- sysutils/librelp>=1.2.9
+ sysutils/librelp>=1.2.14
 # XXX should port to using libc UUID functions
 LIB_DEPENDS-main += sysutils/e2fsprogs
 LIB_DEPENDS-mysql = databases/mariadb
 RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
+LIB_DEPENDS-normalize = devel/liblognorm
+RUN_DEPENDS-normalize = ${PKGNAME-main}:${PKGPATH},-main
 LIB_DEPENDS-pgsql = databases/postgresql
 RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
+RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
 
 MASTER_SITES = http://www.rsyslog.com/files/download/rsyslog/ \
  http://download.rsyslog.com/rsyslog/
@@ -51,8 +62,10 @@ LIBTOOL_FLAGS = --tag=disable-static
 CONFIGURE_ARGS += --enable-pgsql \
  --enable-mysql \
  --enable-mail \
+ --enable-mmnormalize \
  --enable-gnutls \
  --enable-relp \
+ --enable-elasticsearch \
  --disable-liblogging-stdlog
 CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include"
 
@@ -65,10 +78,5 @@ post-install:
     ${PREFIX}/share/examples/rsyslog/createDB_mysql.sql
  ${INSTALL_DATA} ${WRKSRC}/plugins/ompgsql/createDB.sql \
     ${PREFIX}/share/examples/rsyslog/createDB_pgsql.sql
-
-.if ${MACHINE_ARCH:Mi386}
-# 64-bit atomics
-CFLAGS += -march=i686
-.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 15 Mar 2016 23:25:51 -0000 1.4
+++ distinfo 6 Mar 2018 21:54:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (rsyslog-8.16.0.tar.gz) = T+T5fBCJkIbZi5QB1+jSvP9hx8P3zehieJHjb8bsG3Y=
-SIZE (rsyslog-8.16.0.tar.gz) = 2132012
+SHA256 (rsyslog-8.33.1.tar.gz) = LaK9dz29X95OsWLVQR2slr9ZazPmKkBiYQRDaGWX46g=
+SIZE (rsyslog-8.33.1.tar.gz) = 2494338
Index: files/rsyslog.conf
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/files/rsyslog.conf,v
retrieving revision 1.1
diff -u -p -r1.1 rsyslog.conf
--- files/rsyslog.conf 15 Mar 2016 23:25:51 -0000 1.1
+++ files/rsyslog.conf 26 Feb 2018 22:43:08 -0000
@@ -6,14 +6,14 @@
 # like we have with the default config. For more advanced
 # things, RainerScript configuration is suggested.
 #
-# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
-# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html 
+# For more information see http://www.rsyslog.com/doc/rsyslog_conf.html 
 # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
 
 #### MODULES ####
 
 module(load="imuxsock") # provides support for local system logging (e.g. via logger command)
-module(load="imklog")   # provides kernel logging support (previously done by rklogd)
+# on OpenBSD sendsyslog(2) is used for logging - imklog will not receive logs
+#module(load="imklog")   # provides kernel logging support (previously done by rklogd)
 #module(load"immark")  # provides --MARK-- message capability
 
 # Provides UDP syslog reception
@@ -39,6 +39,10 @@ $ActionFileDefaultTemplate RSYSLOG_Tradi
 # Include all config files in /etc/rsyslog.d/
 $IncludeConfig ${SYSCONFDIR}/rsyslog.d/*.conf
 
+# Drop root privileges
+# See http://wiki.rsyslog.com/index.php/Security#Dropping_Privileges
+$PrivDropToUser _rsyslogd
+$PrivDropToGroup _rsyslogd
 
 #### RULES ####
 
Index: patches/patch-grammar_lexer_l
===================================================================
RCS file: patches/patch-grammar_lexer_l
diff -N patches/patch-grammar_lexer_l
--- patches/patch-grammar_lexer_l 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-grammar_lexer_l,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- grammar/lexer.l.orig Thu Mar  3 13:18:38 2016
-+++ grammar/lexer.l Thu Mar  3 13:18:52 2016
-@@ -97,7 +97,7 @@ extern int yydebug;
- /* somehow, I need these prototype even though the headers are
-  * included. I guess that's some autotools magic I don't understand...
-  */
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
- int fileno(FILE *stream);
- #endif
-
Index: patches/patch-plugins_mmexternal_mmexternal_c
===================================================================
RCS file: patches/patch-plugins_mmexternal_mmexternal_c
diff -N patches/patch-plugins_mmexternal_mmexternal_c
--- patches/patch-plugins_mmexternal_mmexternal_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-plugins_mmexternal_mmexternal_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- plugins/mmexternal/mmexternal.c.orig Thu Mar  3 13:19:44 2016
-+++ plugins/mmexternal/mmexternal.c Thu Mar  3 13:19:51 2016
-@@ -31,7 +31,7 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
- #include <sys/wait.h>
- #else
- #include <wait.h>
Index: patches/patch-runtime_msg_c
===================================================================
RCS file: patches/patch-runtime_msg_c
diff -N patches/patch-runtime_msg_c
--- patches/patch-runtime_msg_c 18 Feb 2018 14:36:30 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-runtime_msg_c,v 1.1 2018/02/18 14:36:30 bket Exp $
-
-Index: runtime/msg.c
---- runtime/msg.c.orig
-+++ runtime/msg.c
-@@ -27,6 +27,8 @@
-  * A copy of the GPL can be found in the file "COPYING" in this distribution.
-  * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution.
-  */
-+#define JSON_C_VER_013 (13 << 8)
-+
- #include "config.h"
- #include <stdio.h>
- #include <stdarg.h>
-@@ -43,7 +45,9 @@
- #include <libestr.h>
- #include <json.h>
- /* For struct json_object_iter, should not be necessary in future versions */
-+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
- #include <json_object_private.h>
-+#endif
- #if HAVE_MALLOC_H
- #  include <malloc.h>
- #endif
Index: patches/patch-tools_rsyslogd_c
===================================================================
RCS file: patches/patch-tools_rsyslogd_c
diff -N patches/patch-tools_rsyslogd_c
--- patches/patch-tools_rsyslogd_c 15 Mar 2016 23:25:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-tools_rsyslogd_c,v 1.1 2016/03/15 23:25:51 sthen Exp $
---- tools/rsyslogd.c.orig Thu Mar  3 13:20:29 2016
-+++ tools/rsyslogd.c Thu Mar  3 13:21:39 2016
-@@ -29,7 +29,7 @@
- #ifdef HAVE_LIBLOGGING_STDLOG
- #  include <liblogging/stdlog.h>
- #endif
--#ifdef OS_SOLARIS
-+#if defined(OS_SOLARIS) || defined(__OpenBSD__)
- # include <errno.h>
- #else
- # include <sys/errno.h>
Index: pkg/DESCR-elasticsearch
===================================================================
RCS file: pkg/DESCR-elasticsearch
diff -N pkg/DESCR-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-elasticsearch 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+Elasticsearch plugin for Rsyslog.
+
Index: pkg/DESCR-normalize
===================================================================
RCS file: pkg/DESCR-normalize
diff -N pkg/DESCR-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-normalize 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1 @@
+liblognorm plugin for rsyslog
Index: pkg/PLIST-elasticsearch
===================================================================
RCS file: pkg/PLIST-elasticsearch
diff -N pkg/PLIST-elasticsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-elasticsearch 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/omelasticsearch.so
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-main
--- pkg/PLIST-main 15 Mar 2016 23:25:51 -0000 1.2
+++ pkg/PLIST-main 6 Mar 2018 21:38:54 -0000
@@ -1,4 +1,6 @@
 @comment $OpenBSD: PLIST-main,v 1.2 2016/03/15 23:25:51 sthen Exp $
+@newgroup _rsyslogd:803
+@newuser _rsyslogd:803:_rsyslogd:daemon:Rsyslog Daemon:/nonexistent:/sbin/nologin
 lib/rsyslog/
 lib/rsyslog/imklog.so
 lib/rsyslog/immark.so
@@ -26,3 +28,4 @@ lib/rsyslog/omtesting.so
 share/examples/rsyslog/
 share/examples/rsyslog/rsyslog.conf
 @sample ${SYSCONFDIR}/rsyslog.conf
+@rcscript ${RCDIR}/rsyslogd
Index: pkg/PLIST-normalize
===================================================================
RCS file: pkg/PLIST-normalize
diff -N pkg/PLIST-normalize
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-normalize 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+lib/rsyslog/mmnormalize.so
Index: pkg/rsyslogd.rc
===================================================================
RCS file: pkg/rsyslogd.rc
diff -N pkg/rsyslogd.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/rsyslogd.rc 26 Feb 2018 22:43:08 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/rsyslogd"
+
+rc_reload=NO
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Daniel Jakots-3
On Thu, 8 Mar 2018 22:18:01 +0100, Remi Locherer
<[hidden email]> wrote:

> +RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main

> + --enable-elasticsearch \

You added a subpackage for ES but shouldn't we have a ldep on
elasticsearch as it is with mysql/mariadb?

With that added (unless you think it's wrong), ok danj@

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Stuart Henderson
On 2018/03/10 22:11, Daniel Jakots wrote:

> On Thu, 8 Mar 2018 22:18:01 +0100, Remi Locherer
> <[hidden email]> wrote:
>
> > +RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
>
> > + --enable-elasticsearch \
>
> You added a subpackage for ES but shouldn't we have a ldep on
> elasticsearch as it is with mysql/mariadb?
>
> With that added (unless you think it's wrong), ok danj@
>

That is wrong, the elasticsearch package does not provide a library so
a LIB_DEPENDS dependency would just be stripped ("not needed for" message).

Since there is no extra dependency for this (I guess it just talks http),
I'd probably roll it into the main package, though having it as a separate
package is ok too.

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Remi Locherer
On Sun, Mar 11, 2018 at 09:07:03AM +0000, Stuart Henderson wrote:

> On 2018/03/10 22:11, Daniel Jakots wrote:
> > On Thu, 8 Mar 2018 22:18:01 +0100, Remi Locherer
> > <[hidden email]> wrote:
> >
> > > +RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
> >
> > > + --enable-elasticsearch \
> >
> > You added a subpackage for ES but shouldn't we have a ldep on
> > elasticsearch as it is with mysql/mariadb?
> >
> > With that added (unless you think it's wrong), ok danj@
> >
>
> That is wrong, the elasticsearch package does not provide a library so
> a LIB_DEPENDS dependency would just be stripped ("not needed for" message).
>

Exactly. The module omelasticsearch.so talks http with ES and for that it
links to libcurl and libnghttp2.

> Since there is no extra dependency for this (I guess it just talks http),
> I'd probably roll it into the main package, though having it as a separate
> package is ok too.

If it's preferable I can remove the subpackage and move the module to the
main package. I made it a subpackage because the other db output modules
are. One advantage of it being a subpackage might be that its easier to
find this functionality for an admin. But I don't have a strong opinion
on this.

Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Stuart Henderson
On 2018/03/11 10:56, Remi Locherer wrote:

> On Sun, Mar 11, 2018 at 09:07:03AM +0000, Stuart Henderson wrote:
> > On 2018/03/10 22:11, Daniel Jakots wrote:
> > > On Thu, 8 Mar 2018 22:18:01 +0100, Remi Locherer
> > > <[hidden email]> wrote:
> > >
> > > > +RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
> > >
> > > > + --enable-elasticsearch \
> > >
> > > You added a subpackage for ES but shouldn't we have a ldep on
> > > elasticsearch as it is with mysql/mariadb?
> > >
> > > With that added (unless you think it's wrong), ok danj@
> > >
> >
> > That is wrong, the elasticsearch package does not provide a library so
> > a LIB_DEPENDS dependency would just be stripped ("not needed for" message).
> >
>
> Exactly. The module omelasticsearch.so talks http with ES and for that it
> links to libcurl and libnghttp2.
>
> > Since there is no extra dependency for this (I guess it just talks http),
> > I'd probably roll it into the main package, though having it as a separate
> > package is ok too.
>
> If it's preferable I can remove the subpackage and move the module to the
> main package. I made it a subpackage because the other db output modules
> are. One advantage of it being a subpackage might be that its easier to
> find this functionality for an admin. But I don't have a strong opinion
> on this.

Really I'm ok with it either way, that's exactly the reason for having it
separate. If I was writing the port myself I'd roll it in, but totally
happy with it separate.

I think you should go ahead and commit, ok sthen@.


Reply | Threaded
Open this post in threaded view
|

Re: [update] rsyslog 8.33.1

Daniel Jakots-3
In reply to this post by Remi Locherer
On Sun, 11 Mar 2018 10:56:14 +0100, Remi Locherer
<[hidden email]> wrote:

> > > With that added (unless you think it's wrong), ok danj@
> > >  
> >
> > That is wrong, the elasticsearch package does not provide a library
> > so a LIB_DEPENDS dependency would just be stripped ("not needed
> > for" message).
>
> Exactly. The module omelasticsearch.so talks http with ES and for
> that it links to libcurl and libnghttp2.

Indeed, so ok danj@