rpms/zabbix/F-10 .cvsignore, 1.15, 1.16 sources, 1.16, 1.17 zabbix-agent.init, 1.3, 1.4 zabbix-proxy.init, 1.1, 1.2 zabbix-server.init, 1.4, 1.5 zabbix.spec, 1.30, 1.31 zabbix-1.6.2-cpustats.patch, 1.1, NONE

Dan Horák sharkcz at fedoraproject.org
Mon May 18 12:33:34 UTC 2009


Author: sharkcz

Update of /cvs/pkgs/rpms/zabbix/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14757

Modified Files:
	.cvsignore sources zabbix-agent.init zabbix-proxy.init 
	zabbix-server.init zabbix.spec 
Removed Files:
	zabbix-1.6.2-cpustats.patch 
Log Message:
* Fri Apr 17 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.6.4-3
- Tighten configuration file permissions.
- Ensure zero exit status from scriptlets.
- Improve init script LSB compliance.
- Restart running services on package upgrades.

* Thu Apr  9 2009 Dan Horák <dan[at]danny.cz> - 1.6.4-2
- make the -docs subpackage noarch

* Thu Apr  9 2009 Dan Horák <dan[at]danny.cz> - 1.6.4-1
- update to 1.6.4
- remove the cpustat patch, it was integreated into upstream
- use noarch subpackage for the web interface
- database specific web subpackages conflicts with each other
- use common set of option for the configure macro
- enable IPMI support
- sqlite web subpackage must depend on local sqlite
- reorganize the docs and the sql scripts
- change how the web interface config file is created
- updated scriptlet for adding the zabbix user
- move the documentation in PDF to -docs subpackage
- most of the changes were submitted by Ville Skyttä in #494706 
- Resolves: #489673, #493234, #494706

* Mon Mar  9 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-5
- Update pre patch due to incomplete fix for security problems.

* Wed Mar  4 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-4
- Update to a SVN snapshot of the upstream 1.6 branch to fix security
  issue (BZ#488501)

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Jan 23 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-2
- Rebuild for MySQL 5.1.X



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/F-10/.cvsignore,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- .cvsignore	16 Jan 2009 15:28:50 -0000	1.15
+++ .cvsignore	18 May 2009 12:33:04 -0000	1.16
@@ -1 +1 @@
-zabbix-1.6.2.tar.gz
+zabbix-1.6.4.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/F-10/sources,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- sources	16 Jan 2009 15:28:50 -0000	1.16
+++ sources	18 May 2009 12:33:04 -0000	1.17
@@ -1 +1 @@
-33da3661868a04042c596a819896446f  zabbix-1.6.2.tar.gz
+e1e15f3ab9f2c0ec9e6fde145a5a3b6e  zabbix-1.6.4.tar.gz


Index: zabbix-agent.init
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/F-10/zabbix-agent.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- zabbix-agent.init	7 Jul 2008 08:03:13 -0000	1.3
+++ zabbix-agent.init	18 May 2009 12:33:04 -0000	1.4
@@ -1,7 +1,9 @@
-#! /bin/sh
+#!/bin/sh
 #
 # chkconfig: - 85 15
-# description: zabbix agent daemon
+# description: ZABBIX agent daemon
+# processname: zabbix_agentd
+# config: /etc/zabbix/zabbix_agentd.conf
 #
 
 ### BEGIN INIT INFO
@@ -10,58 +12,65 @@
 # Required-Stop: $local_fs $network
 # Default-Start:
 # Default-Stop: 0 1 2 3 4 5 6
-# Short-Description: start and stop zabbix agent
-# Description: Zabbix Agent
+# Short-Description: Start and stop ZABBIX agent
+# Description: ZABBIX agent
 ### 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 5
-[ -e $CONF ] || exit 6
-
-RETVAL=0
+exec=/usr/sbin/zabbix_agentd
+prog=${exec##*/}
+lockfile=/var/lock/subsys/zabbix-agent
+
+start()
+{
+    echo -n $"Starting ZABBIX agent: "
+    daemon $exec
+    rv=$?
+    echo
+    [ $rv -eq 0 ] && touch $lockfile
+    return $rv
+}
+
+stop()
+{
+    echo -n $"Shutting down ZABBIX agent: "
+    killproc $prog
+    rv=$?
+    echo
+    [ $rv -eq 0 ] && rm -f $lockfile
+    return $rv
+}
+
+restart()
+{
+    stop
+    start
+}
 
 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
+    start|stop|restart)
+        $1
         ;;
-    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=$?
+    force-reload)
+        restart
         ;;
     status)
