Automatic import for version 1.8.4

This commit is contained in:
Rosa 2012-02-01 20:58:23 +04:00
commit 53e4a5040a
8 changed files with 619 additions and 0 deletions

2
.abf.yml Normal file
View file

@ -0,0 +1,2 @@
sources:
"zabbix-1.8.4.tar.gz": b70a31a39d7f54f32a3d6956594c2bfc4fd1e0e4

View file

@ -0,0 +1,16 @@
diff -p -up zabbix-1.6.2/include/zbxdb.h.mysqlheaders zabbix-1.6.2/include/zbxdb.h
--- zabbix-1.6.2/include/zbxdb.h.mysqlheaders 2009-01-16 13:18:56.000000000 +0100
+++ zabbix-1.6.2/include/zbxdb.h 2009-03-14 13:47:38.000000000 +0100
@@ -30,9 +30,9 @@
#define ZBX_MAX_SQL_SIZE 262144 /* 256KB */
#ifdef HAVE_MYSQL
-# include "mysql.h"
-# include "errmsg.h"
-# include "mysqld_error.h"
+# include <mysql.h>
+# include <errmsg.h>
+# include <mysqld_error.h>
# define DB_HANDLE MYSQL
extern MYSQL *conn;
#endif /* HAVE_MYSQL */

View file

@ -0,0 +1,24 @@
diff -p -up zabbix-1.6.2/src/libs/zbxdb/Makefile.in.mysqlcflags zabbix-1.6.2/src/libs/zbxdb/Makefile.in
--- zabbix-1.6.2/src/libs/zbxdb/Makefile.in.mysqlcflags 2009-01-16 13:20:14.000000000 +0100
+++ zabbix-1.6.2/src/libs/zbxdb/Makefile.in 2009-03-14 13:47:38.000000000 +0100
@@ -63,7 +63,7 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(t
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(MYSQL_CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libzbxdb_a_SOURCES)
diff -p -up zabbix-1.6.2/src/libs/zbxdbhigh/Makefile.in.mysqlcflags zabbix-1.6.2/src/libs/zbxdbhigh/Makefile.in
--- zabbix-1.6.2/src/libs/zbxdbhigh/Makefile.in.mysqlcflags 2009-01-16 13:20:15.000000000 +0100
+++ zabbix-1.6.2/src/libs/zbxdbhigh/Makefile.in 2009-03-14 13:47:38.000000000 +0100
@@ -67,7 +67,7 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(t
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(MYSQL_CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libzbxdbhigh_a_SOURCES)

65
zabbix-agent.init Normal file
View file

@ -0,0 +1,65 @@
#! /bin/sh
#
# chkconfig: 345 85 15
# description: zabbix agent daemon
#
### BEGIN INIT INFO
# Provides: zabbix-agent
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 345
# Short-Description: Starts the Zabbix agent daemon
# Description: This startup script launches Zabbix agent daemon
### END INIT INFO
# zabbix details
ZABBIX_AGENTD=/usr/sbin/zabbix_agentd
CONF=/etc/zabbix/zabbix_agentd.conf
PIDFILE=/var/run/zabbix-agent.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $ZABBIX_AGENTD ] || exit 0
[ -e $CONF ] || exit 0
RETVAL=0
case "$1" in
start)
echo -n "Starting zabbix agent: "
daemon $ZABBIX_AGENTD -c $CONF
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix-agent
;;
stop)
echo -n "Shutting down zabbix agent: "
killproc zabbix_agentd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix-agent
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status zabbix_agentd
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
;;
esac
exit $RETVAL

7
zabbix-logrotate.in Normal file
View file

@ -0,0 +1,7 @@
/var/log/zabbix/zabbix_COMPONENT.log {
missingok
monthly
notifempty
compress
create 0664 zabbix zabbix
}

65
zabbix-server.init Normal file
View file

