]> git.pld-linux.org Git - packages/syslog-ng.git/blobdiff - syslog-ng.spec
- release 5
[packages/syslog-ng.git] / syslog-ng.spec
index 9d336f0514a0afb509c9e80cd422bab1f37fe021..d08ca1e153454399a44b37555a3d9afaac5104f2 100644 (file)
@@ -1,16 +1,24 @@
 #
 # Conditional build:
 %bcond_with    dynamic         # link dynamically with glib, eventlog, pcre, openssl
+%if "%{pld_release}" == "ac"
+%bcond_with            sql             # build with support for logging to SQL DB
+%else
 %bcond_without sql             # build without support for logging to SQL DB
+%endif
 %bcond_without tests
 
+%if "%{pld_release}" == "ac"
+%define                glib2_ver       2.16.0
+%else
 %define                glib2_ver       2.24.0
+%endif
 Summary:       Syslog-ng - new generation of the system logger
 Summary(pl.UTF-8):     Syslog-ng - zamiennik syskloga
 Summary(pt_BR.UTF-8):  Daemon de log nova geração
 Name:          syslog-ng
 Version:       3.0.8
-Release:       1
+Release:       5
 License:       GPL v2
 Group:         Daemons
 Source0:       http://www.balabit.com/downloads/files/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
@@ -26,16 +34,19 @@ Patch0:             %{name}-link.patch
 Patch1:                %{name}-datadir.patch
 Patch2:                %{name}-pyssl.patch
 Patch3:                bug-15.patch
+Patch4:                fix-unix-stream-caps.patch
+Patch5:                fix-dac_override.patch
 URL:           http://www.balabit.com/products/syslog_ng/
 BuildRequires: autoconf >= 2.53
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: flex
 BuildRequires: pkgconfig
+BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.561
 BuildRequires: which
 %if %{with tests}
-BuildRequires: libdbi-drivers-sqlite3
+%{?with_sql:BuildRequires:     libdbi-drivers-sqlite3}
 BuildRequires: python
 BuildRequires: python-modules
 BuildRequires: tzdata
@@ -47,7 +58,7 @@ BuildRequires:        libcap-devel
 %{?with_sql:BuildRequires:     libdbi-devel >= 0.8.3-2}
 BuildRequires: libnet-devel >= 1:1.1.2.1-3
 BuildRequires: libwrap-devel
-BuildRequires: openssl-devel >= 0.9.8
+BuildRequires: openssl-devel
 BuildRequires: pcre-devel
 %else
 BuildRequires: eventlog-static >= 0.2
@@ -57,7 +68,7 @@ BuildRequires:        libcap-static
 %{?with_sql:BuildRequires:     libdbi-static >= 0.8.3-2}
 BuildRequires: libnet-static >= 1:1.1.2.1-3
 BuildRequires: libwrap-static
-BuildRequires: openssl-static >= 0.9.8
+BuildRequires: openssl-static
 BuildRequires: pcre-static
 BuildRequires: zlib-static
 %endif
@@ -113,8 +124,10 @@ Opis zadania Upstart dla syslog-ng.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 cp -a %{SOURCE4} doc
-cp -a %{SOURCE5} contrib
+cp -a %{SOURCE5} contrib/syslog-ng.conf.simple
 
 %build
 %{__aclocal}
@@ -149,24 +162,42 @@ install -d $RPM_BUILD_ROOT{/etc/{init,sysconfig,logrotate.d,rc.d/init.d},%{_sysc
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
+cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
+cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
 
-for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog
-do
+for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog; do
        > $RPM_BUILD_ROOT/var/log/$n
 done
 touch $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 rm $RPM_BUILD_ROOT%{_bindir}/loggen
 
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/init/%{name}.conf
+%if "%{pld_release}" == "th"
+cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/init/%{name}.conf
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
+if [ "$1" = "1" ]; then
+       # disable /proc/kmsg from config on first install on vserver
+       {
+               while read f ctx; do
+                       [ "$f" = "VxID:" -o "$f" = "s_context:" ] && break
+               done </proc/self/status
+       } 2>/dev/null
+       if [ -z "$ctx" -o "$ctx" = "0" ]; then
+               VSERVER=no
+       else
+               VSERVER=yes
+       fi
+       if [ "$VSERVER" = "yes" ]; then
+               %{__sed} -i -e '/\/proc\/kmsg/ s/^[^#]/#&/' %{_sysconfdir}/%{name}/%{name}.conf
+       fi
+fi
+
 /sbin/chkconfig --add syslog-ng
 %service syslog-ng restart "syslog-ng daemon"
 
@@ -198,7 +229,7 @@ exit 0
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS debian/syslog-ng.conf* contrib/{relogger.pl,syslog-ng.vim}
-%doc doc/examples/syslog-ng.conf.sample contrib/syslog-ng.conf.{doc,RedHat} contrib/syslog-ng-simple.conf
+%doc doc/examples/syslog-ng.conf.sample contrib/syslog-ng.conf.{doc,simple,RedHat}
 %doc contrib/{apparmor,selinux,syslog2ng} doc/syslog-ng-v3.0-guide-admin-en.pdf
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
@@ -212,6 +243,8 @@ exit 0
 
 %attr(640,root,root) %ghost /var/log/*
 
+%if "%{pld_release}" == "th"
 %files upstart
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
+%endif
This page took 0.107465 seconds and 4 git commands to generate.