-        status zabbix_agentd
-        RETVAL=$?
+        status $prog
+        ;;
+    try-restart|condrestart)
+        if status $prog >/dev/null ; then
+            restart
+        fi
+        ;;
+    reload)
+        action $"Service ${0##*/} does not support the reload action: " /bin/false
+        exit 3
         ;;
     *)
-	echo "Usage: $0 {start|stop|restart|reload|status}"
-	exit 1
+	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
+	exit 2
 	;;
 esac
 
-exit $RETVAL
-


Index: zabbix-proxy.init
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/F-10/zabbix-proxy.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- zabbix-proxy.init	30 Sep 2008 17:41:33 -0000	1.1
+++ zabbix-proxy.init	18 May 2009 12:33:04 -0000	1.2
@@ -1,75 +1,84 @@
-#! /bin/sh
+#!/bin/sh
 #
 # chkconfig: - 85 15
-# description: zabbix proxy daemon
+# description: ZABBIX proxy daemon
+# config: /etc/zabbix/zabbix_proxy.conf
 #
 
 ### BEGIN INIT INFO
-# Provides: zabbix
+# Provides: zabbix-proxy
 # Required-Start: $local_fs $network
 # Required-Stop: $local_fs $network
 # Default-Start:
 # Default-Stop: 0 1 2 3 4 5 6
-# Short-Description: start and stop zabbix proxy
-# Description: Zabbix Proxy
+# Short-Description: Start and stop ZABBIX proxy
+# Description: ZABBIX proxy
 ### END INIT INFO
 
-# zabbix details
+# Source function library.
+. /etc/rc.d/init.d/functions
+
 if [ -x /usr/sbin/zabbix_proxy_mysql ]; then
-    ZABBIX_PROXY=zabbix_proxy_mysql
+    exec=zabbix_proxy_mysql
 elif [ -x /usr/sbin/zabbix_proxy_pgsql ]; then
-    ZABBIX_PROXY=zabbix_proxy_pgsql
+    exec=zabbix_proxy_pgsql
 elif [ -x /usr/sbin/zabbix_proxy_sqlite3 ]; then
-    ZABBIX_PROXY=zabbix_proxy_sqlite3
+    exec=zabbix_proxy_sqlite3
 else
     exit 5
 fi
-
-CONF=/etc/zabbix/zabbix_proxy.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
-
-[ -e $CONF ] || exit 6
-
-RETVAL=0
+prog=${exec##*/}
+lockfile=/var/lock/subsys/zabbix-proxy
+conf=
+
+start()
+{
+    echo -n $"Starting ZABBIX proxy: "
+    daemon $exec
+    rv=$?
+    echo
+    [ $rv -eq 0 ] && touch $lockfile
+    return $rv
+}
+
+stop()
+{
+    echo -n $"Shutting down ZABBIX proxy: "
+    killproc $prog
+    rv=$?
+    echo
+    [ $rv -eq 0 ] && rm -f $lockfile
+    return $rv
+}
+
+restart()
+{
+    stop
+    start
+}
 
 case "$1" in
-    start)
-        echo -n "Starting Zabbix proxy: "
-        daemon $ZABBIX_PROXY -c $CONF
-        RETVAL=$?
-        echo
-        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix-proxy
-        ;;
-    stop)
-        echo -n "Shutting down Zabbix proxy: "
-        killproc $ZABBIX_PROXY
-        RETVAL=$?
-        echo
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix-proxy
+    start|stop|restart)
+        $1
         ;;
-    restart|reload)
-        $0 stop
-        $0 start
-        RETVAL=$?
+    force-reload)
+        restart
         ;;
     status)
-        status $ZABBIX_PROXY
-        RETVAL=$?
+        status $prog
+        ;;
+    try-restart|condrestart)
+        if status $prog >/dev/null ; then
+            restart
+        fi
+        ;;
+    reload)
+        action $"Service ${0##*/} does not support the reload action: " /bin/false
+        exit 3
         ;;
     *)
-	echo "Usage: $0 {start|stop|restart|reload|status}"
-	exit 1
+	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
+	exit 2
 	;;
 esac
 
-exit $RETVAL
-


