rpms/rsyslog/devel rsyslog-1.19.0-libPath.patch, NONE, 1.1 rsyslog-1.19.0-modUnload.patch, NONE, 1.1 rsyslog-1.19.0-ommysqlLeak.patch, NONE, 1.1 rsyslog-1.19.0-readfds.patch, NONE, 1.1 .cvsignore, 1.8, 1.9 rsyslog.spec, 1.10, 1.11 sources, 1.8, 1.9

Peter Vrabec (pvrabec) fedora-extras-commits at redhat.com
Wed Aug 22 15:36:53 UTC 2007


Author: pvrabec

Update of /cvs/extras/rpms/rsyslog/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3796

Modified Files:
	.cvsignore rsyslog.spec sources 
Added Files:
	rsyslog-1.19.0-libPath.patch rsyslog-1.19.0-modUnload.patch 
	rsyslog-1.19.0-ommysqlLeak.patch rsyslog-1.19.0-readfds.patch 
Log Message:
- new upstream release


rsyslog-1.19.0-libPath.patch:

--- NEW FILE rsyslog-1.19.0-libPath.patch ---
--- rsyslog-1.19.0/Makefile.am.libPath	2007-08-09 04:05:28.000000000 +0200
+++ rsyslog-1.19.0/Makefile.am	2007-08-21 12:20:46.000000000 +0200
@@ -1,7 +1,7 @@
 
 sbin_PROGRAMS=rklogd rfc3195d rsyslogd
-rsyslogmoddir=/lib/rsyslog/
-rsyslogmod_LTLIBRARIES=ommysql.la
+
+pkglib_LTLIBRARIES = ommysql.la
 
 rklogd_SOURCES=klogd.c syslog.c pidfile.c ksym.c ksym_mod.c klogd.h ksyms.h pidfile.h module.h
 
@@ -10,13 +10,14 @@
 man_MANS = rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5 
 
 rsyslogd_SOURCES=syslogd.c pidfile.c template.c outchannel.c stringbuf.c srUtils.c parse.c syslogd-types.h template.h outchannel.h syslogd.h stringbuf.h parse.h srUtils.h liblogging-stub.h net.c net.h msg.c msg.h omshell.c omshell.h omusrmsg.c omusrmsg.h ommysql.h omfwd.c omfwd.h tcpsyslog.c tcpsyslog.h omfile.h omfile.c omdiscard.c omdiscard.h modules.c modules.h module-template.h objomsr.c objomsr.h cfsysline.c cfsysline.h linkedlist.c linkedlist.h iminternal.c iminternal.h action.c action.h
-rsyslogd_CPPFLAGS=-D_PATH_MODDIR=\"$(rsyslogmoddir)\"
+rsyslogd_CPPFLAGS=-D_PATH_MODDIR=\"$(pkglibdir)/\"
 rsyslogd_LDADD=$(zlib_libs) $(pthreads_libs) -ldl
 rsyslogd_LDFLAGS=-export-dynamic
 
 ommysql_la_SOURCES=ommysql.c ommysql.h
 ommysql_la_CPPFLAGS=$(mysql_includes)
-ommysql_la_LDFLAGS=-module -export-dynamic
+ommysql_la_LDFLAGS=-module -avoid-version
 ommysql_la_LIBADD=$(mysql_libs)
 
