commit 846b5054c65d0628b1f652665c260dcf941c96446203817275164a0a33fed2d6 Author: OBS User unknown Date: Sat Sep 13 02:52:06 2008 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rsyslog?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/rsyslog-3.18.3-moddirs.dif b/rsyslog-3.18.3-moddirs.dif new file mode 100644 index 0000000..03ea08e --- /dev/null +++ b/rsyslog-3.18.3-moddirs.dif @@ -0,0 +1,176 @@ +--- configure.ac ++++ configure.ac 2008/09/09 10:35:00 +@@ -107,6 +107,26 @@ AC_TRY_COMPILE([ + AC_MSG_RESULT(no; defined as 64) + ) + ++AC_ARG_WITH(moddirs, ++ [AS_HELP_STRING([--with-moddirs=DIRS],[Additional module search paths appended to @<:@$libdir/rsyslog@:>@])], ++ [_save_IFS=$IFS ; IFS=$PATH_SEPARATOR ; moddirs="" ++ for w in ${with_moddirs} ++ do ++ case $w in ++ "") continue ;; */) ;; *) w="${w}/" ;; esac ++ for m in ${moddirs} ++ do ++ test "x$w" = "x${libdir}/${PACKAGE}/" || \ ++ test "x$w" = "x$m" || test "x$w" = "x/" && continue 2 ++ done ++ case $moddirs in ++ "") moddirs="$w" ;; *) moddirs="$moddirs:$w" ;; ++ esac ++ done ; IFS=$_save_IFS],[moddirs=""] ++) ++AM_CONDITIONAL(WITH_MODDIRS, test x$moddirs != x) ++AC_SUBST(moddirs) ++ + # Large file support + AC_ARG_ENABLE(largefile, + [AS_HELP_STRING([--enable-largefile],[Enable large file support @<:@default=yes@:>@])], +--- Makefile.am ++++ Makefile.am 2008/09/09 11:44:47 +@@ -92,7 +92,11 @@ rsyslogd_SOURCES = \ + action.h \ + atomic.h + ++if WITH_MODDIRS ++rsyslogd_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(pthreads_cflags) ++else + rsyslogd_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" $(pthreads_cflags) ++endif + rsyslogd_LDADD = $(zlib_libs) $(pthreads_libs) $(dl_libs) $(rt_libs) + rsyslogd_LDFLAGS = -export-dynamic + +--- modules.c ++++ modules.c 2008/09/09 13:19:37 +@@ -563,6 +563,8 @@ Load(uchar *pModName) + int bHasExtension; + void *pModHdlr, *pModInit; + modInfo_t *pModInfo; ++ uchar *pModDirCurr, *pModDirNext; ++ int iLoadCnt; + + assert(pModName != NULL); + dbgprintf("Requested to load module '%s'\n", pModName); +@@ -584,48 +586,86 @@ Load(uchar *pModName) + pModInfo = GetNxt(pModInfo); + } + +- /* now build our load module name */ +- if(*pModName == '/') { +- *szPath = '\0'; /* we do not need to append the path - its already in the module name */ +- iPathLen = 0; +- } else { +- *szPath = '\0'; +- strncat((char *) szPath, (pModDir == NULL) ? _PATH_MODDIR : (char*) pModDir, sizeof(szPath) - 1); +- iPathLen = strlen((char*) szPath); +- if((szPath[iPathLen - 1] != '/')) { +- if((iPathLen <= sizeof(szPath) - 2)) { +- szPath[iPathLen++] = '/'; +- szPath[iPathLen] = '\0'; +- } else { +- errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName); ++ pModDirCurr = (uchar *)((pModDir == NULL) ? _PATH_MODDIR : (char *)pModDir); ++ pModDirNext = NULL; ++ pModHdlr = NULL; ++ iLoadCnt = 0; ++ do { ++ /* now build our load module name */ ++ if(*pModName == '/') { ++ *szPath = '\0'; /* we do not need to append the path - its already in the module name */ ++ iPathLen = 0; ++ } else { ++ *szPath = '\0'; ++ ++ iPathLen = strlen((char *)pModDirCurr); ++ pModDirNext = (uchar *)strchr((char *)pModDirCurr, ':'); ++ if( pModDirNext) ++ iPathLen = (size_t)(pModDirNext - pModDirCurr); ++ else ++ pModDirNext = NULL; ++ ++ if(iPathLen == 0) { ++ if(pModDirNext) { ++ pModDirCurr = pModDirNext + 1; ++ continue; ++ } ++ break; ++ } else if(iPathLen > sizeof(szPath) - 1) { ++ errmsg.LogError(NO_ERRCODE, "could not load module '%s', module path too long\n", pModName); + ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN); + } ++ ++ strncat((char *) szPath, (char *)pModDirCurr, iPathLen); ++ iPathLen = strlen((char*) szPath); ++ ++ if(pModDirNext) ++ pModDirCurr = pModDirNext + 1; ++ ++ if((szPath[iPathLen - 1] != '/')) { ++ if((iPathLen <= sizeof(szPath) - 2)) { ++ szPath[iPathLen++] = '/'; ++ szPath[iPathLen] = '\0'; ++ } else { ++ errmsg.LogError(NO_ERRCODE, "could not load module '%s', module path too long\n", pModName); ++ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN); ++ } ++ } + } +- } + +- /* ... add actual name ... */ +- strncat((char *) szPath, (char *) pModName, sizeof(szPath) - iPathLen - 1); ++ /* ... add actual name ... */ ++ strncat((char *) szPath, (char *) pModName, sizeof(szPath) - iPathLen - 1); + +- /* now see if we have an extension and, if not, append ".so" */ +- if(!bHasExtension) { +- /* we do not have an extension and so need to add ".so" +- * TODO: I guess this is highly importable, so we should change the +- * algo over time... -- rgerhards, 2008-03-05 +- */ +- /* ... so now add the extension */ +- strncat((char *) szPath, ".so", sizeof(szPath) - strlen((char*) szPath) - 1); +- iPathLen += 3; +- } ++ /* now see if we have an extension and, if not, append ".so" */ ++ if(!bHasExtension) { ++ /* we do not have an extension and so need to add ".so" ++ * TODO: I guess this is highly importable, so we should change the ++ * algo over time... -- rgerhards, 2008-03-05 ++ */ ++ /* ... so now add the extension */ ++ strncat((char *) szPath, ".so", sizeof(szPath) - strlen((char*) szPath) - 1); ++ iPathLen += 3; ++ } + +- if(iPathLen + strlen((char*) pModName) >= sizeof(szPath)) { +- errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName); +- ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN); +- } ++ if(iPathLen + strlen((char*) pModName) >= sizeof(szPath)) { ++ errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName); ++ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN); ++ } + +- /* complete load path constructed, so ... GO! */ +- dbgprintf("loading module '%s'\n", szPath); +- if(!(pModHdlr = dlopen((char *) szPath, RTLD_NOW))) { +- errmsg.LogError(NO_ERRCODE, "could not load module '%s', dlopen: %s\n", szPath, dlerror()); ++ /* complete load path constructed, so ... GO! */ ++ dbgprintf("loading module '%s'\n", szPath); ++ pModHdlr = dlopen((char *) szPath, RTLD_NOW); ++ iLoadCnt++; ++ ++ } while(pModHdlr == NULL && *pModName != '/' && pModDirNext); ++ ++ if(!pModHdlr) { ++ if(iLoadCnt) { ++ errmsg.LogError(NO_ERRCODE, "could not load module '%s', dlopen: %s\n", szPath, dlerror()); ++ } else { ++ errmsg.LogError(NO_ERRCODE, "could not load module '%s', ModDir was '%s'\n", szPath, ++ ((pModDir == NULL) ? _PATH_MODDIR : (char *)pModDir)); ++ } + ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_DLOPEN); + } + if(!(pModInit = dlsym(pModHdlr, "modInit"))) { diff --git a/rsyslog-3.18.3.dif b/rsyslog-3.18.3.dif new file mode 100644 index 0000000..167f3af --- /dev/null +++ b/rsyslog-3.18.3.dif @@ -0,0 +1,11 @@ +--- syslogd.c ++++ syslogd.c 2008/08/26 15:27:59 +@@ -3075,7 +3075,7 @@ int realMain(int argc, char **argv) + * only when actually neeeded. + * rgerhards, 2008-04-04 + */ +- while ((ch = getopt(argc, argv, "46aAc:def:g:hi:l:m:M:nopqQr::s:t:u:vwx")) != EOF) { ++ while ((ch = getopt(argc, argv, "46a:Ac:def:g:hi:l:m:M:nopqQr::s:t:u:vwx")) != EOF) { + switch((char)ch) { + case '4': + case '6': diff --git a/rsyslog-3.18.3.tar.bz2 b/rsyslog-3.18.3.tar.bz2 new file mode 100644 index 0000000..dbe7758 --- /dev/null +++ b/rsyslog-3.18.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d16fff425c220ae08a4796083874f4f93f6029c77ca7f5de2f1e9018b85b4b4 +size 832780 diff --git a/rsyslog.changes b/rsyslog.changes new file mode 100644 index 0000000..6f19ef1 --- /dev/null +++ b/rsyslog.changes @@ -0,0 +1,13 @@ +------------------------------------------------------------------- +Tue Sep 9 16:16:14 CEST 2008 - mt@suse.de + +- Enabled mail, imfile and imtemplate modules +- Enabled snmp module, packaged as rsyslog-module-snmp +- Added patch to support multiple module directories, + in our case /lib[64]/rsyslog:/usr/lib[64]/rsyslog + +------------------------------------------------------------------- +Thu Sep 4 15:15:14 CEST 2008 - mt@suse.de + +- initial rsyslog 3.18.3 package + diff --git a/rsyslog.conf.in b/rsyslog.conf.in new file mode 100644 index 0000000..4a8bc7f --- /dev/null +++ b/rsyslog.conf.in @@ -0,0 +1,120 @@ +## +## Note, that when you enable any of the MYSQL, PGSQL or GSSAPI +## features, you can't use a remote /usr file system any more!! +## [The modules are linked against libraries bellow of /usr] +## + +# +# if you experience problems, check +# http://www.rsyslog.com/troubleshoot for assistance +# and report them at http://bugzilla.novell.com/ +# + +# rsyslog v3: load input modules +# If you do not load inputs, nothing happens! + +$ModLoad immark.so # provides --MARK-- message capability +$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command) +$ModLoad imklog.so # kernel logging (may be also provided by /sbin/klogd) + +# +# Include config generated by /etc/init.d/syslog script +# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the +# /etc/sysconfig/syslog file. +# +$IncludeConfig ADDITIONAL_SOCKETS + +# +# Include config files, that the admin provided? : +# +$IncludeConfig ETC_RSYSLOG_D_GLOB + +### +# +# print most on tty10 and on the xconsole pipe +# +kern.warning;*.err;authpriv.none /dev/tty10;RSYSLOG_TraditionalFileFormat +kern.warning;*.err;authpriv.none |/dev/xconsole;RSYSLOG_TraditionalFileFormat +*.emerg * + +# enable this, if you want that root is informed +# immediately, e.g. of logins +#*.alert root + +# +# firewall messages into separate file and stop their further processing +# +if ($syslogfacility-text == 'kern') and \ + ($msg contains 'IN=' and $msg contains 'OUT=') then \ + -/var/log/firewall;RSYSLOG_TraditionalFileFormat +if ($syslogfacility-text == 'kern') and \ + ($msg contains 'IN=' and $msg contains 'OUT=') then \ + ~ + +# +# acpid messages into separate file and stop their further processing +# +# => all acpid messages for debuging (uncomment if needed): +#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ +# -/var/log/acpid;RSYSLOG_TraditionalFileFormat +# +# => up to notice (skip info and debug) +if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \ + ($syslogseverity <= 5) then \ + -/var/log/acpid;RSYSLOG_TraditionalFileFormat +if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ + ~ + +# +# NetworkManager into separate file and stop their further processing +# +if ($programname == 'NetworkManager') or \ + ($programname startswith 'nm-') then \ + -/var/log/NetworkManager;RSYSLOG_TraditionalFileFormat +if ($programname == 'NetworkManager') or \ + ($programname startswith 'nm-') then \ + ~ + +# +# email-messages +# +mail.* -/var/log/mail;RSYSLOG_TraditionalFileFormat +mail.info -/var/log/mail.info;RSYSLOG_TraditionalFileFormat +mail.warning -/var/log/mail.warn;RSYSLOG_TraditionalFileFormat +mail.err /var/log/mail.err;RSYSLOG_TraditionalFileFormat + +# +# news-messages +# +news.crit -/var/log/news/news.crit;RSYSLOG_TraditionalFileFormat +news.err -/var/log/news/news.err;RSYSLOG_TraditionalFileFormat +news.notice -/var/log/news/news.notice;RSYSLOG_TraditionalFileFormat +# enable this, if you want to keep all news messages +# in one file +#news.* -/var/log/news.all;RSYSLOG_TraditionalFileFormat + +# +# Warnings in one file +# +*.=warning;*.=err -/var/log/warn;RSYSLOG_TraditionalFileFormat +*.crit /var/log/warn;RSYSLOG_TraditionalFileFormat + +# +# the rest in one file +# +*.*;mail.none;news.none -/var/log/messages;RSYSLOG_TraditionalFileFormat + +# +# enable this, if you want to keep all messages +# in one file +#*.* -/var/log/allmessages;RSYSLOG_TraditionalFileFormat + +# +# Some foreign boot scripts require local7 +# +local0,local1.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local2,local3.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local4,local5.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local6,local7.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat + +### diff --git a/rsyslog.d.remote.conf.in b/rsyslog.d.remote.conf.in new file mode 100644 index 0000000..1bc790a --- /dev/null +++ b/rsyslog.d.remote.conf.in @@ -0,0 +1,31 @@ +## +## Note, that when you enable any of the MYSQL, PGSQL or GSSAPI +## features, you can't use a remote /usr file system any more!! +## [The modules are linked against libraries bellow of /usr] +## + +# Remote Logging (we use TCP for reliable delivery) +# An on-disk queue is created for this action. If the remote host is +# down, messages are spooled to disk and sent when it is up again. +#$WorkDirectory RSYSLOG_SPOOL_DIR # where to place spool files +#$ActionQueueFileName uniqName # unique name prefix for spool files +#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) +#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown +#$ActionQueueType LinkedList # run asynchronously +#$ActionResumeRetryCount -1 # infinite retries if host is down +# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional +#*.* @@remote-host + + +# ######### Receiving Messages from Remote Hosts ########## +# TCP Syslog Server: +# provides TCP syslog reception and GSS-API (if compiled to support it) +#$ModLoad imtcp.so # load module +# Note: as of now, you need to use the -t command line option to +# enable TCP reception (e.g. -t514 to run a server at port 514/tcp) +# This will change in later v3 releases. + +# UDP Syslog Server: +#$ModLoad imudp.so # provides UDP syslog reception +#$UDPServerRun 514 # start a UDP syslog server at standard port 514 + diff --git a/rsyslog.early.conf.in b/rsyslog.early.conf.in new file mode 100644 index 0000000..067da34 --- /dev/null +++ b/rsyslog.early.conf.in @@ -0,0 +1,114 @@ +## +## WARNING: This config contains only statements that are +## safe for early syslog start, that is before +## the network and remote filesystems available. +## +## +## if you experience problems, check +## http://www.rsyslog.com/troubleshoot for assistance +## and report them at http://bugzilla.novell.com/ +## + +# rsyslog v3: load input modules +# If you do not load inputs, nothing happens! + +$ModLoad immark.so # provides --MARK-- message capability +$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command) +$ModLoad imklog.so # kernel logging (may be also provided by /sbin/klogd) + +# +# Include config generated by /etc/init.d/syslog script +# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the +# /etc/sysconfig/syslog file. +# +$IncludeConfig ADDITIONAL_SOCKETS + +### +# +# print most on tty10 and on the xconsole pipe +# +kern.warning;*.err;authpriv.none /dev/tty10;RSYSLOG_TraditionalFileFormat +kern.warning;*.err;authpriv.none |/dev/xconsole;RSYSLOG_TraditionalFileFormat +*.emerg * + +# enable this, if you want that root is informed +# immediately, e.g. of logins +#*.alert root + +# +# firewall messages into separate file and stop their further processing +# +if ($syslogfacility-text == 'kern') and \ + ($msg contains 'IN=' and $msg contains 'OUT=') then \ + -/var/log/firewall;RSYSLOG_TraditionalFileFormat +if ($syslogfacility-text == 'kern') and \ + ($msg contains 'IN=' and $msg contains 'OUT=') then \ + ~ + +# +# acpid messages into separate file and stop their further processing +# +# => all acpid messages for debuging (uncomment if needed): +#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ +# -/var/log/acpid;RSYSLOG_TraditionalFileFormat +# +# => up to notice (skip info and debug) +if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \ + ($syslogseverity <= 5) then \ + -/var/log/acpid;RSYSLOG_TraditionalFileFormat +if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ + ~ + +# +# NetworkManager into separate file and stop their further processing +# +if ($programname == 'NetworkManager') or \ + ($programname startswith 'nm-') then \ + -/var/log/NetworkManager;RSYSLOG_TraditionalFileFormat +if ($programname == 'NetworkManager') or \ + ($programname startswith 'nm-') then \ + ~ + +# +# email-messages +# +mail.* -/var/log/mail;RSYSLOG_TraditionalFileFormat +mail.info -/var/log/mail.info;RSYSLOG_TraditionalFileFormat +mail.warning -/var/log/mail.warn;RSYSLOG_TraditionalFileFormat +mail.err /var/log/mail.err;RSYSLOG_TraditionalFileFormat + +# +# news-messages +# +news.crit -/var/log/news/news.crit;RSYSLOG_TraditionalFileFormat +news.err -/var/log/news/news.err;RSYSLOG_TraditionalFileFormat +news.notice -/var/log/news/news.notice;RSYSLOG_TraditionalFileFormat +# enable this, if you want to keep all news messages +# in one file +#news.* -/var/log/news.all;RSYSLOG_TraditionalFileFormat + +# +# Warnings in one file +# +*.=warning;*.=err -/var/log/warn;RSYSLOG_TraditionalFileFormat +*.crit /var/log/warn;RSYSLOG_TraditionalFileFormat + +# +# the rest in one file +# +*.*;mail.none;news.none -/var/log/messages;RSYSLOG_TraditionalFileFormat + +# +# enable this, if you want to keep all messages +# in one file +#*.* -/var/log/allmessages;RSYSLOG_TraditionalFileFormat + +# +# Some foreign boot scripts require local7 +# +local0,local1.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local2,local3.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local4,local5.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local6,local7.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat + +### diff --git a/rsyslog.spec b/rsyslog.spec new file mode 100644 index 0000000..d272383 --- /dev/null +++ b/rsyslog.spec @@ -0,0 +1,452 @@ +# +# spec file for package rsyslog (Version 3.18.3) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: rsyslog +%define upstream_version 3.18.3 +%define rsyslog_docdir %{_docdir}/%{name} +%define install_all_modules_in_lib 0 +Version: 3.18.3 +Release: 2 +License: GPL v3 or later +Group: System/Daemons +Summary: Rsyslog, the enhanced syslogd for Linux and Unix +Url: http://www.rsyslog.com/ +#Source0: http://download.rsyslog.com/rsyslog/%{name}-%{upstream_version}.tar.gz +Source0: %{name}-%{upstream_version}.tar.bz2 +Source1: rsyslog.sysconfig +Source2: rsyslog.conf.in +Source3: rsyslog.early.conf.in +Source4: rsyslog.d.remote.conf.in +Patch0: %{name}-%{upstream_version}.dif +Patch1: %{name}-%{upstream_version}-moddirs.dif +AutoReqProv: on +PreReq: %insserv_prereq %fillup_prereq /sbin/klogd /etc/init.d/syslog /sbin/checkproc +Provides: syslog +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: klogd +BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel +BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel +%define _sbindir /sbin +%define _libdir /%_lib +%define rsyslogdocdir %{_docdir}/%{name} +%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf + +%description +Rsyslog is an enhanced multi-threaded syslogd supporting, among others, +MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any +message part, and fine grain output format control. It is quite +compatible to stock sysklogd and can be used as a drop-in replacement. +Its advanced features make it suitable for enterprise-class, encryption +protected syslog relay chains while at the same time being very easy to +setup for the novice user. + + + +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%package doc +License: GPL v3 or later +Group: System/Daemons +Requires: %{name} = %{version} +Summary: Additional documentation for rsyslog + +%description doc +Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog +package. + +This package provides additional documentation for rsyslog. + + + +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%package module-gssapi +License: GPL v3 or later +Group: System/Daemons +Requires: %{name} = %{version} +Summary: GSS-API support module for rsyslog + +%description module-gssapi +Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog +package. + +This module provides the support to receive syslog messages from the +network protected via Kerberos 5 encryption and authentication. + + + +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%package module-mysql +License: GPL v3 or later +Group: System/Daemons +Requires: %{name} = %{version} +Summary: MySQL support module for rsyslog + +%description module-mysql +Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog +package. + +This package provides a module with the support for logging into MySQL +databases. + + + +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%package module-pgsql +License: GPL v3 or later +Group: System/Daemons +Requires: %{name} = %{version} +Summary: PostgreSQL support module for rsyslog + +%description module-pgsql +Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog +package. + +This module provides the support for logging into PostgreSQL databases. + + + +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%package module-snmp +License: GPL v3 or later +Group: System/Daemons +Requires: %{name} = %{version} +Summary: SNMP support module for rsyslog + +%description module-snmp +Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog +package. + +This module provides the ability to send syslog messages as an SNMPv1 & +v2c traps. + + + +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%prep +%setup -q -n %{name}-%{upstream_version} +dos2unix doc/*.html +%patch0 -p0 +%patch1 -p0 + +%build +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" +%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030 + export CFLAGS="$CFLAGS -fstack-protector" +%endif +%{?suse_update_config:%{suse_update_config -f}} +#autoreconf +%configure \ +%if ! 0%{install_all_modules_in_lib} + --with-moddirs=%{_prefix}%{_libdir}/rsyslog/ \ +%endif + --enable-largefile \ + --enable-pthreads \ + --enable-regexp \ + --enable-zlib \ + --enable-klog \ + --enable-inet \ + --enable-openssl \ + --enable-rsyslogd \ + --enable-gssapi-krb5 \ + --enable-mysql \ + --enable-pgsql \ + --enable-snmp \ + --enable-mail \ + --enable-imfile \ + --enable-imtemplate \ + --disable-static +# +#optional (need additional libs): +# --enable-rfc3195 \ +# --enable-relp \ +# --enable-libdbi \ +# +#for debugging only: +# --enable-rtinst \ +# --enable-debug \ +# --enable-valgrind \ +# +make %{?_smp_mflags:%{_smp_mflags}} + +%install +make install DESTDIR="%{buildroot}" +# +rm -f %{buildroot}%{_libdir}/rsyslog/*.la +# +%if ! 0%{install_all_modules_in_lib} +# move all modules linking libraries in /usr to /usr/%_lib +# the user has to specify them with full path then... +install -d -m0755 %{buildroot}%{_prefix}%{_libdir}/rsyslog +for mod in omgssapi.so imgssapi.so lmgssutil.so ommysql.so ompgsql.so omsnmp.so ; do + mv -f %{buildroot}%{_libdir}/rsyslog/$mod \ + %{buildroot}%{_prefix}%{_libdir}/rsyslog/ +done +%endif +# +install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d +install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog +install -d -m0755 %{buildroot}%{_localstatedir}/spool/rsyslog +for file in rsyslog.conf rsyslog.early.conf rsyslog.d.remote.conf ; do + sed \ +%ifarch s390 s390x + -e 's;tty10;console;g' \ +%endif + -e 's;ADDITIONAL_SOCKETS;%{additional_sockets};g' \ + -e 's;ETC_RSYSLOG_D_GLOB;%{_sysconfdir}/rsyslog.d/*.conf;g' \ + -e 's;RSYSLOG_SPOOL_DIR;%{_localstatedir}/spool/rsyslog;g' \ + %{_sourcedir}/${file}.in > ${file}.$$ +done +install -m0600 rsyslog.conf.$$ \ + %{buildroot}%{_sysconfdir}/rsyslog.conf +install -m0600 rsyslog.early.conf.$$ \ + %{buildroot}%{_sysconfdir}/rsyslog.early.conf +install -m0600 rsyslog.d.remote.conf.$$ \ + %{buildroot}%{_sysconfdir}/rsyslog.d/remote.conf +# +install -d -m0755 %{buildroot}/var/adm/fillup-templates +install -m0600 %{_sourcedir}/rsyslog.sysconfig \ + %{buildroot}/var/adm/fillup-templates/sysconfig.syslog-rsyslog +# +rm -f doc/Makefile* +install -d -m0755 %{buildroot}%{rsyslogdocdir}/ +find ChangeLog README AUTHORS COPYING COPYING.LESSER rsyslog.conf doc \ + \( -type d -exec install -m755 -d %{buildroot}%{rsyslogdocdir}/\{\} \; \) \ + -o \( -type f -exec install -m644 \{\} %{buildroot}%{rsyslogdocdir}/\{\} \; \) +install -m644 plugins/ommysql/createDB.sql \ + %{buildroot}%{rsyslogdocdir}/mysql-createDB.sql +install -m644 plugins/ompgsql/createDB.sql \ + %{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql +# + +%clean +if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then + rm -rf "%{buildroot}" +fi + +%post +# +# update linker caches +# +/sbin/ldconfig +# +# add syslog variables provided by klogd if needed +# +%{fillup_and_insserv -ny syslog syslog} +%{fillup_and_insserv -nY syslog earlysyslog} +# +# add RSYSLOGD_* variables if needed +# +%{fillup_only -ns syslog rsyslog} +# +# check if daemon configured in SYSLOG_DAEMON is installed +# and switch to ourself if it's missed +# +source etc/sysconfig/syslog +replace_syslog=no +if test "$SYSLOG_DAEMON" != "rsyslogd" ; then + if test -z "$SYSLOG_DAEMON" || \ + test ! -x sbin/${SYSLOG_DAEMON} ; then + replace_syslog=yes + fi +fi +if test "$replace_syslog" = "yes" ; then + sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="rsyslogd"/g' \ + etc/sysconfig/syslog +fi +# +# create dirs, touch log default files +# +mkdir -p var/log +touch var/log/messages; chmod 640 var/log/messages +touch var/log/boot.log; chmod 640 var/log/boot.log +touch var/log/mail; chmod 640 var/log/mail +touch var/log/mail.info; chmod 640 var/log/mail.info +touch var/log/mail.warn; chmod 640 var/log/mail.warn +touch var/log/mail.err; chmod 640 var/log/mail.err +test -f var/log/news && mv -f var/log/news var/log/news.bak +mkdir -p -m 0750 var/log/news +chown news:news var/log/news +touch var/log/news/news.crit; chmod 640 var/log/news/news.crit +chown news:news var/log/news/news.crit +touch var/log/news/news.err; chmod 640 var/log/news/news.err +chown news:news var/log/news/news.err +touch var/log/news/news.notice; chmod 640 var/log/news/news.notice +chown news:news var/log/news/news.notice +# +# touch the additional log files we are using +# +touch var/log/acpid; chmod 640 var/log/acpid +touch var/log/firewall; chmod 640 var/log/firewall +touch var/log/NetworkManager; chmod 640 var/log/NetworkManager +# +# touch the additional log sockets config file +# +additional_sockets="%{additional_sockets}" +touch "${additional_sockets#/}"; chmod 640 "${additional_sockets#/}" + +%preun +# +# stop the rsyslogd daemon when it is running +# +%{stop_on_removal syslog} + +%postun +# +# update linker caches +# +/sbin/ldconfig +# +# reset SYSLOG_DAEMON variable +# +if test -f etc/sysconfig/syslog ; then + source etc/sysconfig/syslog + if test "$SYSLOG_DAEMON" == "rsyslogd" ; then + sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \ + etc/sysconfig/syslog + fi +fi +# +# stop the rsyslogd daemon when it is running +# +%{restart_on_update syslog} +# +# cleanup init scripts +# +%{insserv_cleanup} + +%files +%defattr(-,root,root) +%dir %{_sysconfdir}/rsyslog.d +%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.conf +%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.conf +%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf +%{_sbindir}/rsyslogd +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/imfile.so +%{_libdir}/rsyslog/imklog.so +%{_libdir}/rsyslog/immark.so +%{_libdir}/rsyslog/imtcp.so +%{_libdir}/rsyslog/imtemplate.so +%{_libdir}/rsyslog/imudp.so +%{_libdir}/rsyslog/imuxsock.so +%{_libdir}/rsyslog/lmnet.so +%{_libdir}/rsyslog/lmregexp.so +%{_libdir}/rsyslog/lmtcpclt.so +%{_libdir}/rsyslog/lmtcpsrv.so +%{_libdir}/rsyslog/ommail.so +%{_libdir}/rsyslog/omtesting.so +%if ! 0%{install_all_modules_in_lib} +%dir %{_prefix}%{_libdir}/rsyslog +%endif +%{_mandir}/man5/rsyslog.conf.5* +%{_mandir}/man8/rsyslogd.8* +%dir %{rsyslogdocdir} +%doc %{rsyslogdocdir}/rsyslog.conf +%doc %{rsyslogdocdir}/ChangeLog +%doc %{rsyslogdocdir}/README +%doc %{rsyslogdocdir}/AUTHORS +%doc %{rsyslogdocdir}/COPYING +%doc %{rsyslogdocdir}/COPYING.LESSER +%dir %{_localstatedir}/run/rsyslog +%dir %{_localstatedir}/spool/rsyslog +/var/adm/fillup-templates/sysconfig.syslog-rsyslog + +%files doc +%defattr(-,root,root) +%dir %{rsyslogdocdir} +%doc %{rsyslogdocdir}/doc + +%files module-gssapi +%defattr(-,root,root) +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/omgssapi.so +%{_libdir}/rsyslog/imgssapi.so +%{_libdir}/rsyslog/lmgssutil.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/omgssapi.so +%{_prefix}%{_libdir}/rsyslog/imgssapi.so +%{_prefix}%{_libdir}/rsyslog/lmgssutil.so +%endif + +%files module-mysql +%defattr(-,root,root) +%doc %{rsyslogdocdir}/mysql-createDB.sql +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/ommysql.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/ommysql.so +%endif + +%files module-pgsql +%defattr(-,root,root) +%doc %{rsyslogdocdir}/pgsql-createDB.sql +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/ompgsql.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/ompgsql.so +%endif + +%files module-snmp +%defattr(-,root,root) +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/omsnmp.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/omsnmp.so +%endif + +%changelog +* Tue Sep 09 2008 mt@suse.de +- Enabled mail, imfile and imtemplate modules +- Enabled snmp module, packaged as rsyslog-module-snmp +- Added patch to support multiple module directories, + in our case /lib[64]/rsyslog:/usr/lib[64]/rsyslog +* Thu Sep 04 2008 mt@suse.de +- initial rsyslog 3.18.3 package diff --git a/rsyslog.sysconfig b/rsyslog.sysconfig new file mode 100644 index 0000000..7ce229a --- /dev/null +++ b/rsyslog.sysconfig @@ -0,0 +1,33 @@ + +## Type: integer +## Default: "" +## Config: "" +## ServiceRestart: syslog +# +# Version compatibility level to run rsyslogd with (-c parameter). +# Default is to run in a distribution specific mode (that should be a +# native mode of the installed version). +# Set to the desired version number rsyslogd shall be compatible with. +# +# Note: +# Changes to this variable may need adoption of the default config file +# or break the /etc/init.d/syslog script. +# +RSYSLOGD_COMPAT_VERSION="" + +### Type: string +## Default: "" +## Config: "" +## ServiceRestart: syslog +# +# Parameters for rsyslogd, except of the version compatibility (-c) +# and the config file (-f), because they're used by sysconfig and +# earlysysconfig init scripts. +# +# See also the RSYSLOGD_COMPAT_VERSION variable in this file, the +# documentation provided in /usr/share/doc/packages/rsyslog/doc by +# the rsyslog-doc package and the rsyslogd(8) and rsyslog.conf(5) +# manual pages. +# +RSYSLOGD_PARAMS="" +