SF.net SVN: gar:[25148] csw/mgar/pkg/rsyslog/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Jul 2 10:44:31 CEST 2015


Revision: 25148
          http://sourceforge.net/p/gar/code/25148
Author:   dmichelsen
Date:     2015-07-02 08:44:30 +0000 (Thu, 02 Jul 2015)
Log Message:
-----------
rsyslog/trunk: Add GnuTLS, imfile, SMF manifest

Modified Paths:
--------------
    csw/mgar/pkg/rsyslog/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/rsyslog/trunk/files/0001-Forward-port-patch-from-pkgsrc.patch
    csw/mgar/pkg/rsyslog/trunk/files/cswrsyslogd.xml

Removed Paths:
-------------
    csw/mgar/pkg/rsyslog/trunk/files/rsyslog.default
    csw/mgar/pkg/rsyslog/trunk/files/rsyslog.init

Modified: csw/mgar/pkg/rsyslog/trunk/Makefile
===================================================================
--- csw/mgar/pkg/rsyslog/trunk/Makefile	2015-07-01 14:58:32 UTC (rev 25147)
+++ csw/mgar/pkg/rsyslog/trunk/Makefile	2015-07-02 08:44:30 UTC (rev 25148)
@@ -9,10 +9,15 @@
 
 MASTER_SITES = http://www.rsyslog.com/files/download/rsyslog/
 DISTFILES += $(DISTNAME).tar.gz
-DISTFILES += rsyslog.init
-DISTFILES += rsyslog.default
+DISTFILES += cswrsyslogd.xml
 DISTFILES += rsyslog.conf
 
+# Use patch from
+#   0001-Forward-port-patch-from-pkgsrc.patch
+# until this is fixed:
+#   https://github.com/rsyslog/rsyslog/issues/417
+PATCHFILES += 0001-Forward-port-patch-from-pkgsrc.patch
+
 BUILD_DEP_PKGS += CSWlibestr-dev
 BUILD_DEP_PKGS += CSWlibjson-c-dev
 BUILD_DEP_PKGS += CSWlibrelp-dev
@@ -32,7 +37,11 @@
 RUNTIME_DEP_PKGS_CSWrsyslog += CSWlibnet1
 RUNTIME_DEP_PKGS_CSWrsyslog += CSWliblogging-rfc3195-0
 RUNTIME_DEP_PKGS_CSWrsyslog += CSWlibrelp0
+RUNTIME_DEP_PKGS_CSWrsyslog += CSWlibgnutls28
 
+# This is the SMF DTD
+CHECKPKG_OVERRIDES_CSWrsyslog += file-with-bad-content|/usr/share|root/var/opt/csw/svc/manifest/cswrsyslogd.xml
+
 GARCOMPILER = GNU
 
 # We need libnet. See for details
@@ -42,10 +51,7 @@
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --enable-imsolaris
 
-# Currently broken as reported here:
-#   https://github.com/rsyslog/rsyslog/issues/417
-#CONFIGURE_ARGS += --enable-imfile
-
+CONFIGURE_ARGS += --enable-imfile
 CONFIGURE_ARGS += --enable-impstats
 
 # imptcp requires epoll which Solaris does not have
@@ -53,6 +59,7 @@
 
 CONFIGURE_ARGS += --enable-libdbi
 CONFIGURE_ARGS += --enable-elasticsearch
+CONFIGURE_ARGS += --enable-gnutls
 CONFIGURE_ARGS += --enable-mail
 CONFIGURE_ARGS += --enable-mmnormalize
 CONFIGURE_ARGS += --enable-mmjsonparse
@@ -82,16 +89,29 @@
 CONFIGURE_ARGS += --enable-omuxsock
 CONFIGURE_ARGS += --enable-mmsnmptrapd
 
