packages: syslog-ng/syslog-ng.spec - package -devel - separated -libs (requ...
qboosh
qboosh at pld-linux.org
Fri Nov 11 10:35:08 CET 2011
Author: qboosh Date: Fri Nov 11 09:35:08 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- package -devel
- separated -libs (required by -devel), so no daemon is required for development
- filterout_ld as-needed options for dynamic linking too (otherwise tests fail)
- BRs/Rs cleanup wrt. dynamic/mixed linking: only core (libsyslong-ng and syslog-ng daemon)
use mixed linking, everything else is always linked dynamically)
---- Files affected:
packages/syslog-ng:
syslog-ng.spec (1.223 -> 1.224)
---- Diffs:
================================================================
Index: packages/syslog-ng/syslog-ng.spec
diff -u packages/syslog-ng/syslog-ng.spec:1.223 packages/syslog-ng/syslog-ng.spec:1.224
--- packages/syslog-ng/syslog-ng.spec:1.223 Thu Nov 10 18:42:42 2011
+++ packages/syslog-ng/syslog-ng.spec Fri Nov 11 10:35:03 2011
@@ -1,12 +1,13 @@
# $Revision$, $Date$
#
# TODO:
-# - move SQL module to a separate package
-# - relies on libs in /usr/ which is wrong
-# - use external libivykis [>= 0.18+syslog-ng updates], libmongo_client [>= 0.1.0]
+# - move SQL module to a separate package
+# - relies on libs in /usr which is wrong
+# (well, for modules bringing additional functionality it's acceptable IMO --q)
+# - use external libivykis [>= 0.18+syslog-ng updates]
#
# Conditional build:
-%bcond_with dynamic # link dynamically with glib, eventlog, pcre, openssl
+%bcond_with dynamic # link dynamically with glib, eventlog, pcre (modules are always linked dynamically)
%if "%{pld_release}" == "ac"
%bcond_with sql # build with support for logging to SQL DB
%else
@@ -20,11 +21,11 @@
%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(pl.UTF-8): Syslog-ng - systemowy demon logujący nowej generacji
Summary(pt_BR.UTF-8): Daemon de log nova geração
Name: syslog-ng
Version: 3.3.1
-Release: 2
+Release: 3
License: GPL v2
Group: Daemons
Source0: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/%{name}_%{version}.tar.gz
@@ -42,8 +43,18 @@
BuildRequires: autoconf >= 2.53
BuildRequires: automake
BuildRequires: bison >= 2.4
+BuildRequires: eventlog-devel >= 0.2.12
BuildRequires: flex
+BuildRequires: glib2-devel >= 1:%{glib2_ver}
+BuildRequires: json-c-devel >= 0.7
+BuildRequires: libcap-devel
+%{?with_sql:BuildRequires: libdbi-devel >= 0.8.3-2}
+BuildRequires: libmongo-client-devel >= 0.1.0
+BuildRequires: libnet-devel >= 1:1.1.2.1-3
BuildRequires: libtool >= 2:2.0
+BuildRequires: libwrap-devel
+BuildRequires: openssl-devel >= 0.9.8
+BuildRequires: pcre-devel >= 6.1
BuildRequires: pkgconfig
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpmbuild(macros) >= 1.561
@@ -54,45 +65,26 @@
BuildRequires: python-modules
BuildRequires: tzdata
%endif
-%if %{with dynamic}
-BuildRequires: eventlog-devel >= 0.2.12
-BuildRequires: glib2-devel >= 1:%{glib2_ver}
-BuildRequires: json-c-devel >= 0.7
-BuildRequires: libcap-devel
-%{?with_sql:BuildRequires: libdbi-devel >= 0.8.3-2}
-BuildRequires: libmongo-client-devel >= 0.1.0
-BuildRequires: libnet-devel >= 1:1.1.2.1-3
-BuildRequires: libwrap-devel
-BuildRequires: openssl-devel >= 0.9.8
-BuildRequires: pcre-devel >= 6.1
-%else
+%if %{without dynamic}
BuildRequires: eventlog-static >= 0.2.12
BuildRequires: glib2-static >= 1:%{glib2_ver}
-BuildRequires: glibc-static
-BuildRequires: json-c-static >= 0.7
-BuildRequires: libcap-static
-%{?with_sql:BuildRequires: libdbi-static >= 0.8.3-2}
-BuildRequires: libmongo-client-static >= 0.1.0
-BuildRequires: libnet-static >= 1:1.1.2.1-3
-BuildRequires: libwrap-static
-BuildRequires: openssl-static >= 0.9.8
BuildRequires: pcre-static >= 6.1
BuildRequires: zlib-static
%endif
Requires(post): fileutils
Requires(post,preun): /sbin/chkconfig
+Requires: %{name}-libs = %{version}-%{release}
+Requires: eventlog >= 0.2.12
Requires: glib2 >= 1:%{glib2_ver}
+Requires: pcre >= 6.1
Requires: psmisc >= 20.1
Requires: rc-scripts >= 0.4.3.0
-%if %{with dynamic}
-Requires: eventlog >= 0.2.12
+# for modules
Requires: json-c >= 0.7
Requires: libdbi >= 0.8.3-2
Requires: libmongo-client >= 0.1.0
Requires: libnet >= 1:1.1.2.1-7
Requires: openssl >= 0.9.8
-Requires: pcre >= 6.1
-%endif
Provides: syslogdaemon
Conflicts: klogd
Conflicts: msyslog
@@ -104,10 +96,10 @@
# - libsyslog-ng.so has undefined symbols for third party libraries
# and these symbols should go via main syslog-ng binary
# - same applies for modules
+# In dynamic case tests are forcily linked with dynamic modules, which doesn't work with as-needed.
+%define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
%if %{without dynamic}
%define no_install_post_check_so 1
-# filterout_ld - see comment few lines above
-%define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
%define _sbindir /sbin
%define _libdir /%{_lib}
%endif
@@ -150,6 +142,40 @@
%description upstart -l pl.UTF-8
Opis zadania Upstart dla demona syslog-ng.
+%package libs
+Summary: Shared library for syslog-ng
+Summary(pl.UTF-8): Biblioteka współdzielona sysloga-ng
+Group: Libraries
+%if %{with dynamic}
+Requires: eventlog >= 0.2.12
+Requires: glib2 >= 1:%{glib2_ver}
+Requires: pcre >= 6.1
+%endif
+Conflicts: syslog-ng < 3.3.1-3
+
+%description libs
+Shared library for syslog-ng.
+
+%description libs -l pl.UTF-8
+Biblioteka współdzielona sysloga-ng.
+
+%package devel
+Summary: Header files for syslog-ng modules development
+Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia modułów dla sysloga-ng
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+%if %{with dynamic}
+Requires: eventlog-devel >= 0.2.12
+Requires: glib2-devel >= 1:%{glib2_ver}
+Requires: pcre-devel >= 6.1
+%endif
+
+%description devel
+Header files for syslog-ng modules development.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe do tworzenia modułów dla sysloga-ng.
+
%prep
%setup -q
%patch0 -p1
@@ -195,7 +221,10 @@
%{__make}
-%{?with_tests:LD_LIBRARY_PATH=$PWD/lib/.libs %{__make} check}
+%if %{with tests}
+LD_LIBRARY_PATH=$PWD/lib/.libs \
+%{__make} check
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -227,7 +256,6 @@
rm -rf $RPM_BUILD_ROOT
%post
-/sbin/ldconfig
if [ "$1" = "1" ]; then
# disable /proc/kmsg from config on first install on vserver
{
@@ -254,18 +282,6 @@
/sbin/chkconfig --del syslog-ng
fi
-%postun -p /sbin/ldconfig
-
-%post upstart
-%upstart_post %{name}
-
-%postun upstart
-%upstart_postun %{name}
-
-%triggerun upstart -- syslog-ng-upstart < 3.2.4-3
-# use SERVICE_syslog=y in upstart job environment instead of SERVICE=syslog
-%{__sed} -i -e 's,SERVICE=syslog,SERVICE_syslog=y,' /etc/init/*.conf || :
-
%triggerun -- syslog-ng < 3.0
sed -i -e 's#sync(\(.*\))#flush_lines(\1)#g' /etc/syslog-ng/syslog-ng.conf
sed -i -e 's#pipe ("/proc/kmsg"#file ("/proc/kmsg"#g' /etc/syslog-ng/syslog-ng.conf
@@ -279,6 +295,19 @@
%service -q syslog-ng restart
exit 0
+%post upstart
+%upstart_post %{name}
+
+%postun upstart
+%upstart_postun %{name}
+
+%triggerun upstart -- syslog-ng-upstart < 3.2.4-3
+# use SERVICE_syslog=y in upstart job environment instead of SERVICE=syslog
+%{__sed} -i -e 's,SERVICE=syslog,SERVICE_syslog=y,' /etc/init/*.conf || :
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS debian/syslog-ng.conf* contrib/relogger.pl
@@ -292,7 +321,6 @@
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng
%attr(754,root,root) /etc/rc.d/init.d/syslog-ng
-%attr(755,root,root) %{_libdir}/libsyslog-ng-%{version}.so
%dir %{_libdir}/syslog-ng
%attr(755,root,root) %{_libdir}/syslog-ng/lib*.so
%attr(755,root,root) %{_sbindir}/syslog-ng
@@ -300,7 +328,6 @@
%attr(755,root,root) %{_bindir}/pdbtool
%attr(755,root,root) %{_bindir}/update-patterndb
-%dir %{_datadir}/syslog-ng
%dir %{_datadir}/syslog-ng/include
%dir %{_datadir}/syslog-ng/include/scl
%dir %{_datadir}/syslog-ng/include/scl/pacct
@@ -322,7 +349,18 @@
%{_mandir}/man5/syslog-ng.conf.5*
%{_mandir}/man8/syslog-ng.8*
-%attr(640,root,root) %ghost /var/log/*
+%attr(640,root,root) %ghost /var/log/daemon
+%attr(640,root,root) %ghost /var/log/debug
+%attr(640,root,root) %ghost /var/log/iptables
+%attr(640,root,root) %ghost /var/log/kernel
+%attr(640,root,root) %ghost /var/log/lpr
+%attr(640,root,root) %ghost /var/log/maillog
+%attr(640,root,root) %ghost /var/log/messages
+%attr(640,root,root) %ghost /var/log/secure
+%attr(640,root,root) %ghost /var/log/spooler
+%attr(640,root,root) %ghost /var/log/syslog
+%attr(640,root,root) %ghost /var/log/user
+%attr(640,root,root) %ghost /var/log/xferlog
%if "%{pld_release}" == "th"
%files upstart
@@ -330,12 +368,31 @@
%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
%endif
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsyslog-ng-%{version}.so
+%dir %{_datadir}/syslog-ng
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsyslog-ng.so
+%{_includedir}/syslog-ng
+%{_datadir}/syslog-ng/tools
+%{_pkgconfigdir}/syslog-ng.pc
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.224 2011/11/11 09:35:03 qboosh
+- package -devel
+- separated -libs (required by -devel), so no daemon is required for development
+- filterout_ld as-needed options for dynamic linking too (otherwise tests fail)
+- BRs/Rs cleanup wrt. dynamic/mixed linking: only core (libsyslong-ng and syslog-ng daemon)
+ use mixed linking, everything else is always linked dynamically)
+
Revision 1.223 2011/11/10 17:42:42 qboosh
- use system libmongo-client
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/syslog-ng/syslog-ng.spec?r1=1.223&r2=1.224&f=u
More information about the pld-cvs-commit
mailing list