-EXTRA_DIST = doc/bugs.html doc/features.html doc/generic_design.html doc/history.html doc/how2help.html doc/install.html doc/ipv6.html doc/manual.html doc/property_replacer.html doc/rsyslog_conf.html doc/rsyslog_mysql.html doc/rsyslog_packages.html doc/rsyslog_php_syslog_ng.html doc/rsyslog_recording_pri.html doc/rsyslog_stunnel.html doc/status.html doc/syslog-protocol.html doc/version_naming.html doc/contributors.html redhat/rsyslog.conf redhat/rsyslog.init redhat/rsyslog.log redhat/rsyslog.sysconfig freebsd/rsyslogd slackware/rc.rsyslogd rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5 createDB.sql contrib/README contrib/delete_mysql doc/rsconf1_actionexeconlyifpreviousissuspended.html doc/rsconf1_actionresumeinterval.html doc/rsconf1_allowedsender.html doc/rsconf1_controlcharacterescapeprefix.html doc/rsconf1_debugprintcfsyslinehandlerlist.html doc/rsconf1_debugprintmodulelist.html doc/rsconf1_debugprinttemplatelist.html doc/rsconf1_dircreatemode.html doc/rsconf1_dirgroup.h!
 tml doc/rsconf1_dirowner.html doc/rsconf1_dropmsgswithmaliciousdnsptrrecords.html doc/rsconf1_droptrailinglfonreception.html doc/rsconf1_dynafilecachesize.html doc/rsconf1_escapecontrolcharactersonreceive.html doc/rsconf1_failonchownfailure.html doc/rsconf1_filecreatemode.html doc/rsconf1_filegroup.html doc/rsconf1_fileowner.html doc/rsconf1_includeconfig.html doc/rsconf1_mainmsgqueuesize.html doc/rsconf1_modload.html doc/rsconf1_repeatedmsgreduction.html doc/rsconf1_resetconfigvariables.html doc/rsconf1_umask.html
+EXTRA_DIST = doc/bugs.html doc/features.html doc/generic_design.html doc/history.html doc/how2help.html doc/install.html doc/ipv6.html doc/manual.html doc/property_replacer.html doc/rsyslog_conf.html doc/rsyslog_mysql.html doc/rsyslog_packages.html doc/rsyslog_php_syslog_ng.html doc/rsyslog_recording_pri.html doc/rsyslog_stunnel.html doc/status.html doc/syslog-protocol.html doc/version_naming.html doc/contributors.html redhat/rsyslog.conf redhat/rsyslog.init redhat/rsyslog.log redhat/rsyslog.sysconfig freebsd/rsyslogd slackware/rc.rsyslogd rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5 createDB.sql contrib/README contrib/delete_mysql doc/rsconf1_actionexeconlyifpreviousissuspended.html doc/rsconf1_actionresumeinterval.html doc/rsconf1_allowedsender.html doc/rsconf1_controlcharacterescapeprefix.html doc/rsconf1_debugprintcfsyslinehandlerlist.html doc/rsconf1_debugprintmodulelist.html doc/rsconf1_debugprinttemplatelist.html doc/rsconf1_dircreatemode.html doc/rsconf1_dirgroup.h!
 tml doc/rsconf1_dirowner.html doc/rsconf1_dropmsgswithmaliciousdnsptrrecords.html doc/rsconf1_droptrailinglfonreception.html doc/rsconf1_dynafilecachesize.html doc/rsconf1_escapecontrolcharactersonreceive.html doc/rsconf1_failonchownfailure.html doc/rsconf1_filecreatemode.html doc/rsconf1_filegroup.html doc/rsconf1_fileowner.html doc/rsconf1_includeconfig.html doc/rsconf1_mainmsgqueuesize.html doc/rsconf1_modload.html doc/rsconf1_repeatedmsgreduction.html doc/rsconf1_resetconfigvariables.html doc/rsconf1_umask.html createDB.sql 
+

rsyslog-1.19.0-modUnload.patch:

--- NEW FILE rsyslog-1.19.0-modUnload.patch ---
--- rsyslog/cfsysline.c.orig	2007-08-16 23:33:00.000000000 +0200
+++ rsyslog/cfsysline.c	2007-08-16 23:44:10.000000000 +0200
@@ -573,6 +573,12 @@ finalize_it:
 }
 
 
+rsRetVal unregCfSysLineHdlrs(void)
+{
+	return llDestroy(&llCmdList);
+}
+
+
 /* process a cfsysline command (based on handler structure)
  * param "p" is a pointer to the command line after the command. Should be
  * updated.
--- rsyslog/cfsysline.h.orig	2007-08-16 23:33:10.000000000 +0200
+++ rsyslog/cfsysline.h	2007-08-16 23:44:23.000000000 +0200
@@ -61,6 +61,7 @@ typedef struct cslCmd_s cslCmd_t;
 
 /* prototypes */
 rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData);