Index: zabbix-server.init
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/F-10/zabbix-server.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- zabbix-server.init	30 Sep 2008 17:36:49 -0000	1.4
+++ zabbix-server.init	18 May 2009 12:33:04 -0000	1.5
@@ -1,7 +1,8 @@
-#! /bin/sh
+#!/bin/sh
 #
 # chkconfig: - 85 15
-# description: zabbix server daemon
+# description: ZABBIX server daemon
+# config: /etc/zabbix/zabbix_server.conf
 #
 
 ### BEGIN INIT INFO
@@ -10,66 +11,73 @@
 # Required-Stop: $local_fs $network
 # Default-Start:
 # Default-Stop: 0 1 2 3 4 5 6
-# Short-Description: start and stop zabbix server
-# Description: Zabbix Server
+# Short-Description: Start and stop ZABBIX server
+# Description: ZABBIX server
 ### END INIT INFO
 
-# zabbix details
+# Source function library.
+. /etc/rc.d/init.d/functions
+
 if [ -x /usr/sbin/zabbix_server_mysql ]; then
-    ZABBIX=zabbix_server_mysql
+    exec=zabbix_server_mysql
 elif [ -x /usr/sbin/zabbix_server_pgsql ]; then
-    ZABBIX=zabbix_server_pgsql
+    exec=zabbix_server_pgsql
 elif [ -x /usr/sbin/zabbix_server_sqlite3 ]; then
-    ZABBIX=zabbix_server_sqlite3
+    exec=zabbix_server_sqlite3
 else
     exit 5
 fi
+prog=${exec##*/}
+lockfile=/var/lock/subsys/zabbix
 
-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
-
-[ -e $CONF ] || exit 6
-
-RETVAL=0
+start()
+{
+    echo -n $"Starting ZABBIX server: "
+    daemon $exec
+    rv=$?
+    echo
+    [ $rv -eq 0 ] && touch $lockfile
+    return $rv
+}
+
+stop()
+{
+    echo -n $"Shutting down ZABBIX server: "
+    killproc $prog
+    rv=$?
+    echo
+    [ $rv -eq 0 ] && rm -f $lockfile
+    return $rv
+}
+
+restart()
+{
+    stop
+    start
+}
 
 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
-        RETVAL=$?
-        echo
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix
+    start|stop|restart)
+        $1
         ;;
-    restart|reload)
-        $0 stop
-        $0 start
-        RETVAL=$?
+    force-reload)
+        restart
         ;;
     status)
-        status $ZABBIX
-        RETVAL=$?
+        status $prog
+        ;;
+    try-restart|condrestart)
+        if status $prog >/dev/null ; then
+            restart
+        fi
+        ;;
+    reload)
+        action $"Service ${0##*/} does not support the reload action: " /bin/false
+        exit 3
         ;;
     *)
-	echo "Usage: $0 {start|stop|restart|reload|status}"
-	exit 1
+	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
+	exit 2
 	;;
 esac
 
-exit $RETVAL
-


Index: zabbix.spec
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/F-10/zabbix.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- zabbix.spec	16 Jan 2009 15:28:50 -0000	1.30
+++ zabbix.spec	18 May 2009 12:33:04 -0000	1.31
@@ -1,10 +1,10 @@
 Name:           zabbix
-Version:        1.6.2
-Release:        1%{?dist}
+Version:        1.6.4
+Release:        3%{?dist}
 Summary:        Open-source monitoring solution for your IT infrastructure
 
 Group:          Applications/Internet
-License:        GPL
+License:        GPLv2+
 URL:            http://www.zabbix.com/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Source1:        zabbix-web.conf
@@ -12,8 +12,8 @@ Source2:        zabbix-server.init
 Source3:        zabbix-agent.init
 Source4:        zabbix-proxy.init
 Source5:        zabbix-logrotate.in
-
-Patch0:         zabbix-1.6.2-cpustats.patch
+# local rules for config files
+Patch0:         zabbix-1.6.4-web-config.patch
 
 Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -26,6 +26,7 @@ BuildRequires:   iksemel-devel
 BuildRequires:   curl-devel
 BuildRequires:   sqlite-devel
 BuildRequires:   unixODBC-devel
+BuildRequires:   OpenIPMI-devel
 
 Requires:        logrotate
 Requires(pre):   /usr/sbin/useradd
@@ -50,13 +51,23 @@ role in monitoring IT infrastructure. Th
 for small organisations with a few servers and for large
 companies with a multitude of servers.
 
