New diff with tips from brad@

On Mon, Jan 21, 2013 at 11:16:23AM -0500, Brad Smith wrote:
>On Mon, Jan 21, 2013 at 11:02:32AM -0500, David Hill wrote:
>> Anyone?
>> 
>> On Thu, Jan 10, 2013 at 02:35:31PM -0500, David Hill wrote:
>> >This brings sysutils/rsyslog to 7.2.5. 
>> >Using this in production with postgresql on multiple machines.
>> >
>> >Please review and test.
>
>I looked at this port and your diff briefly...
>
>- Capitalize MySQL/Postgres in the COMMENTs properly 
>- Remove @comment's from the PLISTs and add to post-install
>  @rm ${PREFIX}/lib/rsyslog/*.la
>- Remove the --sysconfdir option from CONFIGURE_ARGS
>- Check if USE_GROFF is necessary or not
>

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/Makefile,v
retrieving revision 1.13
diff -N -u -p Makefile
--- Makefile    6 Oct 2012 09:17:23 -0000       1.13
+++ Makefile    22 Jan 2013 21:52:51 -0000
@@ -5,22 +5,18 @@ BROKEN-hppa =         lack of atomic ops
 SHARED_ONLY =          Yes
 
 COMMENT-main =         syslog daemon supporting databases, TCP, SSL, RELP
-COMMENT-mysql =                mysql plugin for rsyslog
-COMMENT-pgsql =                postgresql plugin for rsyslog
+COMMENT-mysql =                MySQL plugin for rsyslog
+COMMENT-pgsql =                Postgres plugin for rsyslog
 
 MULTI_PACKAGES =       -main -mysql -pgsql
 
-V =                    4.6.4
+V =                    7.2.5
 DISTNAME =             rsyslog-$V
 PKGNAME-main =         rsyslog-$V
 PKGNAME-mysql =                rsyslog-mysql-$V
 PKGNAME-pgsql =                rsyslog-pgsql-$V
 CATEGORIES =           sysutils
 
-REVISION-main =                5
-REVISION-mysql =       2
-REVISION-pgsql =       2
-
 HOMEPAGE =             http://www.rsyslog.com/
 
 # GPLv3+
@@ -31,13 +27,17 @@ PERMIT_DISTFILES_FTP =      Yes
 
 MODULES =              devel/gettext
 
-WANTLIB-main +=                c gmp hogweed nettle gnutls pthread p11-kit
-WANTLIB-main +=                relp tasn1 z ${MODGETTEXT_WANTLIB}
+WANTLIB-main +=                c e2fs-uuid ee estr gmp hogweed nettle gnutls 
json m pthread
+WANTLIB-main +=                p11-kit relp tasn1 z ${MODGETTEXT_WANTLIB}
 WANTLIB-mysql +=       crypto m mysqlclient ssl z
 WANTLIB-pgsql +=       crypto com_err pq ssl
 
-LIB_DEPENDS-main =     security/gnutls \
-                       sysutils/librelp
+LIB_DEPENDS-main =     devel/json-c \
+                       devel/libee>=0.4.0 \
+                       devel/libestr>=0.1.2 \
+                       security/gnutls \
+                       sysutils/e2fsprogs \
+                       sysutils/librelp>=1.0.1
 LIB_DEPENDS-mysql =    databases/mysql
 RUN_DEPENDS-mysql =    ${PKGNAME-main}:${PKGPATH},-main
 LIB_DEPENDS-pgsql =    databases/postgresql
@@ -47,10 +47,9 @@ MASTER_SITES =               
http://www.rsyslog.com/files/download/
                        http://download.rsyslog.com/rsyslog/
 
 CONFIGURE_STYLE =      autoconf
-AUTOCONF_VERSION =     2.65
+AUTOCONF_VERSION =     2.67
 USE_LIBTOOL =          Yes
 LIBTOOL_FLAGS =        --tag=disable-static
-USE_GROFF =    Yes
 CONFIGURE_ARGS +=      ${CONFIGURE_SHARED} \
                        --enable-pgsql \
                        --enable-mysql \
@@ -60,6 +59,7 @@ CONFIGURE_ARGS +=     ${CONFIGURE_SHARED} \
 CONFIGURE_ENV +=       CPPFLAGS="-I${LOCALBASE}/include"
 
 post-install:
+       @rm ${PREFIX}/lib/rsyslog/*.la
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rsyslog
        ${INSTALL_DATA} ${WRKSRC}/rsyslog.conf \
            ${PREFIX}/share/examples/rsyslog
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/distinfo,v
retrieving revision 1.2
diff -N -u -p distinfo
--- distinfo    26 Aug 2010 21:28:58 -0000      1.2
+++ distinfo    22 Jan 2013 21:52:51 -0000
@@ -1,5 +1,2 @@
-MD5 (rsyslog-4.6.4.tar.gz) = nNMu7BmEplarh56JtX2Adg==
-RMD160 (rsyslog-4.6.4.tar.gz) = qumwkHVsehiXSYTgS8fAhq5T8ck=
-SHA1 (rsyslog-4.6.4.tar.gz) = AzM3E7kz3PjhromMYsVicEg7UIc=
-SHA256 (rsyslog-4.6.4.tar.gz) = nXEtLKHutWkrlHvDN5dzqLHtGeddgwflhwuEaoOwac8=
-SIZE (rsyslog-4.6.4.tar.gz) = 2080038
+SHA256 (rsyslog-7.2.5.tar.gz) = jM6MYWEL3k6wncN5KBNiZQzO1MdQl8l1aszov6rJa/s=
+SIZE (rsyslog-7.2.5.tar.gz) = 2704775
Index: patches/patch-grammar_lexer_l
===================================================================
RCS file: patches/patch-grammar_lexer_l
diff -N -u -p patches/patch-grammar_lexer_l
--- /dev/null   22 Jan 2013 14:52:51 -0000
+++ patches/patch-grammar_lexer_l       22 Jan 2013 21:52:51 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- grammar/lexer.l.orig       Fri Dec  7 03:58:13 2012
++++ grammar/lexer.l    Wed Jan  2 12:43:49 2013
+@@ -85,11 +85,6 @@ int cnfSetLexFile(char *fname);
+ 
+ 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...
+- */
+-int fileno(FILE *stream);
+-
+ %}
+ 
+ %%
Index: patches/patch-plugins_imuxsock_imuxsock_c
===================================================================
RCS file: patches/patch-plugins_imuxsock_imuxsock_c
diff -N -u -p patches/patch-plugins_imuxsock_imuxsock_c
--- /dev/null   22 Jan 2013 14:52:51 -0000
+++ patches/patch-plugins_imuxsock_imuxsock_c   22 Jan 2013 21:52:51 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- plugins/imuxsock/imuxsock.c.orig   Fri Dec  7 06:23:20 2012
++++ plugins/imuxsock/imuxsock.c        Wed Jan  2 13:04:41 2013
+@@ -38,6 +38,7 @@
+ #include <sys/stat.h>
+ #include <sys/un.h>
+ #include <sys/socket.h>
++#include <sys/uio.h>
+ #include "dirty.h"
+ #include "cfsysline.h"
+ #include "unicode-helper.h"
Index: patches/patch-rsyslog_conf
===================================================================
RCS file: patches/patch-rsyslog_conf
diff -N -u -p patches/patch-rsyslog_conf
--- /dev/null   22 Jan 2013 14:52:51 -0000
+++ patches/patch-rsyslog_conf  22 Jan 2013 21:52:51 -0000
@@ -0,0 +1,43 @@
+$OpenBSD$
+--- rsyslog.conf.orig  Tue Sep 25 11:33:56 2012
++++ rsyslog.conf       Thu Jan 10 13:36:04 2013
+@@ -13,28 +13,19 @@ $ModLoad imklog   # kernel logging (formerly provided 
+ # Logging much else clutters up the screen.
+ #kern.*                                                 /dev/console
+ 
+-# Log anything (except mail) of level info or higher.
+-# Don't log private authentication messages!
+-*.info;mail.none;authpriv.none;cron.none                -/var/log/messages
++*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none -/var/log/messages
++kern.debug;syslog,user.info                             -/var/log/messages
++auth.info                                               -/var/log/authlog
++authpriv.debug                                           /var/log/secure
++cron.info                                               -/var/cron/log
++daemon.info                                             -/var/log/daemon
++ftp.info                                                -/var/log/xferlog
++lpr.debug                                               -/var/log/lpd-errs
++mail.info                                               -/var/log/maillog
++#uucp.info                                              -/var/log/uucp
+ 
+-# The authpriv file has restricted access.
+-authpriv.*                                              /var/log/secure
+-
+-# Log all the mail messages in one place.
+-mail.*                                                  -/var/log/maillog
+-
+-
+-# Log cron stuff
+-cron.*                                                  -/var/log/cron
+-
+ # Everybody gets emergency messages
+-*.emerg                                                 *
+-
+-# Save news errors of level crit and higher in a special file.
+-uucp,news.crit                                          -/var/log/spooler
+-
+-# Save boot messages also to boot.log
+-local7.*                                                /var/log/boot.log
++*.emerg                                                 :omusrmsg:*
+ 
+ # Remote Logging (we use TCP for reliable delivery)
+ # An on-disk queue is created for this action. If the remote host is
Index: patches/patch-runtime_msg_c
===================================================================
RCS file: patches/patch-runtime_msg_c
diff -N -u -p patches/patch-runtime_msg_c
--- /dev/null   22 Jan 2013 14:52:51 -0000
+++ patches/patch-runtime_msg_c 22 Jan 2013 21:52:51 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- runtime/msg.c.orig Fri Dec  7 06:23:20 2012
++++ runtime/msg.c      Wed Jan  2 12:44:13 2013
+@@ -36,7 +36,6 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <sys/socket.h>
+-#include <sys/sysinfo.h>
+ #include <netdb.h>
+ #include <libestr.h>
+ #include <json/json.h>
Index: patches/patch-runtime_nsd_gtls_c
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/patches/patch-runtime_nsd_gtls_c,v
retrieving revision 1.1
diff -N -u -p patches/patch-runtime_nsd_gtls_c
--- patches/patch-runtime_nsd_gtls_c    14 Sep 2011 21:25:39 -0000      1.1
+++ /dev/null   22 Jan 2013 20:57:01 -0000
@@ -1,38 +0,0 @@
-$OpenBSD: patch-runtime_nsd_gtls_c,v 1.1 2011/09/14 21:25:39 naddy Exp $
-
-GnuTLS >= 2.12 does not depend on libgcrypt initialization any longer
-and may in fact not use libgcrypt at all.
-
---- runtime/nsd_gtls.c.orig    Wed Sep 14 03:05:03 2011
-+++ runtime/nsd_gtls.c Wed Sep 14 03:06:21 2011
-@@ -29,7 +29,9 @@
- #include <string.h>
- #include <gnutls/gnutls.h>
- #include <gnutls/x509.h>
-+#if GNUTLS_VERSION_NUMBER <= 0x020b00
- #include <gcrypt.h>
-+#endif
- #include <errno.h>
- #include <sys/stat.h>
- #include <unistd.h>
-@@ -53,7 +55,9 @@
- #define CRLFILE "crl.pem"
- 
- 
-+#if GNUTLS_VERSION_NUMBER <= 0x020b00
- GCRY_THREAD_OPTION_PTHREAD_IMPL;
-+#endif
- MODULE_TYPE_LIB
- 
- /* static data */
-@@ -559,8 +563,10 @@ gtlsGlblInit(void)
-       uchar *cafile;
-       DEFiRet;
- 
-+#if GNUTLS_VERSION_NUMBER <= 0x020b00
-       /* gcry_control must be called first, so that the thread system is 
correctly set up */
-       gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
-+#endif
-       CHKgnutls(gnutls_global_init());
-       
-       /* X509 stuff */
Index: patches/patch-runtime_stringbuf_c
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/patches/patch-runtime_stringbuf_c,v
retrieving revision 1.1
diff -N -u -p patches/patch-runtime_stringbuf_c
--- patches/patch-runtime_stringbuf_c   25 Jan 2012 11:03:14 -0000      1.1
+++ /dev/null   22 Jan 2013 20:57:01 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-runtime_stringbuf_c,v 1.1 2012/01/25 11:03:14 ajacoutot Exp $
-
-CVE-2011-4623: http://secunia.com/advisories/47698/
-
---- runtime/stringbuf.c.orig   Wed Jan 25 10:23:06 2012
-+++ runtime/stringbuf.c        Wed Jan 25 10:23:24 2012
-@@ -156,7 +156,7 @@ rsRetVal
- rsCStrExtendBuf(cstr_t *pThis, size_t iMinNeeded)
- {
-       uchar *pNewBuf;
--      unsigned short iNewSize;
-+      size_t iNewSize;
-       DEFiRet;
- 
-       /* first compute the new size needed */
Index: patches/patch-tools_Makefile_in
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/patches/patch-tools_Makefile_in,v
retrieving revision 1.1
diff -N -u -p patches/patch-tools_Makefile_in
--- patches/patch-tools_Makefile_in     14 Sep 2011 21:25:39 -0000      1.1
+++ patches/patch-tools_Makefile_in     22 Jan 2013 21:52:51 -0000
@@ -1,10 +1,10 @@
-$OpenBSD: patch-tools_Makefile_in,v 1.1 2011/09/14 21:25:39 naddy Exp $
---- tools/Makefile.in.orig     Tue Sep 13 23:09:17 2011
-+++ tools/Makefile.in  Tue Sep 13 23:11:24 2011
-@@ -141,7 +141,8 @@ CPP = @CPP@
- CPPFLAGS = @CPPFLAGS@
- CXX = @CXX@
+$OpenBSD$
+--- tools/Makefile.in.orig     Thu Jan 10 13:14:13 2013
++++ tools/Makefile.in  Thu Jan 10 13:14:53 2013
+@@ -175,7 +175,8 @@ CURL_LIBS = @CURL_LIBS@
  CYGPATH_W = @CYGPATH_W@
+ CZMQ_CFLAGS = @CZMQ_CFLAGS@
+ CZMQ_LIBS = @CZMQ_LIBS@
 -DEFS = @DEFS@
 +DEFS = @DEFS@ -DSYSLOGD_PIDNAME=\"rsyslogd.pid\" \
 +      -DCONFIGFILE=\"$(sysconfdir)/rsyslog.conf\"
Index: patches/patch-tools_syslogd_c
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/patches/patch-tools_syslogd_c,v
retrieving revision 1.2
diff -N -u -p patches/patch-tools_syslogd_c
--- patches/patch-tools_syslogd_c       5 Sep 2011 18:24:08 -0000       1.2
+++ patches/patch-tools_syslogd_c       22 Jan 2013 21:52:51 -0000
@@ -1,17 +1,10 @@
-$OpenBSD: patch-tools_syslogd_c,v 1.2 2011/09/05 18:24:08 jasper Exp $
-
-Last chunk:
-Security fix for CVE-2011-3200,
-rsyslog: parseLegacySyslogMsg off-by-two buffer overflow
-
-Patch from upstream via redhat: 
https://bugzilla.redhat.com/show_bug.cgi?id=727644
-
---- tools/syslogd.c.orig       Thu Aug  5 11:33:54 2010
-+++ tools/syslogd.c    Mon Sep  5 20:22:07 2011
-@@ -173,9 +173,8 @@ static rsRetVal GlobalClassExit(void);
- #endif
- #endif
+$OpenBSD$
+--- tools/syslogd.c.orig       Fri Dec  7 06:23:21 2012
++++ tools/syslogd.c    Thu Jan 10 12:58:56 2013
+@@ -147,9 +147,8 @@ static rsRetVal GlobalClassExit(void);
+ static rsRetVal queryLocalHostname(void);
  
+ 
 -#ifndef _PATH_LOGCONF 
 -#define _PATH_LOGCONF "/etc/rsyslog.conf"
 -#endif
@@ -20,12 +13,3 @@ Patch from upstream via redhat: https://bugzilla.redha
  
  #ifndef _PATH_MODDIR
  #       if defined(__FreeBSD__)
-@@ -1291,7 +1290,7 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
-                * outputs so that only 32 characters max are used by default.
-                */
-               i = 0;
--              while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < 
CONF_TAG_MAXSIZE) {
-+              while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < 
CONF_TAG_MAXSIZE - 2) {
-                       bufParseTAG[i++] = *p2parse++;
-                       --lenMsg;
-               }
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-main,v
retrieving revision 1.1.1.1
diff -N -u -p pkg/PLIST-main
--- pkg/PLIST-main      29 Jul 2010 21:40:21 -0000      1.1.1.1
+++ pkg/PLIST-main      22 Jan 2013 21:52:51 -0000
@@ -1,40 +1,23 @@
 @comment $OpenBSD: PLIST-main,v 1.1.1.1 2010/07/29 21:40:21 steven Exp $
 lib/rsyslog/
