packages: nagios-vshell/nagios-vshell.spec, nagios-vshell/config.patch (NEW...
glen
glen at pld-linux.org
Sat Jan 7 18:01:06 CET 2012
Author: glen Date: Sat Jan 7 17:01:06 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- add webserver interation, patch config
---- Files affected:
packages/nagios-vshell:
nagios-vshell.spec (1.1 -> 1.2) , config.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/nagios-vshell/nagios-vshell.spec
diff -u packages/nagios-vshell/nagios-vshell.spec:1.1 packages/nagios-vshell/nagios-vshell.spec:1.2
--- packages/nagios-vshell/nagios-vshell.spec:1.1 Sat Jan 7 17:54:07 2012
+++ packages/nagios-vshell/nagios-vshell.spec Sat Jan 7 18:01:00 2012
@@ -1,25 +1,29 @@
# $Revision$, $Date$
# TODO
# - gettext to system dir
-# - fixup config paths, like /etc/vshell.conf
%define pkg vshell
Summary: Nagios V-Shell
Name: nagios-%{pkg}
Version: 1.8
-Release: 0.2
+Release: 0.3
License: GPL v2
Group: Applications/WWW
Source0: http://assets.nagios.com/downloads/exchange/nagiosvshell/%{pkg}.tar.gz
# Source0-md5: 802a80daa263b441af1b729cb3e7fa35
+Patch0: config.patch
URL: http://exchange.nagios.org/directory/Addons/Frontends-(GUIs-and-CLIs)/Web-Interfaces/Nagios-V-2DShell/details
Requires: nagios-cgi
+Requires: webapps
+Requires: webserver(access)
+Requires: webserver(alias)
+Requires: webserver(php)
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _webapps /etc/webapps
%define _webapp nagios-%{pkg}
%define _sysconfdir %{_webapps}/%{_webapp}
-%define appdir %{_datadir}/nagios/%{pkg}
+%define _appdir %{_datadir}/%{_webapp}
%description
Nagios V-Shell is a PHP web interface to Nagios Core that is designed
@@ -30,20 +34,44 @@
# use versioned build dir
%setup -qc
mv %{pkg}/* .
+%patch0 -p1
+
+# we handle ourself the installation
+mv install.php{,.sample}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{appdir}}
-cp -p *.php $RPM_BUILD_ROOT%{appdir}
-cp -a config controllers css data js locale views $RPM_BUILD_ROOT%{appdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
+cp -p *.php $RPM_BUILD_ROOT%{_appdir}
+cp -a controllers css data js locale views $RPM_BUILD_ROOT%{_appdir}
+
+cp -p config/vshell.conf $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p config/vshell_apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
%files
%defattr(644,root,root,755)
%doc INSTALL.txt doc
-%{appdir}
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{pkg}.conf
+%{_appdir}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -51,5 +79,8 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2012/01/07 17:01:00 glen
+- add webserver interation, patch config
+
Revision 1.1 2012/01/07 16:54:07 glen
- new, just record it's existence
================================================================
Index: packages/nagios-vshell/config.patch
diff -u /dev/null packages/nagios-vshell/config.patch:1.1
--- /dev/null Sat Jan 7 18:01:06 2012
+++ packages/nagios-vshell/config.patch Sat Jan 7 18:01:00 2012
@@ -0,0 +1,34 @@
+--- nagios-vshell-1.8/config/vshell.conf~ 2011-08-12 00:46:53.000000000 +0300
++++ nagios-vshell-1.8/config/vshell.conf 2012-01-07 18:53:03.159606028 +0200
+@@ -18,16 +18,16 @@
+ COREURL = "nagios"
+
+ ; Full filesystem path to the Nagios status file
+-STATUSFILE = "/usr/local/nagios/var/status.dat"
++STATUSFILE = "/var/lib/nagios/status.dat"
+
+ ; Full filesystem path to the Nagios object cache file
+-OBJECTSFILE = "/usr/local/nagios/var/objects.cache"
++OBJECTSFILE = "/var/lib/nagios/objects.cache"
+
+ ; Full filesystem path to the Nagios CGI permissions configuration file
+-CGICFG = "/usr/local/nagios/etc/cgi.cfg"
++CGICFG = "/etc/webapps/nagios/cgi.cfg"
+
+ ; Full filesystem path to the Nagios command pipe
+-NAGCMD = "/usr/local/nagios/var/rw/nagios.cmd"
++NAGCMD = "/var/lib/nagios/rw/nagios.cmd"
+
+ ; Full filesystem path to the Nagios lock file (when Nagios is running)
+ NAGLOCK = "/usr/local/nagios/var/nagios.lock"
+--- nagios-vshell-1.8/constants.inc.php~ 2011-09-19 19:52:27.000000000 +0300
++++ nagios-vshell-1.8/constants.inc.php 2012-01-07 18:58:30.123327515 +0200
+@@ -66,7 +66,7 @@
+ // If necessary, adjust the path to vshell.conf, but nothing else below that
+ // All other setting should be adjusted by editing vshell.conf
+ // Switch to use external configuration file by Tony Yarusso, 30 March 2011
+-$ini_array = parse_ini_file("/etc/vshell.conf");
++$ini_array = parse_ini_file("/etc/webapps/nagios-vshell/vshell.conf");
+
+ define('VERSION', '1.8');
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-vshell/nagios-vshell.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list