+%package docs
+Summary:         Zabbix documentation
+Group:           Documentation
+%if 0%{?fedora} > 9
+BuildArch:       noarch
+%endif
+
+%description docs
+Zabbix Reference Manual in PDF.
+
 %package server
 Summary:         Zabbix server common files
 Group:           Applications/Internet
-Requires:	 zabbix = %{version}-%{release}
+Requires:        zabbix = %{version}-%{release}
 Requires:        zabbix-server-implementation = %{version}-%{release}
 Requires:        fping
-Requires:	 net-snmp
+Requires:        net-snmp
 Requires(post):  /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
@@ -68,7 +79,7 @@ Zabbix server common files
 Summary:         Zabbix server compiled to use MySQL
 Group:           Applications/Internet
 Requires:        zabbix = %{version}-%{release}
-Requires:	 zabbix-server = %{version}-%{release}
+Requires:        zabbix-server = %{version}-%{release}
 Provides:        zabbix-server-implementation = %{version}-%{release}
 Obsoletes:       zabbix <= 1.5.3-0.1
 Conflicts:       zabbix-server-pgsql
@@ -81,7 +92,7 @@ Zabbix server compiled to use MySQL
 Summary:         Zabbix server compiled to use PostgresSQL
 Group:           Applications/Internet
 Requires:        zabbix = %{version}-%{release}
-Requires:	 zabbix-server = %{version}-%{release}
+Requires:        zabbix-server = %{version}-%{release}
 Provides:        zabbix-server-implementation = %{version}-%{release}
 Conflicts:       zabbix-server-mysql
 Conflicts:       zabbix-server-sqlite3
@@ -93,10 +104,10 @@ Zabbix server compiled to use PostgresSQ
 Summary:         Zabbix server compiled to use SQLite
 Group:           Applications/Internet
 Requires:        zabbix = %{version}-%{release}
-Requires:	 zabbix-server = %{version}-%{release}
+Requires:        zabbix-server = %{version}-%{release}
 Provides:        zabbix-server-implementation = %{version}-%{release}
 Conflicts:       zabbix-server-mysql
-Conflicts:	 zabbix-server-pgsql
+Conflicts:       zabbix-server-pgsql
 
 %description server-sqlite3
 Zabbix server compiled to use SQLite
@@ -104,7 +115,7 @@ Zabbix server compiled to use SQLite
 %package agent
 Summary:         Zabbix Agent
 Group:           Applications/Internet
-Requires:	 zabbix = %{version}-%{release}
+Requires:        zabbix = %{version}-%{release}
 Requires(post):  /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
@@ -115,7 +126,7 @@ The Zabbix client agent, to be installed
 %package proxy
 Summary:         Zabbix Proxy
 Group:           Applications/Internet
-Requires:	 zabbix = %{version}-%{release}
+Requires:        zabbix = %{version}-%{release}
 Requires:        zabbix-proxy-implementation = %{version}-%{release}
 Requires(post):  /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
@@ -128,7 +139,7 @@ The Zabbix proxy
 %package proxy-mysql
 Summary:         Zabbix proxy compiled to use MySQL
 Group:           Applications/Internet
-Requires:	 zabbix-proxy = %{version}-%{release}
+Requires:        zabbix-proxy = %{version}-%{release}
 Provides:        zabbix-proxy-implementation = %{version}-%{release}
 
 %description proxy-mysql
@@ -137,7 +148,7 @@ The Zabbix proxy compiled to use MySQL
 %package proxy-pgsql
 Summary:         Zabbix proxy compiled to use PostgreSQL
 Group:           Applications/Internet
-Requires:	 zabbix-proxy = %{version}-%{release}
+Requires:        zabbix-proxy = %{version}-%{release}
 Provides:        zabbix-proxy-implementation = %{version}-%{release}
 
 %description proxy-pgsql
@@ -146,7 +157,7 @@ The Zabbix proxy compiled to use Postgre
 %package proxy-sqlite3
 Summary:         Zabbix proxy compiled to use SQLite
 Group:           Applications/Internet
-Requires:	 zabbix-proxy = %{version}-%{release}
+Requires:        zabbix-proxy = %{version}-%{release}
 Provides:        zabbix-proxy-implementation = %{version}-%{release}
 
 %description proxy-sqlite3
@@ -155,11 +166,14 @@ The Zabbix proxy compiled to use SQLite
 %package web
 Summary:         Zabbix Web Frontend
 Group:           Applications/Internet