+# CONFIGURE_ARGS += --enable-omhdfs
+# CONFIGURE_ARGS += --enable-omkafka
+# CONFIGURE_ARGS += --enable-ommongodb
+# CONFIGURE_ARGS += --enable-imzmq3
+# CONFIGURE_ARGS += --enable-imczmq
+# CONFIGURE_ARGS += --enable-omzmq3
+# CONFIGURE_ARGS += --enable-omczmq
+# CONFIGURE_ARGS += --enable-omrabbitmq
+# CONFIGURE_ARGS += --enable-omhiredis
+# CONFIGURE_ARGS += --enable-omhttpfs
+CONFIGURE_ARGS += --enable-generate-man-pages
+
 EXTRA_CPPFLAGS += -D_PATH_LOGCONF=\\\"$(sysconfdir)/rsyslog.conf\\\"
 
 PRESERVECONF += $(sysconfdir)/rsyslog.conf
 
-INITSMF += /etc/opt/csw/init.d/cswrsyslog
+PROTOTYPE_MODIFIERS += smf
+PROTOTYPE_FILES_smf += /var/opt/csw/svc/manifest/cswrsyslogd.xml
+PROTOTYPE_CLASS_smf = manifest
 
 include gar/category.mk
 
 post-install-modulated:
 	ginstall -D -m 644 $(WORKDIR)/rsyslog.conf $(DESTDIR)/etc/opt/csw/rsyslog.conf
-	ginstall -D -m 644 $(WORKDIR)/rsyslog.default $(DESTDIR)/etc/opt/csw/default/rsyslog
-	ginstall -D -m 755 $(WORKDIR)/rsyslog.init $(DESTDIR)/etc/opt/csw/init.d/cswrsyslog
+	ginstall -D -m 0644 $(WORKDIR)/cswrsyslogd.xml $(DESTDIR)/var/opt/csw/svc/manifest/cswrsyslogd.xml
 	@$(MAKECOOKIE)

Added: csw/mgar/pkg/rsyslog/trunk/files/0001-Forward-port-patch-from-pkgsrc.patch
===================================================================
--- csw/mgar/pkg/rsyslog/trunk/files/0001-Forward-port-patch-from-pkgsrc.patch	                        (rev 0)
+++ csw/mgar/pkg/rsyslog/trunk/files/0001-Forward-port-patch-from-pkgsrc.patch	2015-07-02 08:44:30 UTC (rev 25148)
@@ -0,0 +1,46 @@
+From 6658fe23e1e199cb1c0cead031c97fe2995c53e8 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 1 Jul 2015 22:47:56 +0200
+Subject: [PATCH] Forward-port patch from pkgsrc
+
+---
+ plugins/imfile/imfile.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
+index 3d6e8ef..bc3d73b 100644
+--- a/plugins/imfile/imfile.c
++++ b/plugins/imfile/imfile.c
+@@ -1763,10 +1763,14 @@ BEGINrunInput
+ CODESTARTrunInput
+ 	DBGPRINTF("imfile: working in %s mode\n", 
+ 		 (runModConf->opMode == OPMODE_POLLING) ? "polling" : "inotify");
++#if HAVE_INOTIFY_INIT
+ 	if(runModConf->opMode == OPMODE_POLLING)
+ 		iRet = doPolling();
+ 	else
+ 		iRet = do_inotify();
++#else
++	iRet = doPolling();
++#endif
+ 
+ 	DBGPRINTF("imfile: terminating upon request of rsyslog core\n");
+ ENDrunInput
+@@ -1869,12 +1873,14 @@ CODESTARTmodExit
+ 	objRelease(errmsg, CORE_COMPONENT);
+ 	objRelease(prop, CORE_COMPONENT);
+ 	objRelease(ruleset, CORE_COMPONENT);
++#if HAVE_INOTIFY_INIT
+ 	if(dirs != NULL) {
+ 		free(dirs->active.listeners);
+ 		free(dirs->configured.listeners);
+ 		free(dirs);
+ 	}
+ 	free(wdmap);
++#endif /* #if HAVE_INOTIFY_INIT */
+ ENDmodExit
+ 
+ 
+-- 
+2.4.0
+

Added: csw/mgar/pkg/rsyslog/trunk/files/cswrsyslogd.xml
===================================================================
(Binary files differ)

