diff --git a/.cvsignore b/.cvsignore index e69de29..db36822 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +rsyslog-1.13.5.tar.gz diff --git a/rsyslog-1.13.5-initExit.patch b/rsyslog-1.13.5-initExit.patch new file mode 100644 index 0000000..46c7059 --- /dev/null +++ b/rsyslog-1.13.5-initExit.patch @@ -0,0 +1,55 @@ +--- rsyslog-1.13.5/redhat/rsyslog.init.initExit 2007-06-25 15:09:23.000000000 +0200 ++++ rsyslog-1.13.5/redhat/rsyslog.init 2007-06-25 15:13:36.000000000 +0200 +@@ -9,7 +9,7 @@ + # run rsyslog. + ### BEGIN INIT INFO + # Provides: $syslog +-# Short-Description: Rsyslog, the enhanced syslogd for Linux and Unix ++# Short-Description: Enhanced system logging and kernel message trapping daemons + # 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 +@@ -19,22 +19,22 @@ + # Source function library. + . /etc/init.d/functions + +-[ -f /sbin/rsyslogd ] || exit 0 +-[ -f /sbin/rklogd ] || exit 0 ++RETVAL=0 + +-# Source config +-if [ -f /etc/sysconfig/rsyslog ] ; then +- . /etc/sysconfig/rsyslog +-else +- SYSLOGD_OPTIONS="-m 0" +- KLOGD_OPTIONS="-2" +-fi ++start() { ++ [ -x /sbin/rsyslogd ] || exit 5 ++ [ -x /sbin/rklogd ] || exit 5 + +-RETVAL=0 ++ # Source config ++ if [ -f /etc/sysconfig/rsyslog ] ; then ++ . /etc/sysconfig/rsyslog ++ else ++ SYSLOGD_OPTIONS="-m 0" ++ KLOGD_OPTIONS="-2" ++ fi + +-umask 077 ++ umask 077 + +-start() { + echo -n $"Starting system logger (rsyslog): " + daemon rsyslogd $SYSLOGD_OPTIONS + RETVAL=$? +@@ -83,7 +83,7 @@ + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart}" +- exit 1 ++ exit 2 + esac + + exit $? diff --git a/rsyslog.spec b/rsyslog.spec new file mode 100644 index 0000000..15b7a63 --- /dev/null +++ b/rsyslog.spec @@ -0,0 +1,122 @@ +%define with_db 0 + +Summary: Enhanced system logging and kernel message trapping daemons +Name: rsyslog +Version: 1.13.5 +Release: 2%{?dist} +License: GPL +Group: System Environment/Daemons +URL: http://www.rsyslog.com/ +Source0: http://download.adiscon.com/rsyslog/%{name}-%{version}.tar.gz +Patch0: rsyslog-1.13.5-initExit.patch +Conflicts: logrotate < 3.5.2 +%if %{with_db} +BuildRequires: mysql-devel >= 4.0 +%endif +Requires: logrotate +Requires: bash >= 2.0 +Requires(post): /sbin/chkconfig coreutils +Requires(preun): /sbin/chkconfig /sbin/chkconfig +Requires(postun): /sbin/service +Provides: syslog +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%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. + + +%prep +%setup -q +%patch0 -p1 -b .initExit + +%if %{with_db} +perl -pi -e 's/FEATURE_DB=0/FEATURE_DB=1/' linux/Makefile +perl -pi -e "s/lib\/mysql/%_lib\/mysql/" linux/Makefile +%endif + +%build +pushd linux +make %{?_smp_mflags} +popd + +%install +rm -rf $RPM_BUILD_ROOT +install -d -m 755 $RPM_BUILD_ROOT{%{_sysconfdir},/sbin,%{_mandir}/man{5,8}} + +pushd linux +make install TOPDIR=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir} BINDIR=$RPM_BUILD_ROOT/sbin/ \ + MAN_OWNER=`id -nu` +popd + +install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +install -p -m 644 redhat/rsyslog.conf $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.conf +install -p -m 755 redhat/rsyslog.init $RPM_BUILD_ROOT%{_initrddir}/rsyslog +install -p -m 644 redhat/rsyslog.log $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/rsyslog +install -p -m 644 redhat/rsyslog.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/rsyslog + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +if [ $1 = 1 ]; then + /sbin/chkconfig --add rsyslog +fi +for n in /var/log/{messages,secure,maillog,spooler} +do + [ -f $n ] && continue + umask 066 && touch $n +done + +%preun +if [ $1 = 0 ]; then + service rsyslog stop >/dev/null 2>&1 ||: + /sbin/chkconfig --del rsyslog +fi + +%postun +if [ "$1" -ge "1" ]; then + service rsyslog condrestart > /dev/null 2>&1 ||: +fi + +%files +%defattr(-,root,root,-) +%doc AUTHORS BUGS COPYING INSTALL NEWS README.linux createDB.sql +%config(noreplace) %{_sysconfdir}/rsyslog.conf +%config(noreplace) %{_sysconfdir}/sysconfig/rsyslog +%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog +%{_initrddir}/rsyslog +/sbin/* +%{_mandir}/*/* + +%changelog +* Mon Jun 25 2007 Peter Vrabec 1.13.5-2 +- some spec file adjustments. +- fix syslog init script error codes (#245330) + +* Fri Jun 22 2007 Peter Vrabec 1.13.5-1 +- new upstream release + +* Fri Jun 22 2007 Peter Vrabec 1.13.4-2 +- some spec file adjustments. + +* Mon Jun 18 2007 Peter Vrabec 1.13.4-1 +- upgrade to new upstream release + +* Wed Jun 13 2007 Peter Vrabec 1.13.2-2 +- DB support off + +* Tue Jun 12 2007 Peter Vrabec 1.13.2-1 +- new upstream release based on redhat patch + +* Fri Jun 08 2007 Peter Vrabec 1.13.1-2 +- rsyslog package provides its own kernel log. daemon (rklogd) + +* Mon Jun 04 2007 Peter Vrabec 1.13.1-1 +- Initial rpm build diff --git a/sources b/sources index e69de29..0ef65d3 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +345249339181dc24075b3539e3582514 rsyslog-1.13.5.tar.gz