+%if 0%{?fedora} > 9
+BuildArch:       noarch
+%endif
 Requires:        php
-Requires:	 php-gd
-Requires:	 php-bcmath
+Requires:        php-gd
+Requires:        php-bcmath
 Requires:        zabbix = %{version}-%{release}
-Requires:	 zabbix-web-database = %{version}-%{release}
+Requires:        zabbix-web-database = %{version}-%{release}
 
 %description web
 The php frontend to display the zabbix web interface.
@@ -167,10 +181,15 @@ The php frontend to display the zabbix w
 %package web-mysql
 Summary:         Zabbix web frontend for MySQL
 Group:           Applications/Internet
-Requires:	 zabbix-web = %{version}-%{release}
-Requires:	 php-mysql
-Provides:	 zabbix-web-database = %{version}-%{release}
-Obsoletes:	 zabbix-web <= 1.5.3-0.1
+%if 0%{?fedora} > 9
+BuildArch:       noarch
+%endif
+Requires:        zabbix-web = %{version}-%{release}
+Requires:        php-mysql
+Provides:        zabbix-web-database = %{version}-%{release}
+Conflicts:       zabbix-web-pgsql
+Conflicts:       zabbix-web-sqlite3
+Obsoletes:       zabbix-web <= 1.5.3-0.1
 
 %description web-mysql
 Zabbix web frontend for MySQL
@@ -178,9 +197,14 @@ Zabbix web frontend for MySQL
 %package web-pgsql
 Summary:         Zabbix web frontend for PostgreSQL
 Group:           Applications/Internet
-Requires:	 zabbix-web = %{version}-%{release}
-Requires:	 php-pgsql
-Provides:	 zabbix-web-database = %{version}-%{release}
+%if 0%{?fedora} > 9
+BuildArch:       noarch
+%endif
+Requires:        zabbix-web = %{version}-%{release}
+Requires:        php-pgsql
+Provides:        zabbix-web-database = %{version}-%{release}
+Conflicts:       zabbix-web-mysql
+Conflicts:       zabbix-web-sqlite3
 
 %description web-pgsql
 Zabbix web frontend for PostgreSQL
@@ -188,72 +212,62 @@ Zabbix web frontend for PostgreSQL
 %package web-sqlite3
 Summary:         Zabbix web frontend for SQLite
 Group:           Applications/Internet
-Requires:	 zabbix-web = %{version}-%{release}
-Provides:	 zabbix-web-database = %{version}-%{release}
+%if 0%{?fedora} > 9
+BuildArch:       noarch
+%endif
+Requires:        zabbix-web = %{version}-%{release}
+# Need to use the same db file as the server
+Requires:        zabbix-server-sqlite3 = %{version}-%{release}
+Provides:        zabbix-web-database = %{version}-%{release}
+Conflicts:       zabbix-web-mysql
+Conflicts:       zabbix-web-pgsql
 
 %description web-sqlite3
 Zabbix web frontend for SQLite
 
 %prep
 %setup0 -q
-%patch0 -p1 -b .cpustats
+%patch0 -p1
 
 chmod -R a+rX .
 
 # nuke erronious executable permissions
-#chmod -x src/zabbix_agent/eventlog.c
+chmod -x src/zabbix_agent/eventlog.c
 
 # fix up some lib64 issues
 %{__perl} -pi.orig -e 's|_LIBDIR=/usr/lib|_LIBDIR=%{_libdir}|g' \
     configure
 
+# kill off .htaccess files, options set in SOURCE1
+rm -f frontends/php/include/.htaccess
+rm -f frontends/php/include/classes/.htaccess
+
+
 %build
 
-%configure \
-    --enable-server \
-    --enable-agent \
-    --enable-proxy \
-    --enable-ipv6 \
-    --with-mysql \
-    --with-net-snmp \
-    --with-ldap \
-    --with-libcurl \
-    --with-jabber \
-    --with-unixodbc
+common_flags="
+    --enable-server
+    --enable-agent
+    --enable-proxy
+    --enable-ipv6
+    --with-net-snmp
+    --with-openipmi
+    --with-ldap
+    --with-libcurl
+    --with-jabber
+    --with-unixodbc"
 
+%configure $common_flags --with-mysql
 make %{?_smp_mflags}
-
 mv src/zabbix_server/zabbix_server src/zabbix_server/zabbix_server_mysql
 mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_mysql
 
