[zabbix20/el6] To be rebased

Volker Fröhlich volter at fedoraproject.org
Wed Feb 12 11:01:35 UTC 2014


commit 1230a27d031e1163ef9e19d1b5bfcdb350c1d056
Author: Volker Fröhlich <volker27 at gmx.at>
Date:   Mon Feb 3 08:47:41 2014 +0100

    To be rebased

 zabbix-fedora.README |   17 ++++++++---------
 zabbix20.spec        |   42 +++++++++++++++---------------------------
 2 files changed, 23 insertions(+), 36 deletions(-)
---
diff --git a/zabbix-fedora.README b/zabbix-fedora.README
index 97d55dc..3a6f35e 100644
--- a/zabbix-fedora.README
+++ b/zabbix-fedora.README
@@ -9,10 +9,9 @@ server configuration files are changed accordingly from 2.0.8 on.
 
 ==Web configuration==
 
-Web configuration resides in /etc/zabbix/web. No need to copy or edit
-anything -- just do the configuration by accessing the frontend as soon as your
-httpd configuration allows.
-
+Web configuration resides in /etc/zabbix/web. The configuration file can be
+created manually or by walking through the frontend setup tool, as soon as your
+httpd configuration allows. The directory also contains maintenance.inc.php!
 
 ==Log files==
 
@@ -21,7 +20,7 @@ Log files are located in /var/log/zabbix.
 
 ==Where's my Flash watch?==
 
-It's not included in Fedora! Fedora's policy does not allow to include blobs.
+It's not included in Fedora! Fedora's policy does not allow to include blobs:
 https://support.zabbix.com/browse/ZBX-4794
 
 
@@ -154,13 +153,15 @@ echo "avc:  denied  { setpgid } for  pid=31880 comm="zabbix_server_p" scontext=s
 
 --------------------------------------------------------------------------------
 
-=Guide for updating to 2.0 from 1.8=
+=Guide for upgrading to 2.0 from 1.8=
 
 http://www.zabbix.com/documentation/2.0/manual/installation/upgrade==notes
 
 The below should be the relevant steps, picked from
 http://www.zabbix.com/documentation/2.0/manual/installation/upgrade
 
+- Review all rpmnew and rpmsave files; merge where necessary
+- Review permissions, ownerships and group memberships for zabbixsrv
 - Back up the Zabbix database (really!)
 - Remove custom database changes, if any
 - Make sure the database user has sufficing permissions
@@ -169,7 +170,5 @@ http://www.zabbix.com/documentation/2.0/manual/installation/upgrade
 - The scripts can run very long, depending on the content of your database and
   your hardware;
 - Check the output of the script for errors
-- Review all rpmnew and rpmsave files; merge where necessary
-- Review permissions, ownerships and group memberships for zabbixsrv
 
-Volker Fröhlich volker27 at gmx.at Aug 14 2013
+Volker Fröhlich volker27 at gmx.at Jan  3 2013
diff --git a/zabbix20.spec b/zabbix20.spec
index 2ad6365..145e4bf 100644
--- a/zabbix20.spec
+++ b/zabbix20.spec
@@ -5,7 +5,6 @@
 #   "Include" statement in config files needs patching in order to not load
 #   various backup files (*.rpm{orig,new,save}, *~ etc) in that dir.
 #   https://support.zabbix.com/browse/ZBXNEXT-497
-# * zabbixsrv could be member of the groups zabbixsrv and zabbix
 # * Consider using systemd's ReadWriteDirectories
 
 #TODO: systemctl reload seems to be necessary after switching with Alternatives
@@ -226,7 +225,7 @@ Summary:         Zabbix Web Frontend
 Group:           Applications/Internet
 BuildArch:       noarch
 # Don't remove "php". Everything else only depends on php-common
-# and you'll end up with no module for Apache
+# and you'll end up with no module for Apache!
 Requires:        php
 Requires:        php-gd
 Requires:        php-bcmath
@@ -301,30 +300,19 @@ sed -i 's|$(DESTDIR)@datadir@/zabbix|$(DESTDIR)/var/lib/zabbixsrv|' \
     src/zabbix_server/Makefile.in \
     src/zabbix_proxy/Makefile.in
 
-# All libraries are expected in /usr/lib or /usr/local/lib
-# https://support.zabbix.com/browse/ZBXNEXT-1296
-sed -i.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/api/.htaccess
 rm -f frontends/php/conf/.htaccess
 
 # Fix path to traceroute utility
-# Probably obsolete after EL 6
+# Still valid for EL7!
 find database -name 'data.sql' -exec sed -i 's|/usr/bin/traceroute|/bin/traceroute|' {} \;
 
-# Set timestamp on modified config file and directories
-touch -r frontends/php/css.css frontends/php/include/config.inc.php \
-    frontends/php/include/defines.inc.php \
-    frontends/php/include \
-    frontends/php/include/classes
-
 # Adapt configuration file options
 sed -i \