+rsRetVal unregCfSysLineHdlrs(void);
 rsRetVal processCfSysLineCommand(uchar *pCmd, uchar **p);
 rsRetVal cfsyslineInit(void);
 void dbgPrintCfSysLineHandlers(void);
--- rsyslog/syslogd.c.orig	2007-08-16 23:45:27.000000000 +0200
+++ rsyslog/syslogd.c	2007-08-17 11:23:54.000000000 +0200
@@ -3552,7 +3552,7 @@ static void die(int sig)
 	/* de-init some modules */
 	modExitIminternal();
 
-	/*TODO: the module config command handlers must also be freed! */
+	unregCfSysLineHdlrs();
 
 	/* TODO: this would also be the right place to de-init the builtin output modules. We
 	 * do not currently do that, because the module interface does not allow for
@@ -4259,6 +4259,10 @@ static void init(void)
 	/*  Close all open log files and free log descriptor array. */
 	freeSelectors();
 
+	/* Unload all non-static modules */
+	dbgprintf("Unloading non-static modules.\n");
+	modUnloadAndDestructDynamic();
+
 	dbgprintf("Clearing templates.\n");
 	tplDeleteNew();
 
--- rsyslog/ommysql.c.orig	2007-08-17 11:02:00.000000000 +0200
+++ rsyslog/ommysql.c	2007-08-17 11:02:02.000000000 +0200
@@ -79,6 +79,7 @@ static void closeMySQL(instanceData *pDa
 	assert(pData != NULL);
 
 	if(pData->f_hmysql != NULL) {	/* just to be on the safe side... */
+		mysql_server_end();
 		mysql_close(pData->f_hmysql);	
 		pData->f_hmysql = NULL;
 	}
--- rsyslog/modules.c.orig	2007-08-21 09:43:48.000000000 +0200
+++ rsyslog/modules.c	2007-08-21 09:07:17.000000000 +0200
@@ -336,6 +336,31 @@ rsRetVal modUnloadAndDestructAll(void)
 
 	return iRet;
 }
+
+
+rsRetVal modUnloadAndDestructDynamic(void)
+{
+	DEFiRet;
+	modInfo_t *pMod;
+	modInfo_t *pModPrev;
+
+	pLoadedModulesLast = NULL;
+
+	pMod = modGetNxt(NULL);
+	while(pMod != NULL) {
+		pModPrev = pMod;
+		pMod = modGetNxt(pModPrev); /* get next */
+		/* now we can destroy the previous module */
+		if(pModPrev->eLinkType != eMOD_LINK_STATIC) {
+			dbgprintf("Unloading module %s\n", modGetName(pModPrev));
+			moduleDestruct(pModPrev);
+		} else {
+			pLoadedModulesLast = pModPrev;
+		}
+	}
+
+	return iRet;
+}
 /*
  * vi:set ai:
  */
--- rsyslog/modules.h.orig	2007-08-17 11:11:26.000000000 +0200
+++ rsyslog/modules.h	2007-08-17 11:15:35.000000000 +0200
@@ -94,6 +94,7 @@ uchar *modGetName(modInfo_t *pThis);
 uchar *modGetStateName(modInfo_t *pThis);
 void modPrintList(void);
 rsRetVal modUnloadAndDestructAll(void);
+rsRetVal modUnloadAndDestructDynamic(void);
 
 #endif /* #ifndef MODULES_H_INCLUDED */
 /*

rsyslog-1.19.0-ommysqlLeak.patch:

--- NEW FILE rsyslog-1.19.0-ommysqlLeak.patch ---
--- rsyslog/ommysql.c.orig	2007-08-16 17:06:10.000000000 +0200
+++ rsyslog/ommysql.c	2007-08-16 17:07:02.000000000 +0200
@@ -229,7 +229,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
 
 	/* ok, if we reach this point, we have something for us */
 	if((iRet = createInstance(&pData)) != RS_RET_OK)