-%configure \
-    --enable-server \
-    --enable-agent \
-    --enable-proxy \
-    --enable-ipv6 \
-    --with-pgsql \
-    --with-net-snmp \
-    --with-ldap \
-    --with-libcurl \
-    --with-jabber \
-    --with-unixodbc
-
+%configure $common_flags --with-pgsql
 make %{?_smp_mflags}
 mv src/zabbix_server/zabbix_server src/zabbix_server/zabbix_server_pgsql
 mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_pgsql
 
-%configure \
-    --enable-server \
-    --enable-agent \
-    --enable-proxy \
-    --enable-ipv6 \
-    --with-sqlite3 \
-    --with-net-snmp \
-    --with-ldap \
-    --with-libcurl \
-    --with-jabber \
-    --with-unixodbc
-
+%configure $common_flags --with-sqlite3
 make %{?_smp_mflags}
 mv src/zabbix_server/zabbix_server src/zabbix_server/zabbix_server_sqlite3
 mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_sqlite3
@@ -261,10 +275,13 @@ mv src/zabbix_proxy/zabbix_proxy src/zab
 touch src/zabbix_server/zabbix_server
 touch src/zabbix_proxy/zabbix_proxy
 
+
 %install
 rm -rf $RPM_BUILD_ROOT
+
 # set up some required directories
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/web
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
@@ -272,35 +289,23 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
 
-#rm create/Makefile*
-#rm create/data/images_oracle.sql
-#rm create/schema/oracle.sql
-#rm -r upgrades/dbpatches/1.6/oracle
-
-#pushd %{name}-%{version}-mysql
-# php frontend
+# install the frontend
 cp -a frontends/php $RPM_BUILD_ROOT%{_datadir}/%{name}
-mv $RPM_BUILD_ROOT%{_datadir}/%{name}/include/db.inc.php \
-    $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
-ln -s ../../../..%{_sysconfdir}/%{name}/db.inc.php \
-    $RPM_BUILD_ROOT%{_datadir}/%{name}/include/db.inc.php
-cat << __EOF__ >> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/zabbix.conf.php
-# This file is a place-holder. When you run through the zabbix
-# web setup, a proper configuration file should be generated
-# for you to drop in this location.
-__EOF__
-ln -s ../../../..%{_sysconfdir}/%{name}/zabbix.conf.php \
-    $RPM_BUILD_ROOT%{_datadir}/%{name}/conf/zabbix.conf.php
-# kill off .htaccess files, options set in SOURCE1
-rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/include/.htaccess
-rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/include/classes/.htaccess
+
+# prepare ghosted config file
+touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/web/zabbix.conf.php
+
 # drop config files in place
 install -m 0644 -p misc/conf/zabbix_agent.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
+
+# fix config file options
 cat misc/conf/zabbix_agentd.conf | sed \
     -e 's|PidFile=.*|PidFile=%{_localstatedir}/run/zabbix/zabbix_agentd.pid|g' \
     -e 's|LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_agentd.log|g' \
     -e 's|#LogFileSize=.*|LogFileSize=0|g' \
     > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/zabbix_agentd.conf
+
 cat misc/conf/zabbix_server.conf | sed \
     -e 's|PidFile=.*|PidFile=%{_localstatedir}/run/zabbix/zabbix.pid|g' \
     -e 's|LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_server.log|g' \
@@ -309,6 +314,7 @@ cat misc/conf/zabbix_server.conf | sed \
     -e 's|DBUser=root|DBUser=zabbix|g' \
     -e 's|DBSocket=/tmp/mysql.sock|DBSocket=%{_localstatedir}/lib/mysql/mysql.sock|g' \
     > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/zabbix_server.conf
+
 cat misc/conf/zabbix_proxy.conf | sed \
     -e 's|PidFile=.*|PidFile=%{_localstatedir}/run/zabbix/zabbix_proxy.pid|g' \
     -e 's|LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_proxy.log|g' \
@@ -317,21 +323,20 @@ cat misc/conf/zabbix_proxy.conf | sed \
     -e 's|DBUser=root|DBUser=zabbix|g' \
     -e 's|DBSocket=/tmp/mysql.sock|DBSocket=%{_localstatedir}/lib/mysql/mysql.sock|g' \
     > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/zabbix_proxy.conf