-@comment lib/rsyslog/imklog.la
 lib/rsyslog/imklog.so
-@comment lib/rsyslog/immark.la
 lib/rsyslog/immark.so
-@comment lib/rsyslog/imrelp.la
 lib/rsyslog/imrelp.so
-@comment lib/rsyslog/imtcp.la
 lib/rsyslog/imtcp.so
-@comment lib/rsyslog/imudp.la
 lib/rsyslog/imudp.so
-@comment lib/rsyslog/imuxsock.la
 lib/rsyslog/imuxsock.so
-@comment lib/rsyslog/lmnet.la
 lib/rsyslog/lmnet.so
-@comment lib/rsyslog/lmnetstrms.la
 lib/rsyslog/lmnetstrms.so
-@comment lib/rsyslog/lmnsd_gtls.la
 lib/rsyslog/lmnsd_gtls.so
-@comment lib/rsyslog/lmnsd_ptcp.la
 lib/rsyslog/lmnsd_ptcp.so
-@comment lib/rsyslog/lmregexp.la
 lib/rsyslog/lmregexp.so
-@comment lib/rsyslog/lmstrmsrv.la
 lib/rsyslog/lmstrmsrv.so
-@comment lib/rsyslog/lmtcpclt.la
 lib/rsyslog/lmtcpclt.so