@ -0,0 +1,65 @@
#! /bin/sh
#
# chkconfig: 345 85 15
# description: zabbix server daemon
#
### BEGIN INIT INFO
# Provides: zabbix
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 345
# Short-Description: Starts the Zabbix server daemon
# Description: This startup script launches Zabbix server daemon
### END INIT INFO
# zabbix details
ZABBIX=/usr/sbin/zabbix_server
CONF=/etc/zabbix/zabbix_server.conf
PIDFILE=/var/run/zabbix.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $ZABBIX ] || exit 0
[ -e $CONF ] || exit 0
RETVAL=0
case "$1" in
start)
echo -n "Starting zabbix server: "
daemon $ZABBIX -c $CONF
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix
;;
stop)
echo -n "Shutting down zabbix server: "
killproc zabbix_server
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status zabbix_server
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
;;
esac
exit $RETVAL

34
zabbix-web.conf Normal file
View file

@ -0,0 +1,34 @@
#
# Zabbix monitoring system php web frontend
#
Alias /zabbix /usr/share/zabbix
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
php_value memory_limit 128M
php_value post_max_size 16M
php_value max_execution_time 300
php_value max_input_time 300
</Directory>
<Directory "/usr/share/zabbix/include">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
<Directory "/usr/share/zabbix/include/classes">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>

406
zabbix.spec Normal file
View file

