* re-introduces the "Provides: syslog" (#651823 comments 13, 15 and 21)

* rename the logrotate.d file back to syslog (#651823 comments 12, 15, 16 and 21)
 * cleans the sysconfig and logrotate file mess (#651823 comments 17, 20 and 21)
 * spec code cleanup (#651823 comments 10 and 11)
 * dropped duplicated eventlog-devel BR
This commit is contained in:
Jose Pedro Oliveira 2011-04-25 21:35:02 +01:00
parent 264eaa16cc
commit efb36d5de0
6 changed files with 31 additions and 64 deletions

View File

@ -1,7 +0,0 @@
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,6 +0,0 @@
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,3 +0,0 @@
SYSLOGNG_PID="/var/run/syslog-ng.pid"
SYSLOGNG_OPTIONS="-p $SYSLOGNG_PID"
SYSLOGNG_COMPAT_PID="/var/run/syslogd.pid"

View File

@ -21,48 +21,45 @@ Url: http://www.balabit.com/products/syslog_ng/
Source0: %{name}-%{version}.tar.bz2
Source1: syslog-ng.conf
Source2: syslog-ng.init.d
Source3: syslog-ng.service
Source10: sysklogd-syslog-ng.sysconfig
Source12: sysklogd-1.4.1-44-logrotate.d-syslog.log
Source30: rsyslog-syslog-ng-fc10.sysconfig
Source31: rsyslog-3.21.9-logrotate.d-rsyslog.log
Source3: syslog-ng.sysconfig
Source4: syslog-ng.logrotate
Source5: syslog-ng.service
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: pkgconfig
BuildRequires: glib2-devel >= 2.10.1
BuildRequires: pcre-devel >= 7.3
BuildRequires: openssl-devel
BuildRequires: libdbi-devel
BuildRequires: libtool
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: bison
BuildRequires: flex
BuildRequires: eventlog-devel
BuildRequires: tcp_wrappers-devel
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: glib2-devel >= 2.10.1
BuildRequires: libdbi-devel
BuildRequires: libnet-devel
BuildRequires: openssl-devel
BuildRequires: pcre-devel >= 7.3
BuildRequires: tcp_wrappers-devel
Requires: logrotate
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
Provides: syslog
# merge separate syslog-vim package into one
Provides: syslog-ng-vim = %{version}-%{release}
Obsoletes: syslog-ng-vim < 2.0.8-1
%description
syslog-ng, as the name shows, is a syslogd replacement, but with new
functionality for the new generation. The original syslogd allows
messages only to be sorted based on priority/facility pairs; syslog-ng
adds the possibility to filter based on message contents using regular
expressions. The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it
syslog-ng, as the name shows, is a syslogd replacement, but with new
functionality for the new generation. The original syslogd allows
messages only to be sorted based on priority/facility pairs; syslog-ng
adds the possibility to filter based on message contents using regular
expressions. The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it
ideal for firewalled environments.
%package devel
@ -70,7 +67,7 @@ Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
@ -78,29 +75,12 @@ developing applications that use %{name}.
%prep
%setup -q
# fix perl path
%{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
# fix executable perms on contrib files
%{__chmod} -c a-x contrib/syslog2ng
%define logrotated_dst syslog-ng
%if 0%{?rhel}
%if 0%{?rhel} >= 5
%define sysconfig_src %{SOURCE10}
%define logrotated_src %{SOURCE12}
%endif
%endif
%if 0%{?fedora}
%if 0%{?fedora} < 15
%define sysconfig_src %{SOURCE10}
%else
%define sysconfig_src %{SOURCE30}
%endif
%define logrotated_src %{SOURCE31}
%endif
%build
@ -143,15 +123,14 @@ make DESTDIR=%{buildroot} install
%else
# install systemd native file
%{__install} -p -D -m 644 %{SOURCE3} %{buildroot}/%{system_service}/%{name}.service
%{__install} -p -D -m 644 %{SOURCE5} %{buildroot}/%{system_service}/%{name}.service
%endif
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
%{__install} -p -m 644 %{sysconfig_src} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
%{__install} -p -m 644 %{logrotated_src} \
%{buildroot}%{_sysconfdir}/logrotate.d/%{logrotated_dst}
%{__install} -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog
# make local state dir
%{__install} -d -m 755 %{buildroot}/%{_localstatedir}
@ -190,7 +169,7 @@ rm -rf %{buildroot}
%preun
if [ "$1" = 0 ]; then
%if 0%{?fedora} < 15
%if 0%{?fedora} < 15
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
%else
@ -234,7 +213,7 @@ fi
%files
%defattr(-,root,root)
%defattr(-,root,root,-)
%doc AUTHORS COPYING README ChangeLog NEWS
%doc doc/security/*.txt
%doc doc/examples/syslog-ng.conf.sample
@ -244,7 +223,7 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/modules.conf
%config(noreplace) %{_sysconfdir}/%{name}/scl.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{logrotated_dst}
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
%if 0%{?fedora} < 15
%{_sysconfdir}/init.d/%{name}
%else
@ -276,13 +255,17 @@ fi
%changelog
* Sat Apr 23 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.2-4
- spec code cleanup
* Mon Apr 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.2-4
- re-introduces the "Provides: syslog" (#651823 commments 13, 15 and 21)
- rename the logrotate.d file back to syslog (#651823 comments 12, 15, 16 and 21)
- cleans the sysconfig and logrotate file mess (#651823 comments 17, 20 and 21)
- spec code cleanup (#651823 comments 10 and 11)
- dropped duplicated eventlog-devel BR
* Thu Apr 21 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.2-3
- systemd fixup
- more spec file cleanup,
- incorporate fixes from Jose Pedro Oliveira
- incorporate fixes from Jose Pedro Oliveira (#651823 comments 7 and 8)
* Wed Apr 20 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.2-2
- spec cleanup