-install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
-# log rotation
+
+# install log rotation
 cat %{SOURCE5} | sed -e 's|COMPONENT|server|g' > \
      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server
 cat %{SOURCE5} | sed -e 's|COMPONENT|agentd|g' > \
      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent
 cat %{SOURCE5} | sed -e 's|COMPONENT|proxy|g' > \
      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy
+
 # init scripts
 install -m 0755 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/zabbix-server
 install -m 0755 -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/zabbix-agent
 install -m 0755 -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/zabbix-proxy
 
-# set up config dir
-
 # install
 make DESTDIR=$RPM_BUILD_ROOT install
 rm $RPM_BUILD_ROOT%{_sbindir}/zabbix_server
@@ -341,79 +346,151 @@ install -m 0755 -p src/zabbix_proxy/zabb
 
 # nuke static libs and empty oracle upgrade sql
 rm -rf $RPM_BUILD_ROOT%{_libdir}/libzbx*.a
-# nuke extraneous sql files
+
+# copy sql files to appropriate per package locations
+docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-server-mysql-%{version}
+install -dm 755 $docdir
+cp -p --parents create/schema/mysql.sql $docdir
+cp -p --parents create/data/data.sql $docdir
+cp -p --parents create/data/images_mysql.sql $docdir
+cp -pR --parents upgrades/dbpatches/1.6/mysql $docdir
+docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-server-pgsql-%{version}
+install -dm 755 $docdir
+cp -p --parents create/schema/postgresql.sql $docdir
+cp -p --parents create/data/data.sql $docdir
+cp -p --parents create/data/images_pgsql.sql $docdir
+cp -pR --parents upgrades/dbpatches/1.6/postgresql $docdir
+docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-server-sqlite3-%{version}
+install -dm 755 $docdir
+cp -p --parents create/schema/sqlite.sql $docdir
+cp -p --parents create/data/data.sql $docdir
+cp -p --parents create/data/images_sqlite3.sql $docdir
+# remove extraneous ones
 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/create
 
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
 %pre
-# Add the "zabbix" user
-/usr/sbin/useradd -c "Zabbix Monitoring System" \
-        -s /sbin/nologin -r -d %{_localstatedir}/lib/%{name} zabbix 2> /dev/null || :
+getent passwd zabbix > /dev/null || \
+    /usr/sbin/useradd -c "Zabbix Monitoring System" \
+    -s /sbin/nologin -r -d %{_localstatedir}/lib/%{name} zabbix || :
 
 %post server
 /sbin/chkconfig --add zabbix-server
+if [ $1 -gt 1 ]
+then
+  # Apply permissions also in *.rpmnew upgrades from old permissive ones
+  chmod 0640 %{_sysconfdir}/zabbix/zabbix_server.conf
+  chown root:zabbix %{_sysconfdir}/zabbix/zabbix_server.conf
+fi
+:
 
 %post agent
-/sbin/chkconfig --add zabbix-agent
+/sbin/chkconfig --add zabbix-agent || :
 
 %post proxy
 /sbin/chkconfig --add zabbix-proxy
+if [ $1 -gt 1 ]
+then
+  # Apply permissions also in *.rpmnew upgrades from old permissive ones
+  chmod 0640 %{_sysconfdir}/zabbix/zabbix_proxy.conf
+  chown root:zabbix %{_sysconfdir}/zabbix/zabbix_proxy.conf
+fi
+:
 
 %preun server
 if [ "$1" = 0 ]
 then
-  /sbin/service zabbix-server stop >/dev/null 2>&1 || :
+  /sbin/service zabbix-server stop >/dev/null 2>&1
   /sbin/chkconfig --del zabbix-server
 fi
+:
 
 %preun agent
 if [ "$1" = 0 ]
 then
-  /sbin/service zabbix-agent stop >/dev/null 2>&1 || :
+  /sbin/service zabbix-agent stop >/dev/null 2>&1
   /sbin/chkconfig --del zabbix-agent
 fi
+:
 
 %preun proxy
 if [ "$1" = 0 ]
 then
-  /sbin/service zabbix-proxy stop >/dev/null 2>&1 || :
+  /sbin/service zabbix-proxy stop >/dev/null 2>&1
   /sbin/chkconfig --del zabbix-proxy
 fi