-		return iRet;
+		goto finalize_it;
 
 	p++; /* eat '>' '*/
 
--- rsyslog/omusrmsg.c.orig	2007-08-16 17:07:20.000000000 +0200
+++ rsyslog/omusrmsg.c	2007-08-16 17:11:52.000000000 +0200
@@ -272,10 +272,10 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
         */
        if (!*p || !((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z')
                     || (*p >= '0' && *p <= '9') || *p == '_' || *p == '.' || *p == '*'))
-               return RS_RET_CONFLINE_UNPROCESSED;
+	       ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
 
 	if((iRet = createInstance(&pData)) != RS_RET_OK)
-		return iRet;
+		goto finalize_it;
 
 
 	if(*p == '*') { /* wall */
@@ -284,7 +284,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
 		pData->bIsWall = 1; /* write to all users */
 		if((iRet = cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS, (uchar*) " WallFmt"))
 		    != RS_RET_OK)
-			return iRet;
+			goto finalize_it;
 	} else {
                 /* everything else beginning with the regex above
                  * is currently treated as a user name
@@ -309,7 +309,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(
 		 */
 		if((iRet = cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS, (uchar*)" StdUsrMsgFmt"))
 		    != RS_RET_OK)
-			return iRet;
+			goto finalize_it;
 	}
 CODE_STD_FINALIZERparseSelectorAct
 ENDparseSelectorAct
--- rsyslog/rsyslog.h.orig	2007-08-16 17:13:38.000000000 +0200
+++ rsyslog/rsyslog.h	2007-08-16 17:15:47.000000000 +0200
@@ -82,9 +82,11 @@ typedef enum rsRetVal_ rsRetVal; /**< fr
 /* macro below is to be used if we need our own handling, eg for cleanup */
 #define CHKiRet_Hdlr(code) if((iRet = code) != RS_RET_OK)
 #define DEFiRet rsRetVal iRet = RS_RET_OK
-#define ABORT_FINALIZE(errCode) \
-	iRet = errCode;\
-	goto finalize_it;
+#define ABORT_FINALIZE(errCode)			\
+	do {					\
+		iRet = errCode;			\
+		goto finalize_it;		\
+	} while (0)
 
 /** Object ID. These are for internal checking. Each
  * object is assigned a specific ID. This is contained in
--- rsyslog/module-template.h.orig	2007-08-16 17:29:13.000000000 +0200
+++ rsyslog/module-template.h	2007-08-16 17:38:37.000000000 +0200
@@ -226,10 +226,13 @@ finalize_it:\
 		*pp = p;\
 	} else {\
 		/* cleanup, we failed */\
-		if(*ppOMSR != NULL)\
+		if(*ppOMSR != NULL) {\
 			OMSRdestruct(*ppOMSR);\
 			*ppOMSR = NULL;\
-		}
+		}\
+		if(pData != NULL)\
+			freeInstance(&pData);\
+	}
 
 #define ENDparseSelectorAct \
 	return iRet;\

rsyslog-1.19.0-readfds.patch:

--- NEW FILE rsyslog-1.19.0-readfds.patch ---
--- rsyslog-1.19.0/syslogd.c.orig	2007-08-21 16:45:10.000000000 +0200
+++ rsyslog-1.19.0/syslogd.c	2007-08-21 16:45:28.000000000 +0200
@@ -5650,11 +5650,11 @@ static void mainloop(void)
 #endif
 #endif
 
