Accepting request 68824 from home:darix:branches:Base:System
- move most of the additional requirements and subpackages into conditionals so we can switch them on and off by more easily. OBS-URL: https://build.opensuse.org/request/show/68824 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=50
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 27 16:19:31 UTC 2011 - mrueckert@suse.de
|
||||
|
||||
- move most of the additional requirements and subpackages into
|
||||
conditionals so we can switch them on and off by more easily.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 26 12:30:17 UTC 2011 - mt@suse.de
|
||||
|
||||
|
133
rsyslog.spec
133
rsyslog.spec
@@ -22,10 +22,29 @@ Name: rsyslog
|
||||
Summary: The enhanced syslogd for Linux and Unix
|
||||
Version: 5.8.0
|
||||
Release: 2
|
||||
# for setting those bcond_with* configs see
|
||||
# http://lizards.opensuse.org/2008/09/12/conditional-features-aka-use-flags/
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%bcond_without dbi
|
||||
%else
|
||||
%bcond_with dbi
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%bcond_without systemd
|
||||
%else
|
||||
%bcond_with systemd
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1130
|
||||
%bcond_without relp
|
||||
%else
|
||||
%bcond_with relp
|
||||
%endif
|
||||
%bcond_without gssapi
|
||||
%bcond_without gnutls
|
||||
%bcond_without mysql
|
||||
%bcond_without pgsql
|
||||
%bcond_without snmp
|
||||
%define upstream_version 5.8.0
|
||||
%define with_dbi 0%{?suse_version} >= 1140 || 0%{?build_with_dbi:1}
|
||||
%define with_systemd 0%{?suse_version} >= 1140 || 0%{?build_with_systemd:1}
|
||||
%define with_relp 0%{?suse_version} >= 1130 || 0%{?build_with_relp:1}
|
||||
%define _sbindir /sbin
|
||||
%define rsyslogdocdir %{_docdir}/%{name}
|
||||
%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf
|
||||
@@ -39,13 +58,31 @@ AutoReqProv: on
|
||||
Provides: syslog
|
||||
PreReq: %insserv_prereq %fillup_prereq /sbin/klogd /etc/init.d/syslog /sbin/checkproc
|
||||
BuildRequires: klogd
|
||||
BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel
|
||||
BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: zlib-devel
|
||||
#
|
||||
%if %{with gssapi}
|
||||
BuildRequires: krb5-devel
|
||||
%endif
|
||||
%if %{with mysql}
|
||||
BuildRequires: mysql-devel
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
BuildRequires: net-snmp-devel
|
||||
%endif
|
||||
%if %{with pgsql}
|
||||
BuildRequires: postgresql-devel
|
||||
%endif
|
||||
%if %{with gnutls}
|
||||
BuildRequires: libgnutls-devel
|
||||
%if 0%{?with_dbi}
|
||||
%endif
|
||||
%if %{with dbi}
|
||||
BuildRequires: libdbi-devel
|
||||
%endif
|
||||
%if 0%{?with_relp}
|
||||
%if %{with relp}
|
||||
# RELP support
|
||||
BuildRequires: librelp-devel
|
||||
%endif
|
||||
@@ -55,7 +92,7 @@ BuildRequires: libnet-devel
|
||||
%else
|
||||
BuildRequires: libnet
|
||||
%endif
|
||||
%if 0%{?with_systemd}
|
||||
%if %{with systemd}
|
||||
# The systemd package provides
|
||||
# /usr/share/doc/packages/systemd/sd-daemon.[ch]
|
||||
# files instead of a lib ... See also bug 656259.
|
||||
@@ -103,6 +140,7 @@ package.
|
||||
This package provides additional diagnostic tools (small helpers,
|
||||
usually not needed).
|
||||
|
||||
%if %{with gssapi}
|
||||
%package module-gssapi
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -115,7 +153,9 @@ package.
|
||||
|
||||
This module provides the support to receive syslog messages from the
|
||||
network protected via Kerberos 5 encryption and authentication.
|
||||
%endif
|
||||
|
||||
%if %{with mysql}
|
||||
%package module-mysql
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -128,7 +168,9 @@ package.
|
||||
|
||||
This package provides a module with the support for logging into MySQL
|
||||
databases.
|
||||
%endif
|
||||
|
||||
%if %{with pgsql}
|
||||
%package module-pgsql
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -140,9 +182,9 @@ Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog
|
||||
package.
|
||||
|
||||
This module provides the support for logging into PostgreSQL databases.
|
||||
%endif
|
||||
|
||||
%if 0%{?with_dbi}
|
||||
|
||||
%if %{with dbi}
|
||||
%package module-dbi
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -157,6 +199,7 @@ This package provides a module with the support for logging into DBI
|
||||
supported databases.
|
||||
%endif
|
||||
|
||||
%if %{with snmp}
|
||||
%package module-snmp
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -169,7 +212,9 @@ package.
|
||||
|
||||
This module provides the ability to send syslog messages as an SNMPv1 &
|
||||
v2c traps.
|
||||
%endif
|
||||
|
||||
%if %{with gnutls}
|
||||
%package module-gtls
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -182,9 +227,9 @@ package.
|
||||
|
||||
This module provides the ability for TLS encrypted TCP logging (based
|
||||
on current syslog-transport-tls internet drafts).
|
||||
%endif
|
||||
|
||||
%if 0%{?with_relp}
|
||||
|
||||
%if %{with relp}
|
||||
%package module-relp
|
||||
License: GPLv3+
|
||||
Group: System/Daemons
|
||||
@@ -213,7 +258,7 @@ This module provides a UDP forwarder that allows changing the sender address.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{upstream_version}
|
||||
%if 0%{?with_systemd}
|
||||
%if %{with systemd}
|
||||
# Bug: https://bugzilla.novell.com/show_bug.cgi?id=656259
|
||||
# install the files systemd provides rather than what we provide.
|
||||
cp -a /usr/share/doc/packages/systemd/sd-daemon.[ch] runtime/
|
||||
@@ -238,18 +283,28 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall"
|
||||
--enable-zlib \
|
||||
--enable-klog \
|
||||
--enable-inet \
|
||||
%if %{with gnutls}
|
||||
--enable-gnutls \
|
||||
%endif
|
||||
--enable-rsyslogd \
|
||||
%if %{with gssapi}
|
||||
--enable-gssapi-krb5 \
|
||||
%endif
|
||||
%if %{with mysql}
|
||||
--enable-mysql \
|
||||
%endif
|
||||
%if %{with pgsql}
|
||||
--enable-pgsql \
|
||||
%if 0%{?with_dbi}
|
||||
%endif
|
||||
%if %{with dbi}
|
||||
--enable-libdbi \
|
||||
%endif
|
||||
%if 0%{?with_relp}
|
||||
%if %{with relp}
|
||||
--enable-relp \
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
--enable-snmp \
|
||||
%endif
|
||||
--enable-mail \
|
||||
--enable-imfile \
|
||||
--enable-imptcp \
|
||||
@@ -273,13 +328,27 @@ rm -f %{buildroot}%{rsyslog_module_dir_nodeps}/*.la
|
||||
# move all modules linking libraries in /usr to /usr/lib[64]
|
||||
# the user has to specify them with full path then...
|
||||
install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps}
|
||||
for mod in omgssapi.so imgssapi.so lmgssutil.so ommysql.so \
|
||||
ompgsql.so omsnmp.so lmnsd_gtls.so \
|
||||
%if 0%{?with_dbi}
|
||||
omlibdbi.so \
|
||||
for mod in \
|
||||
%if %{with gssapi}
|
||||
omgssapi.so imgssapi.so lmgssutil.so \
|
||||
%endif
|
||||
%if 0%{?with_relp}
|
||||
imrelp.so omrelp.so \
|
||||
%if %{with mysql}
|
||||
ommysql.so \
|
||||
%endif
|
||||
%if %{with pgsql}
|
||||
ompgsql.so \
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
omsnmp.so \
|
||||
%endif
|
||||
%if %{with dbi}
|
||||
omlibdbi.so \
|
||||
%endif
|
||||
%if %{with relp}
|
||||
imrelp.so omrelp.so \
|
||||
%endif
|
||||
%if %{with gnutls}
|
||||
lmnsd_gtls.so \
|
||||
%endif
|
||||
; do
|
||||
mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \
|
||||
@@ -321,12 +390,16 @@ install -d -m0755 %{buildroot}%{rsyslogdocdir}/
|
||||
find ChangeLog README AUTHORS COPYING COPYING.LESSER rsyslog.conf doc \
|
||||
\( -type d -exec install -m755 -d %{buildroot}%{rsyslogdocdir}/\{\} \; \) \
|
||||
-o \( -type f -exec install -m644 \{\} %{buildroot}%{rsyslogdocdir}/\{\} \; \)
|
||||
%if %{with mysql}
|
||||
install -m644 plugins/ommysql/createDB.sql \
|
||||
%{buildroot}%{rsyslogdocdir}/mysql-createDB.sql
|
||||
%endif
|
||||
%if %{with pgsql}
|
||||
install -m644 plugins/ompgsql/createDB.sql \
|
||||
%{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql
|
||||
%endif
|
||||
#
|
||||
%if 0%{?with_systemd}
|
||||
%if %{with systemd}
|
||||
# TODO: https://features.opensuse.org/311316
|
||||
rm -v %{buildroot}/lib/systemd/system/rsyslog.service
|
||||
%endif
|
||||
@@ -486,39 +559,47 @@ fi
|
||||
%{_sbindir}/rsyslog_diag_hostname
|
||||
%{_sbindir}/zpipe
|
||||
|
||||
%if %{with gssapi}
|
||||
%files module-gssapi
|
||||
%defattr(-,root,root)
|
||||
%{rsyslog_module_dir_withdeps}/omgssapi.so
|
||||
%{rsyslog_module_dir_withdeps}/imgssapi.so
|
||||
%{rsyslog_module_dir_withdeps}/lmgssutil.so
|
||||
%endif
|
||||
|
||||
%if %{with mysql}
|
||||
%files module-mysql
|
||||
%defattr(-,root,root)
|
||||
%doc %{rsyslogdocdir}/mysql-createDB.sql
|
||||
%{rsyslog_module_dir_withdeps}/ommysql.so
|
||||
%endif
|
||||
|
||||
%if %{with pgsql}
|
||||
%files module-pgsql
|
||||
%defattr(-,root,root)
|
||||
%doc %{rsyslogdocdir}/pgsql-createDB.sql
|
||||
%{rsyslog_module_dir_withdeps}/ompgsql.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_dbi}
|
||||
|
||||
%if %{with dbi}
|
||||
%files module-dbi
|
||||
%defattr(-,root,root)
|
||||
%{rsyslog_module_dir_withdeps}/omlibdbi.so
|
||||
%endif
|
||||
|
||||
%if %{with snmp}
|
||||
%files module-snmp
|
||||
%defattr(-,root,root)
|
||||
%{rsyslog_module_dir_withdeps}/omsnmp.so
|
||||
%endif
|
||||
|
||||
%if %{with gnutls}
|
||||
%files module-gtls
|
||||
%defattr(-,root,root)
|
||||
%{rsyslog_module_dir_withdeps}/lmnsd_gtls.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_relp}
|
||||
|
||||
%if %{with relp}
|
||||
%files module-relp
|
||||
%defattr(-,root,root)
|
||||
%{rsyslog_module_dir_withdeps}/imrelp.so
|
||||
|
Reference in New Issue
Block a user