@ -0,0 +1,406 @@
%define _disable_ld_as_needed 1
%define _localstatedir /var
%define _requires_exceptions pear
Name: zabbix
Version: 1.8.4
Release: %mkrel 5
Summary: Open-source monitoring solution for your IT infrastructure
Group: Networking/Other
License: GPLv2+
URL: http://www.zabbix.com/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: zabbix-web.conf
Source2: zabbix-server.init
Source3: zabbix-agent.init
Source4: zabbix-logrotate.in
Patch0: zabbix-1.4-fixmysqlheaders.patch
Patch1: zabbix-1.4-mysqlcflags.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
%define database %{nil}
%define zdb %{nil}
%define with_postgresql %{?_with_postgresql: 1} %{?!_with_postgresql: 0}
#define with_mysql %{?_with_mysql: 1} %{?!_with_mysql: 0}
%define with_mysql %{?_without_mysql: 0} %{?!_without_mysql: 1}
# Zabbix can only be built with mysql -or- postgresql
# support. We build with mysql by default, but you can
# pass --with postgresql to build with postgresql instead.
%if %{with_postgresql}
%define database postgresql
%define zdb pgsql
%endif
%if %{with_mysql}
%define database mysql
%define zdb mysql
%endif
#if %{?database:1}%{!?database:0}
%if %{with_mysql} || %{with_postgresql}
BuildRequires: %{database}-devel
%endif
BuildRequires: net-snmp-devel
BuildRequires: openldap-devel, gnutls-devel
BuildRequires: libiksemel-devel
BuildRequires: libtasn1-devel
BuildRequires: curl-devel
Requires: logrotate, fping
%if %{?mdkversion:1}%{?!mdkversion:0}
Requires(pre): rpm-helper
Requires(post): rpm-helper
Requires(preun): rpm-helper
%else
# for userdadd:
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig
# for /sbin/service:
Requires(preun): initscripts
%endif
%description
ZABBIX is software that monitors numerous parameters of a
network and the health and integrity of servers. ZABBIX
uses a flexible notification mechanism that allows users
to configure e-mail based alerts for virtually any event.
This allows a fast reaction to server problems. ZABBIX
offers excellent reporting and data visualisation features
based on the stored data. This makes ZABBIX ideal for
capacity planning.
ZABBIX supports both polling and trapping. All ZABBIX
reports and statistics, as well as configuration
parameters are accessed through a web-based front end. A
web-based front end ensures that the status of your network
and the health of your servers can be assessed from any
location. Properly configured, ZABBIX can play an important
role in monitoring IT infrastructure. This is equally true
for small organisations with a few servers and for large
companies with a multitude of servers.
%package agent
Summary: Zabbix Agent
Group: Networking/Other
Requires: logrotate
%if %{?mdkversion:1}%{?!mdkversion:0}
Requires(pre): rpm-helper
Requires(post): rpm-helper
Requires(preun): rpm-helper
%else
Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
%endif
%description agent
The zabbix client agent, to be installed on monitored systems.
%package web
Summary: Zabbix Web Frontend
Group: Networking/Other
Requires: php-%{zdb}, php-gd, apache-mod_php, php-bcmath php-sockets
%description web
The php frontend to display the zabbix web interface.
%prep
%setup -q
#patch0 -p1 -b .mysqlheaders
%patch1 -p1 -b .mysqlcflags
perl -pi -e 's/ -static//g' configure
# fix up some lib64 issues
%{__perl} -pi.orig -e 's|_LIBDIR=/usr/lib|_LIBDIR=%{_libdir}|g' \
configure
# fix up pt_br
%{__chmod} a-x frontends/php/include/locales/pt_br.inc.php ||:
%{__sed} -i 's/\r//' frontends/php/include/locales/pt_br.inc.php ||:
%build
%configure \
--enable-server \
--enable-agent \
--with-net-snmp \
--with-ldap \
--with-jabber \
--enable-static=no \
%if %{with_mysql}
--with-mysql
%endif
%if %{with_postgresql}
--with-%{zdb}
%endif
%if !%{with_mysql} && !%{with_postgresql}
--with-sqlite3
%endif
#--disable-static
#--with-mysql \
#--with-mysql=%{_libdir}/mysql/mysql_config \
#--with-mysql=%{_bindir}/mysql_config
# --disable-static is partially broken atm,
# -static still gets into CFLAGS, so fix up in make
# (and even then, .a files still show their face...)
#find . -name Makefile -exec perl -pi -e 's/ -static//g' {} \;
%make
#make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
%install
rm -rf %{buildroot}
# set up some required directories
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/init.d
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
mkdir -p %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
# php frontend
cp -a frontends/php %{buildroot}%{_datadir}/%{name}
mv %{buildroot}%{_datadir}/%{name}/include/db.inc.php \
%{buildroot}%{_sysconfdir}/%{name}/
ln -s ../../../..%{_sysconfdir}/%{name}/db.inc.php \
%{buildroot}%{_datadir}/%{name}/include/db.inc.php
# kill off .htaccess files, options set in SOURCE1
rm -f %{buildroot}%{_datadir}/%{name}/include/.htaccess
rm -f %{buildroot}%{_datadir}/%{name}/include/classes/.htaccess
# drop config files in place
install -m 0644 misc/conf/%{name}_agent.conf %{buildroot}%{_sysconfdir}/%{name}
cat misc/conf/%{name}_agentd.conf | sed \
-e 's|PidFile=.*|PidFile=%{_localstatedir}/run/%{name}/%{name}_agentd.pid|g' \
-e 's|LogFile=.*|LogFile=%{_localstatedir}/log/%{name}/%{name}_agentd.log|g' \
> %{buildroot}%{_sysconfdir}/%{name}/%{name}_agentd.conf
cat misc/conf/zabbix_server.conf | sed \
-e 's|PidFile=.*|PidFile=%{_localstatedir}/run/%{name}/%{name}.pid|g' \
-e 's|LogFile=.*|LogFile=%{_localstatedir}/log/%{name}/%{name}_server.log|g' \
-e 's|AlertScriptsPath=/home/%{name}/bin/|AlertScriptsPath=%{_localstatedir}/lib/%{name}/|g' \
-e 's|DBUser=root|DBUser=%{name}|g' \
-e 's|DBSocket=/tmp/mysql.sock|DBSocket=%{_localstatedir}/lib/%{zdb}/%{zdb}.sock|g' \
-e 's|FpingLocation=/usr/sbin/fping|FpingLocation=/bin/fping|g' \
> %{buildroot}%{_sysconfdir}/%{name}/%{name}_server.conf
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
# log rotation
cat %{SOURCE4} | sed -e 's|COMPONENT|server|g' > \
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
cat %{SOURCE4} | sed -e 's|COMPONENT|agentd|g' > \
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}-agent
# init scripts
install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/init.d/%{name}
install -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}-agent
make DESTDIR=%{buildroot} install
rm -rf %{buildroot}%{_libdir}/libzbx*.a
%clean
rm -rf %{buildroot}
%pre
# Add the "zabbix" user
/usr/sbin/useradd -c "Zabbix Monitoring System" \
-s /sbin/nologin -r -d %{_localstatedir}/lib/%{name} %{name} 2> /dev/null || :
%pre agent
# Add the "zabbix" user
/usr/sbin/useradd -c "Zabbix Monitoring System" \
-s /sbin/nologin -r -d %{_localstatedir}/lib/%{name} %{name} 2> /dev/null || :
%post
/sbin/chkconfig --add %{name}
%post agent
/sbin/chkconfig --add %{name}-agent
%preun
if [ "$1" = 0 ]
then
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%preun agent
if [ "$1" = 0 ]
then
/sbin/service %{name}-agent stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}-agent
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README
%doc create
%dir %{_sysconfdir}/%{name}
%{_sbindir}/%{name}_server
%{_sysconfdir}/init.d/%{name}
%{_mandir}/man8/%{name}_server.8*
%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix
%config(noreplace) %{_sysconfdir}/%{name}/%{name}_server.conf
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/log/%{name}
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
%files agent
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README
%dir %{_sysconfdir}/%{name}
%{_bindir}/%{name}_sender
%{_bindir}/%{name}_get
%{_sbindir}/%{name}_agent
%{_sbindir}/%{name}_agentd
%{_mandir}/man1/%{name}_sender.1*
%{_mandir}/man1/%{name}_get.1*
%{_mandir}/man8/%{name}_agentd.8*
%{_sysconfdir}/init.d/%{name}-agent
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-agent
%config(noreplace) %{_sysconfdir}/%{name}/%{name}_agent.conf
%config(noreplace) %{_sysconfdir}/%{name}/%{name}_agentd.conf
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/log/%{name}
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
%files web
%defattr(-,root,root,-)
%doc README
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/db.inc.php
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%{_datadir}/%{name}
%changelog
* Thu Mar 17 2011 Oden Eriksson <oeriksson@mandriva.com> 1.8.4-5mdv2011.0
+ Revision: 645908
- relink against libmysqlclient.so.18
* Tue Feb 22 2011 Buchan Milne <bgmilne@mandriva.org> 1.8.4-4
+ Revision: 639392
- New version 1.8.4
* Sat Jan 01 2011 Oden Eriksson <oeriksson@mandriva.com> 1.8.3-4mdv2011.0
+ Revision: 627293
- rebuilt against mysql-5.5.8 libs, again
* Thu Dec 30 2010 Oden Eriksson <oeriksson@mandriva.com> 1.8.3-3mdv2011.0
+ Revision: 626567
- rebuilt against mysql-5.5.8 libs
* Mon Oct 25 2010 Sandro Cazzaniga <kharec@mandriva.org> 1.8.3-1mdv2011.0
+ Revision: 589245
- update to 1.8.3
- fix file list
* Thu Jun 03 2010 Buchan Milne <bgmilne@mandriva.org> 1.8.2-3mdv2010.1
+ Revision: 547024
- Add LSB headers to init scripts
- Add current required php settings in apache config include file (mdv#54812)
- Fix fping path in zabbix_server.conf (mdv#54824)
* Thu Apr 15 2010 Buchan Milne <bgmilne@mandriva.org> 1.8.2-2mdv2010.1
+ Revision: 535081
- rebuild
- update to new version 1.8.2
* Tue Apr 06 2010 Luis Daniel Lucio Quiroz <dlucio@mandriva.org> 1.8.1-3mdv2010.1
+ Revision: 532376
- Rebuild for new OpenSSL
* Thu Feb 18 2010 Oden Eriksson <oeriksson@mandriva.com> 1.8.1-2mdv2010.1
+ Revision: 507513
- rebuild
* Thu Feb 11 2010 Emmanuel Andry <eandry@mandriva.org> 1.8.1-1mdv2010.1
+ Revision: 504207
- New version 1.8.1
- update files list
+ Buchan Milne <bgmilne@mandriva.org>
- Require php-sockets in zabbix-web
* Sat Jan 02 2010 Frederik Himpe <fhimpe@mandriva.org> 1.6.8-1mdv2010.1
+ Revision: 485148
- update to new version 1.6.8
* Thu Oct 15 2009 Oden Eriksson <oeriksson@mandriva.com> 1.6.6-2mdv2010.0
+ Revision: 457697
- rebuild
* Wed Sep 02 2009 Buchan Milne <bgmilne@mandriva.org> 1.6.6-1mdv2010.0
+ Revision: 425016
- update to new version 1.6.6
* Thu Jun 25 2009 Buchan Milne <bgmilne@mandriva.org> 1.6.5-1mdv2010.0
+ Revision: 389133
- update to new version 1.6.5
* Mon May 11 2009 Buchan Milne <bgmilne@mandriva.org> 1.6.4-1mdv2010.0
+ Revision: 374160
- update to new version 1.6.4
* Thu Mar 26 2009 Buchan Milne <bgmilne@mandriva.org> 1.6.2-3mdv2009.1
+ Revision: 361319
- Buildrequire curl-devel (bug #49136)
* Fri Mar 20 2009 Buchan Milne <bgmilne@mandriva.org> 1.6.2-2mdv2009.1
+ Revision: 359061
- Exclude spurious pear dependency (bug #48950)
* Sat Mar 14 2009 Buchan Milne <bgmilne@mandriva.org> 1.6.2-1mdv2009.1
+ Revision: 354969
- New version 1.6.2
- Rediff mysql patches
- Drop ldap link order patch
* Sat Dec 06 2008 Oden Eriksson <oeriksson@mandriva.com> 1.4.6-2mdv2009.1
+ Revision: 311320
- rebuilt against mysql-5.1.30 libs
* Wed Sep 03 2008 Buchan Milne <bgmilne@mandriva.org> 1.4.6-1mdv2009.0
+ Revision: 279801
- New version 1.4.6
* Wed Sep 03 2008 Buchan Milne <bgmilne@mandriva.org> 1.4.5-4mdv2009.0
+ Revision: 279779
- Disable --as-needed for now
- New version 1.4.5
- Fix LDAP linking
+ Thierry Vignaud <tv@mandriva.org>
- rebuild
- rebuild
* Mon Mar 03 2008 Buchan Milne <bgmilne@mandriva.org> 1.4.4-1mdv2008.1
+ Revision: 178184
- New version 1.4.4
- Drop security fix patch
- Buildrequire libtasn1-devel
* Thu Jan 24 2008 Funda Wang <fwang@mandriva.org> 1.4.2-5mdv2008.1
+ Revision: 157296
- rebuild
+ Olivier Blin <oblin@mandriva.com>
- restore BuildRoot
* Wed Dec 26 2007 Oden Eriksson <oeriksson@mandriva.com> 1.4.2-4mdv2008.1
+ Revision: 137974
- rebuilt against openldap-2.4.7 libs
+ Thierry Vignaud <tv@mandriva.org>
- kill re-definition of %%buildroot on Pixel's request
* Wed Dec 12 2007 Buchan Milne <bgmilne@mandriva.org> 1.4.2-3mdv2008.1
+ Revision: 117743
- Security fix for CVE-2007-6210
* Mon Nov 26 2007 Thierry Vignaud <tv@mandriva.org> 1.4.2-2mdv2008.1
+ Revision: 112201
- kill file requires
* Wed Sep 05 2007 Buchan Milne <bgmilne@mandriva.org> 1.4.2-1mdv2008.0
+ Revision: 80468
- import zabbix