-	errno = 0;
-	FD_ZERO(&readfds);
-	maxfds = 0;
-
 	while(!bFinished){
+	        errno  = 0;
+	        maxfds = 0;
+	        FD_ZERO (&readfds);
+
 		/* first check if we have any internal messages queued and spit them out */
 		processImInternal();
 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rsyslog/devel/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore	10 Aug 2007 14:28:19 -0000	1.8
+++ .cvsignore	22 Aug 2007 15:36:20 -0000	1.9
@@ -1,3 +1,3 @@
-rsyslog-1.18.1.tar.gz
+rsyslog-1.19.0.tar.gz
 rsyslog.init
 rsyslog.sysconfig


Index: rsyslog.spec
===================================================================
RCS file: /cvs/extras/rpms/rsyslog/devel/rsyslog.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- rsyslog.spec	10 Aug 2007 14:28:19 -0000	1.10
+++ rsyslog.spec	22 Aug 2007 15:36:20 -0000	1.11
@@ -1,20 +1,20 @@
-%define with_db 0
 %define	sbindir	/sbin
 
 Summary: Enhanced system logging and kernel message trapping daemons
 Name: rsyslog
-Version: 1.18.1
+Version: 1.19.0
 Release: 1%{?dist}
-License: GPL
+License: GPLv2+
 Group: System Environment/Daemons
 URL: http://www.rsyslog.com/
 Source0: http://download.adiscon.com/rsyslog/%{name}-%{version}.tar.gz
 Source1: rsyslog.init
 Source2: rsyslog.sysconfig
+Patch1: rsyslog-1.19.0-libPath.patch
+Patch2: rsyslog-1.19.0-ommysqlLeak.patch
+Patch3: rsyslog-1.19.0-modUnload.patch
+Patch4: rsyslog-1.19.0-readfds.patch
 Conflicts: logrotate < 3.5.2
-%if %{with_db}
-BuildRequires: mysql-devel >= 4.0
-%endif
 BuildRequires: zlib-devel
 Requires: logrotate
 Requires: bash >= 2.0
@@ -26,6 +26,12 @@
 Obsoletes: sysklogd < 1.4.3-1
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+%package mysql
+Summary: MySQL support for rsyslog
+Group: System Environment/Daemons
+Requires: %name = %version-%release
+BuildRequires: mysql-devel >= 4.0
+
 %description
 Rsyslog is an enhanced multi-threaded syslogd supporting, among others, MySQL,
 syslog/tcp, RFC 3195, permitted sender lists, filtering on any message part,
@@ -35,11 +41,20 @@
 at the same time being very easy to setup for the novice user.
 
 
+%description mysql
+The rsyslog-mysql package contains a dynamic shared object that will add
+MySQL database support to rsyslog.
+
 %prep
 %setup -q
+%patch1 -p1 -b .libPath
+%patch2 -p1 -b .ommysqlLeak
+%patch3 -p1 -b .modUnload
+%patch4 -p1 -b .readfds
+autoreconf
 
 %build
-%configure --sbindir=%{sbindir}
+%configure --sbindir=%{sbindir} --disable-static
 make %{?_smp_mflags}
 
 %install
@@ -55,6 +70,9 @@
 install -p -m 644 redhat/rsyslog.log $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/rsyslog
 install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/rsyslog
 
+#get rid of *.la
+rm $RPM_BUILD_ROOT/%{_libdir}/rsyslog/*.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -100,7 +118,15 @@
 %{sbindir}/rfc3195d
 %{_mandir}/*/*
 
+%files mysql
+%defattr(-,root,root)
+%doc createDB.sql
+%{_libdir}/rsyslog/ommysql.so
+
 %changelog
+* Fri Aug 17 2007 Peter Vrabec <pvrabec at redhat.com> 1.19.0-1
+- new upstream release with MySQL support(as plugin)
+
 * Wed Aug 08 2007 Peter Vrabec <pvrabec at redhat.com> 1.18.1-1
 - upstream bugfix release
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rsyslog/devel/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sources	10 Aug 2007 14:28:19 -0000	1.8
+++ sources	22 Aug 2007 15:36:20 -0000	1.9
@@ -1,3 +1,3 @@
-d91a522980cc6a21526743dfbba061d8  rsyslog-1.18.1.tar.gz
+5a1852cd86e55dd0d3125e0d7a6af1ca  rsyslog-1.19.0.tar.gz
 fe8fcd90c672701fa198dd1206df64ae  rsyslog.init
 e10d2dc3238c2cf2a54933f10b19b9bf  rsyslog.sysconfig




More information about the fedora-extras-commits mailing list