-@comment lib/rsyslog/lmtcpsrv.la
 lib/rsyslog/lmtcpsrv.so
-@comment lib/rsyslog/lmzlibw.la
 lib/rsyslog/lmzlibw.so
-@comment lib/rsyslog/ommail.la
 lib/rsyslog/ommail.so
-@comment lib/rsyslog/omrelp.la
 lib/rsyslog/omrelp.so
-@comment lib/rsyslog/omtesting.la
+lib/rsyslog/omruleset.so
 lib/rsyslog/omtesting.so
 @man man/man5/rsyslog.conf.5
 @man man/man8/rsyslogd.8
Index: pkg/PLIST-mysql
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-mysql,v
retrieving revision 1.1.1.1
diff -N -u -p pkg/PLIST-mysql
--- pkg/PLIST-mysql     29 Jul 2010 21:40:21 -0000      1.1.1.1
+++ pkg/PLIST-mysql     22 Jan 2013 21:52:51 -0000
@@ -1,4 +1,3 @@
 @comment $OpenBSD: PLIST-mysql,v 1.1.1.1 2010/07/29 21:40:21 steven Exp $
-@comment lib/rsyslog/ommysql.la
 lib/rsyslog/ommysql.so
 share/examples/rsyslog/createDB_mysql.sql
Index: pkg/PLIST-pgsql
===================================================================
RCS file: /cvs/ports/sysutils/rsyslog/pkg/PLIST-pgsql,v
retrieving revision 1.1.1.1
diff -N -u -p pkg/PLIST-pgsql
--- pkg/PLIST-pgsql     29 Jul 2010 21:40:21 -0000      1.1.1.1
+++ pkg/PLIST-pgsql     22 Jan 2013 21:52:51 -0000
@@ -1,4 +1,3 @@
 @comment $OpenBSD: PLIST-pgsql,v 1.1.1.1 2010/07/29 21:40:21 steven Exp $
-@comment lib/rsyslog/ompgsql.la
 lib/rsyslog/ompgsql.so
 share/examples/rsyslog/createDB_pgsql.sql

Reply via email to