Index: csw/mgar/pkg/rsyslog/trunk/files/cswrsyslogd.xml
===================================================================
--- csw/mgar/pkg/rsyslog/trunk/files/cswrsyslogd.xml	2015-07-01 14:58:32 UTC (rev 25147)
+++ csw/mgar/pkg/rsyslog/trunk/files/cswrsyslogd.xml	2015-07-02 08:44:30 UTC (rev 25148)

Property changes on: csw/mgar/pkg/rsyslog/trunk/files/cswrsyslogd.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/xml
\ No newline at end of property
Deleted: csw/mgar/pkg/rsyslog/trunk/files/rsyslog.default
===================================================================
--- csw/mgar/pkg/rsyslog/trunk/files/rsyslog.default	2015-07-01 14:58:32 UTC (rev 25147)
+++ csw/mgar/pkg/rsyslog/trunk/files/rsyslog.default	2015-07-02 08:44:30 UTC (rev 25148)
@@ -1,2 +0,0 @@
-# rsyslogd options
-SYSLOGD_OPTIONS="-c 5"

Deleted: csw/mgar/pkg/rsyslog/trunk/files/rsyslog.init
===================================================================
--- csw/mgar/pkg/rsyslog/trunk/files/rsyslog.init	2015-07-01 14:58:32 UTC (rev 25147)
+++ csw/mgar/pkg/rsyslog/trunk/files/rsyslog.init	2015-07-02 08:44:30 UTC (rev 25148)
@@ -1,91 +0,0 @@
-#!/bin/sh
-#
-# $Id: cswrsyslogd 17679 2012-04-14 18:58:06Z phipsy $
-#
-# /etc/opt/csw/init.d/cswrsyslog
-
-# Check if we're on 10; therefore SMF
-if [ -x /usr/sbin/svcadm ]; then
-    . /lib/svc/share/smf_include.sh
-fi
-
-if [ -f /etc/opt/csw/default/rsyslog ]; then
-    . /etc/opt/csw/default/rsyslog
-fi
-
-pidfile=/var/run/rsyslogd.pid
-
-start_rsyslogd() {
-    /opt/csw/sbin/rsyslogd $SYSLOGD_OPTIONS
-}
-
-reload_rsyslogd() {
-    if [ -r $pidfile ]; then
-        kill -HUP `cat $pidfile`
-    fi
-}
-
-stop_rsyslogd() {
-    if [ -r $pidfile ]; then
-        kill $pid `cat $pidfile`
-    fi
-}
-
-get_current_pid() {
-    if [ -x /usr/bin/zonename ]; then
-        zone=`/usr/bin/zonename`
-        zoneopts="-z $zone"
-    else
-        zoneopts=""
-    fi
-    pgrep $zoneopts rsyslogd
-}
-
-case "$1" in
-    start)
-        printf "Starting rsyslog daemon:"
-        start_rsyslogd
-        printf " rsyslogd"
-        echo ""
-        ;;
-    stop)
-        printf "Stopping rsyslog daemon:"
-        stop_rsyslogd
-        printf " rsyslogd"
-        echo ""
-        ;;
-    restart)
-        printf "Restarting rsyslog daemon:"
-        stop_rsyslogd
-        start_rsyslogd
-        printf " rsyslogd"
-        echo ""
-        ;;
-    reload)
-        printf "Reloading rsyslog daemon:"
-        reload_rsyslogd
-        printf " rsyslogd"
-        echo ""
-        ;;
-    status)
-        if [ -f $pidfile ]; then
-            pid=`cat $pidfile`
-            curpid=`get_current_pid`
-            if [ "$pid" -eq "$curpid" ]; then
-                echo "rsyslogd is running"
-                exit 0
-            else
-                echo "rsyslogd is not running"
-                exit 1
-            fi
-        else
-            echo "rsyslogd is not running"
-            exit 1
-        fi
-        ;;
-    *)
-        printf "Usage: %s {start|stop|restart|reload|status}\n" "$0"
-        exit 1
-        ;;
-esac
-exit 0

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list