[syslog-ng/f15/master] - drop support for fedora versions without systemd - incorporate all changes made in rawhide branch
Matthias Runge
mrunge at fedoraproject.org
Tue Apr 26 20:41:12 UTC 2011
commit fa7c4abc95dd1f390ec9e53055209f6b0c84953e
Author: Matthias Runge <mrunge at matthias-runge.de>
Date: Tue Apr 26 22:37:48 2011 +0200
- drop support for fedora versions without systemd
- incorporate all changes made in rawhide branch
- rename files, delete unnecessary files
- provide native systemd service file
sysklogd-1.4.1-44-logrotate.d-syslog.log | 7 -
sysklogd-1.4.1-logrotate.d-syslog.log | 6 -
sysklogd-syslog-ng.sysconfig | 3 -
syslog-ng.conf | 2 +-
syslog-ng.init.d | 123 ----------------
...-logrotate.d-rsyslog.log => syslog-ng.logrotate | 0
syslog-ng.service | 11 ++
syslog-ng.spec | 153 ++++++++------------
...syslog-ng-fc10.sysconfig => syslog-ng.sysconfig | 0
syslog-ng.vim | 52 -------
10 files changed, 74 insertions(+), 283 deletions(-)
---
diff --git a/syslog-ng.conf b/syslog-ng.conf
index 11bc10a..28cbe68 100644
--- a/syslog-ng.conf
+++ b/syslog-ng.conf
@@ -1,4 +1,4 @@
- at version:3.0
+ at version:3.2
# syslog-ng configuration file.
#
diff --git a/rsyslog-3.21.9-logrotate.d-rsyslog.log b/syslog-ng.logrotate
similarity index 100%
rename from rsyslog-3.21.9-logrotate.d-rsyslog.log
rename to syslog-ng.logrotate
diff --git a/syslog-ng.service b/syslog-ng.service
new file mode 100644
index 0000000..3bb2054
--- /dev/null
+++ b/syslog-ng.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Syslog-ng System Logging Service
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/syslog-ng
+ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
+ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS
+Sockets=syslog-ng.socket
+
+[Install]
+WantedBy=multi-user.target
diff --git a/syslog-ng.spec b/syslog-ng.spec
index c1713e2..d4d8502 100644
--- a/syslog-ng.spec
+++ b/syslog-ng.spec
@@ -1,5 +1,5 @@
-%{?_with_spoofsource:%define spoofsource 1}
%define evtlog_ver 0.2.12
+%define gitsnapshot 20110424
%define _sbindir /sbin
%define _localstatedir /var/lib/syslog-ng
@@ -7,8 +7,8 @@
%define system_service /lib/systemd/system
Name: syslog-ng
-Version: 3.2.2
-Release: 3%{?dist}
+Version: 3.2.3
+Release: 0.%{gitsnapshot}.2%{?dist}
Summary: Next-generation syslog server
Group: System Environment/Daemons
@@ -17,53 +17,49 @@ Url: http://www.balabit.com/products/syslog_ng/
# git clone git://git.balabit.hu/bazsi/syslog-ng-3.2.git/
# cd syslog-ng-3.2/
-# git archive --format=tar --prefix="syslog-ng-3.2.2/" HEAD . | bzip2 > ../syslog-ng-3.2.2.tar.bz2
+# git archive --format=tar --prefix="syslog-ng-3.2.3/" HEAD . | bzip2 > ../syslog-ng-3.2.3-20110424.tar.bz2
#Source0: http://www.balabit.com/downloads/files/%{name}/open-source-edition/%{version}/source/%{name}_%{version}.tar.gz
-Source0: %{name}-%{version}.tar.bz2
+Source0: %{name}-%{version}-%{gitsnapshot}.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
-
+Source2: syslog-ng.service
+Source3: syslog-ng.sysconfig
+Source4: syslog-ng.logrotate
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
+Requires(post): /bin/systemctl
+Requires(preun): /bin/systemctl
+Requires(preun): /bin/systemctl
+Requires(postun): /bin/systemctl
+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
@@ -71,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}.
@@ -79,30 +75,17 @@ developing applications that use %{name}.
%prep
%setup -q
-./autogen.sh
-
# fix perl path
%{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
-
-%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
+# fix executable perms on contrib files
+%{__chmod} -c a-x contrib/syslog2ng
%build
+
+./autogen.sh
+
%configure \
--prefix=/ \
--libdir=/%{_lib} \
@@ -133,21 +116,14 @@ make DESTDIR=%{buildroot} install
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
%{__install} -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/syslog-ng.conf
-# install init script for fedora <=14
-%if 0%{?fedora} < 15
-%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/init.d
-%{__install} -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/init.d/%{name}
-%else
-# install systemd native file
+# install init script
+%{__install} -p -D -m 644 %{SOURCE2} %{buildroot}/%{system_service}/%{name}.service
-%{__install} -p -D -m 644 %{SOURCE3} %{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}
@@ -156,9 +132,6 @@ make DESTDIR=%{buildroot} install
/usr/bin/iconv -f iso8859-1 -t utf-8 AUTHORS > AUTHORS.conv && \
%{__mv} -f AUTHORS.conv AUTHORS
-# fix executable perms on contrib files
-%{__chmod} -x contrib/relogger.pl
-%{__chmod} -x contrib/syslog2ng
# install vim files
@@ -181,33 +154,19 @@ rm -rf %{buildroot}
%post
/sbin/ldconfig
-%if 0%{?fedora} < 15
- /sbin/chkconfig --add %{name}
-%else
- /bin/systemctl enable %{name}.service
-%endif
+/bin/systemctl enable %{name}.service
%preun
if [ "$1" = 0 ]; then
- %if 0%{?fedora} < 15
- /sbin/service %{name} stop > /dev/null 2>&1
- /sbin/chkconfig --del %{name}
- %else
- /bin/systemctl stop %{name}.service
- /bin/systemctl disable %{name}.service
- %endif
+/bin/systemctl stop %{name}.service
+/bin/systemctl disable %{name}.service
fi
%postun
/sbin/ldconfig
if [ "$1" -ge 1 ]; then
- %if 0%{?fedora} < 15
- /sbin/service %{name} condrestart >/dev/null 2>&1
- %else
- /bin/systemctl condrestart %{name}.service
- %endif
-
+/bin/systemctl condrestart %{name}.service
fi
@@ -233,7 +192,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
@@ -243,12 +202,8 @@ 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}
-%if 0%{?fedora} < 15
-%{_sysconfdir}/init.d/%{name}
-%else
+%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
%{system_service}/%{name}.service
-%endif
%dir %{_localstatedir}
%{_sbindir}/%{name}
@@ -263,9 +218,11 @@ fi
# uhm, some better places for those?
%{_datadir}/xsd
-%{_mandir}/man1/*
-%{_mandir}/man5/*
-%{_mandir}/man8/*
+%{_mandir}/man1/loggen.1*
+%{_mandir}/man1/pdbtool.1*
+%{_mandir}/man1/syslog-ng-ctl.1*
+%{_mandir}/man5/syslog-ng.conf.5*
+%{_mandir}/man8/syslog-ng.8*
%ghost %{_datadir}/vim/
%files devel
@@ -275,10 +232,24 @@ fi
%changelog
+* Tue Apr 26 2011 Matthias Runge <mrunge at matthias-runge.de> - 3.2.3-0.20110424.2
+- drop support for fedora without systemd
+
+* Mon Apr 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-0.20110424.1
+- change NVR to alert users that we have been using a syslog-ng v3.2 git snapshot
+ (for systemd support)
+
+* Mon Apr 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.2-4
+- 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
+
* Thu Apr 21 2011 Matthias Runge <mrunge at 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 at matthias-runge.de> - 3.2.2-2
- spec cleanup
diff --git a/rsyslog-syslog-ng-fc10.sysconfig b/syslog-ng.sysconfig
similarity index 100%
rename from rsyslog-syslog-ng-fc10.sysconfig
rename to syslog-ng.sysconfig
More information about the scm-commits
mailing list