+:
+
+%postun server
+if [ $1 -ge 1 ]
+then
+  /sbin/service zabbix-server try-restart >/dev/null 2>&1 || :
+fi
+
+%postun proxy
+if [ $1 -ge 1 ]
+then
+  /sbin/service zabbix-proxy try-restart >/dev/null 2>&1 || :
+fi
+
+%postun agent
+if [ $1 -ge 1 ]
+then
+  /sbin/service zabbix-agent try-restart >/dev/null 2>&1 || :
+fi
+
+
+%post web
+# move existing config file on update
+if [ "$1" -ge "1" ]
+then
+    if [ -f %{_sysconfdir}/zabbix/zabbix.conf.php ]
+    then
+        mv %{_sysconfdir}/zabbix/zabbix.conf.php %{_sysconfdir}/zabbix/web
+        chown apache:apache %{_sysconfdir}/zabbix/web/zabbix.conf.php
+    fi
+fi
+:
+
 
 %files
 %defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %dir %{_sysconfdir}/zabbix
 %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix
 %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix
 
+%files docs
+%defattr(-,root,root,-)
+%doc docs/*.pdf
+
 %files server
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
-%doc docs/*.pdf upgrades/dbpatches create/data create/schema
-%config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf
+%attr(0640,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-server
 %{_sysconfdir}/init.d/zabbix-server
 
 %files server-mysql
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %defattr(-,root,root,-)
+%{_docdir}/%{name}-server-mysql-%{version}/
 %{_sbindir}/zabbix_server_mysql
 
 %files server-pgsql
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %defattr(-,root,root,-)
+%{_docdir}/%{name}-server-pgsql-%{version}/
 %{_sbindir}/zabbix_server_pgsql
 
 %files server-sqlite3
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %defattr(-,root,root,-)
+%{_docdir}/%{name}-server-sqlite3-%{version}/
 %{_sbindir}/zabbix_server_sqlite3
 
 %files agent
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent.conf
 %config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-agent
@@ -425,31 +502,26 @@ fi
 
 %files proxy
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
-%config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf
+%attr(0640,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-proxy
 %{_sysconfdir}/init.d/zabbix-proxy
 
 %files proxy-mysql
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %{_sbindir}/zabbix_proxy_mysql
 
 %files proxy-pgsql
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %{_sbindir}/zabbix_proxy_pgsql
 
 %files proxy-sqlite3
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
 %{_sbindir}/zabbix_proxy_sqlite3
 
 %files web
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING FAQ NEWS README
-%config(noreplace) %{_sysconfdir}/zabbix/zabbix.conf.php
-%config(noreplace) %{_sysconfdir}/zabbix/db.inc.php
+%dir %attr(0750,apache,apache) %{_sysconfdir}/zabbix/web
+%ghost %attr(0644,apache,apache) %config(noreplace) %{_sysconfdir}/zabbix/web/zabbix.conf.php
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/zabbix.conf
 %{_datadir}/zabbix
 
@@ -462,7 +534,45 @@ fi
 %files web-sqlite3
 %defattr(-,root,root,-)
 
+
 %changelog
+* Fri Apr 17 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.6.4-3
+- Tighten configuration file permissions.
+- Ensure zero exit status from scriptlets.
+- Improve init script LSB compliance.
+- Restart running services on package upgrades.
+
+* Thu Apr  9 2009 Dan Horák <dan[at]danny.cz> - 1.6.4-2
+- make the -docs subpackage noarch
+
+* Thu Apr  9 2009 Dan Horák <dan[at]danny.cz> - 1.6.4-1
+- update to 1.6.4
+- remove the cpustat patch, it was integreated into upstream
+- use noarch subpackage for the web interface
+- database specific web subpackages conflicts with each other
+- use common set of option for the configure macro
+- enable IPMI support
+- sqlite web subpackage must depend on local sqlite
+- reorganize the docs and the sql scripts
+- change how the web interface config file is created
+- updated scriptlet for adding the zabbix user
+- move the documentation in PDF to -docs subpackage
+- most of the changes were submitted by Ville Skyttä in #494706 
+- Resolves: #489673, #493234, #494706
+
+* Mon Mar  9 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-5
+- Update pre patch due to incomplete fix for security problems.
+
+* Wed Mar  4 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-4
+- Update to a SVN snapshot of the upstream 1.6 branch to fix security
+  issue (BZ#488501)
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Fri Jan 23 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-2
+- Rebuild for MySQL 5.1.X
+
 * Fri Jan 16 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-1
 - Update to 1.6.2: http://www.zabbix.com/rn1.6.2.php
 


--- zabbix-1.6.2-cpustats.patch DELETED ---




More information about the fedora-extras-commits mailing list