-    -e 's|# PidFile=.*|PidFile=%{_localstatedir}/run/%{srcname}/zabbix_agentd.pid|g' \
-    -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/%{srcname}/zabbix_agentd.log|g' \
+    -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' \
     -e 's|/usr/local||g' \
     conf/zabbix_agentd.conf
@@ -335,8 +323,8 @@ sed -i \
 
 #TODO: It'd be better to leave the defaults in a commment and just override them, as they are still hard-coded!
 sed -i \
-    -e 's|# PidFile=.*|PidFile=%{_localstatedir}/run/%{srcname}/zabbix_server.pid|g' \
-    -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/%{srcname}/zabbix_server.log|g' \
+    -e 's|# PidFile=.*|PidFile=%{_localstatedir}/run/zabbix/zabbix_server.pid|g' \
+    -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_server.log|g' \
     -e 's|# LogFileSize=.*|LogFileSize=0|g' \
     -e 's|# AlertScriptsPath=${datadir}/zabbix/|AlertScriptsPath=%{_sharedstatedir}/zabbixsrv/|g' \
     -e 's|^DBUser=root|DBUser=zabbix|g' \
@@ -347,8 +335,8 @@ sed -i \
     conf/zabbix_server.conf
 
 sed -i \
-    -e 's|# PidFile=.*|PidFile=%{_localstatedir}/run/%{srcname}/zabbix_proxy.pid|g' \
-    -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/%{srcname}/zabbix_proxy.log|g' \
+    -e 's|# PidFile=.*|PidFile=%{_localstatedir}/run/zabbix/zabbix_proxy.pid|g' \
+    -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_proxy.log|g' \
     -e 's|# LogFileSize=.*|LogFileSize=0|g' \
     -e 's|^DBUser=root|DBUser=zabbix|g' \
     -e 's|# DBSocket=/tmp/mysql.sock|DBSocket=%{_sharedstatedir}/mysql/mysql.sock|g' \
@@ -385,7 +373,7 @@ common_flags="
     --with-ssh2
 "
 
-# Frontend doesn't work for Sqlite, thus don't build server
+# Frontend doesn't work for SQLite, thus don't build server
 %configure $common_flags --with-sqlite3
 make %{?_smp_mflags}
 mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_sqlite3
@@ -411,8 +399,8 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{srcname}
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{srcname}/web
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{srcname}
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{srcname}
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/zabbix
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/zabbix
 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
 %if 0%{?rhel}
 mkdir -p $RPM_BUILD_ROOT%{_initrddir}
@@ -461,7 +449,7 @@ install -m 0644 -p %{SOURCE13} $RPM_BUILD_ROOT%{_unitdir}/zabbix-proxy-sqlite3.s
 install -m 0644 -p %{SOURCE14} $RPM_BUILD_ROOT%{_unitdir}/zabbix-server-mysql.service
 install -m 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_unitdir}/zabbix-server-pgsql.service
 %else
-# init scripts
+# Init scripts
 install -m 0755 -p %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/zabbix-agent
 install -m 0755 -p %{SOURCE4} $RPM_BUILD_ROOT%{_initrddir}/zabbix-proxy
 install -m 0755 -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/zabbix-server
@@ -471,7 +459,8 @@ install -m 0755 -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/zabbix-server
 touch $RPM_BUILD_ROOT%{_unitdir}/zabbix-server.service
 touch $RPM_BUILD_ROOT%{_unitdir}/zabbix-proxy.service
 
-# install compatibility links for config files
+# Install compatibility links for config files
+#TODO: Switch to .wants files instead!
 ln -sf %{_sysconfdir}/zabbix_agent.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{srcname}/zabbix_agent.conf
 ln -sf %{_sysconfdir}/zabbix_agentd.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{srcname}/zabbix_agentd.conf
 ln -sf %{_sysconfdir}/zabbix_server.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{srcname}/zabbix_server.conf
@@ -727,7 +716,6 @@ fi
 
 
 %files
-#TODO: Arrange get/sender plus agent config differently
 %doc AUTHORS ChangeLog COPYING NEWS README %{srcname}-fedora.README
 %dir %{_sysconfdir}/%{srcname}
 %config(noreplace) %{_sysconfdir}/zabbix_agentd.conf
@@ -746,7 +734,7 @@ fi
 %if 0%{?rhel}
 %attr(0775,root,zabbix) %dir %{_localstatedir}/run/zabbix
 %endif
-%attr(0400,zabbixsrv,zabbix) %config(noreplace) %{_sysconfdir}/zabbix_server.conf
+%attr(0600,zabbixsrv,zabbix) %config(noreplace) %{_sysconfdir}/zabbix_server.conf
 %config(noreplace) %{_sysconfdir}/%{srcname}/zabbix_server.conf
 %config(noreplace) %{_sysconfdir}/%{srcname}/externalscripts
 %config(noreplace) %{_sysconfdir}/%{srcname}/alertscripts


More information about the scm-commits mailing list