[packages/bacula-web] updated to 5.2.11

glen glen at pld-linux.org
Thu Jan 24 19:02:30 CET 2013


commit 97184a12ead820c1405fdcd8c68b6a3d555036cc
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jan 24 20:02:16 2013 +0200

    updated to 5.2.11

 apache.conf     |   7 +---
 bacula-web.spec |  64 +++++++++++++++++++++---------------
 sys-libs.patch  | 100 +++++++++++++++++++++++++++++++++++++-------------------
 3 files changed, 105 insertions(+), 66 deletions(-)
---
diff --git a/bacula-web.spec b/bacula-web.spec
index 8222731..4a3af2f 100644
--- a/bacula-web.spec
+++ b/bacula-web.spec
@@ -1,18 +1,20 @@
-%define		php_min_version 5.2.4
+# TODO
+# - lighttpd support
+%define		php_min_version 5.3.4
 %include	/usr/lib/rpm/macros.php
 Summary:	Open source monitoring and reporting tool for Bacula
 Name:		bacula-web
-Version:	5.2.2
-Release:	6
+Version:	5.2.11
+Release:	1
 License:	GPL v2
 Group:		Applications/WWW
 URL:		http://www.bacula-web.org/
-Source0:	http://www.bacula-web.org/tl_files/downloads/%{name}.%{version}.tar.gz
-# Source0-md5:	b52253963cc6edb6437a0dbe59c6051f
+Source0:	http://www.bacula-web.org/tl_files/downloads/%{name}-%{version}.tar.gz
+# Source0-md5:	4826b11bc351491a18edc07650c85f73
 Source1:	apache.conf
 Patch0:		sys-libs.patch
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
-BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	rpmbuild(macros) >= 1.654
 BuildRequires:	sed >= 4.0
 Requires:	Smarty
 Requires:	Smarty-plugin-gettext
@@ -20,8 +22,14 @@ Requires:	php(core) >= %{php_min_version}
 Requires:	php(gd)
 Requires:	php(gettext)
 Requires:	php(pdo)
+Requires:	php(pdo)
+Requires:	php(session)
 Requires:	phplot
 Requires:	webserver(php)
+# Any of the db drivers needed depending where you hold your Bacula DB
+Suggests:	php-pdo-mysql
+Suggests:	php-pdo-pgsql
+Suggests:	php-pdo-sqlite
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -46,21 +54,22 @@ information from your bacula catalog's database.
 %setup -qc
 %patch0 -p1
 
+mv application/config .
 mv config/config.php{.sample,}
-%{__rm} locale/*/LC_MESSAGES/*.po
+%{__rm} application/locale/*/LC_MESSAGES/*.po
+%{__rm} -r application/view/cache
 mv core/external .
+mv docs/* .
 
-%{__rm} -r templates_c
+# you'll need this if you cp -a complete dir in source
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
-cp -a *.php core locale style templates $RPM_BUILD_ROOT%{_appdir}
-
+cp -a *.php application core $RPM_BUILD_ROOT%{_appdir}
 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
-ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
-
-ln -s %{cachedir} $RPM_BUILD_ROOT%{_appdir}/templates_c
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
@@ -91,27 +100,24 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc INSTALL README
+%doc INSTALL README Changelog
 %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}/config.php
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/global.inc.php
 
 %dir %{_appdir}
 %{_appdir}/backupjob-report.php
 %{_appdir}/client-report.php
 %{_appdir}/index.php
+%{_appdir}/joblogs.php
 %{_appdir}/jobs.php
 %{_appdir}/pools.php
 %{_appdir}/test.php
-%{_appdir}/config
-%{_appdir}/style
-%{_appdir}/templates
-%{_appdir}/templates_c
 
 %dir %{_appdir}/core
 %{_appdir}/core/bweb.inc.php
+%{_appdir}/core/global.inc.php
 %{_appdir}/core/app
 %{_appdir}/core/cfg
 %{_appdir}/core/db
@@ -119,12 +125,18 @@ fi
 %{_appdir}/core/i18n
 %{_appdir}/core/utils
 
-%dir %{_appdir}/locale
-%lang(de) %{_appdir}/locale/de_DE
-%lang(en) %{_appdir}/locale/en_EN
-%lang(es) %{_appdir}/locale/es_ES
-%lang(fr) %{_appdir}/locale/fr_FR
-%lang(it) %{_appdir}/locale/it_IT
-%lang(sv) %{_appdir}/locale/sv_SV
+%dir %{_appdir}/application
+%{_appdir}/application/libs
+%{_appdir}/application/models
+%{_appdir}/application/view
+
+%dir %{_appdir}/application/locale
+%lang(de) %{_appdir}/application/locale/de_DE
+%lang(en) %{_appdir}/application/locale/en_EN
+%lang(es) %{_appdir}/application/locale/es_ES
+%lang(fr) %{_appdir}/application/locale/fr_FR
+%lang(it) %{_appdir}/application/locale/it_IT
+%lang(pt_BR) %{_appdir}/application/locale/pt_BR
+%lang(sv) %{_appdir}/application/locale/sv_SV
 
 %dir %attr(775,root,http) %{cachedir}
diff --git a/apache.conf b/apache.conf
index 21d9a78..2c36f4f 100644
--- a/apache.conf
+++ b/apache.conf
@@ -1,4 +1,4 @@
-Alias /bacula-web/templates_c/ /var/cache/bacula-web/
+Alias /bacula-web/cache/ /var/cache/bacula-web/
 Alias /bacula-web /usr/share/bacula-web
 <Directory /usr/share/bacula-web>
 	allow from all
@@ -10,8 +10,3 @@ Alias /bacula-web /usr/share/bacula-web
 		allow from all
 	</Files>
 </Directory>
-
-<Directory /usr/share/bacula-web/config>
-	order deny,allow
-	deny from all
-</Directory>
diff --git a/sys-libs.patch b/sys-libs.patch
index d6a946b..ff9c586 100644
--- a/sys-libs.patch
+++ b/sys-libs.patch
@@ -1,35 +1,67 @@
---- bacula-web-5.2.2/config/global.inc.php~	2011-12-04 15:14:21.000000000 +0200
-+++ bacula-web-5.2.2/config/global.inc.php	2012-04-07 14:43:17.230952000 +0300
-@@ -18,8 +18,8 @@
-  define( 'BW_OBJ', BW_ROOT . '/core/' ); 
-  define( 'BW_EXTERNAL', BW_OBJ . 'external' );
-  
-- define( 'BW_PHPLOT', BW_EXTERNAL . '/phplot/'  );					
-- define( 'BW_SMARTY', BW_EXTERNAL . '/smarty/libs/' );				
-+ define( 'BW_PHPLOT', '/usr/share/php/phplot/'  );					
-+ define( 'BW_SMARTY', '/usr/share/php/Smarty/' );				
-  define( 'BW_SMARTY_GETTEXT', BW_EXTERNAL . '/smarty_gettext-0.9/' );
-  
-  
-@@ -27,8 +27,7 @@
-  require_once BW_OBJ . "bweb.inc.php";
-  
-  // Template engine
-- require_once( BW_SMARTY . "Smarty.class.php");			
-- require_once( BW_SMARTY_GETTEXT . "smarty_gettext.php" );		
-+ require_once( "Smarty.class.php");			
-  
-  // Configuration 
-  require_once BW_OBJ . "cfg/config.class.php";
---- bacula-web-5.2.2/core/i18n/ctranslation.class.php~	2011-11-29 20:55:31.000000000 +0200
-+++ bacula-web-5.2.2/core/i18n/ctranslation.class.php	2013-01-24 19:22:23.942340613 +0200
-@@ -30,9 +30,6 @@
- 	}
- 
- 	function set_Language( &$template ) {
--		// Template engine block registration
--		$template->register_block('t','smarty_translate');
+--- bacula-web-5.2.11/core/global.inc.php	2013-01-24 19:43:27.543708741 +0200
++++ bacula-web-5.2.11/core/global.inc.php	2013-01-24 19:43:27.543708741 +0200
+@@ -20,12 +20,11 @@
+ define('BW_LIBS', BW_ROOT . '/application/libs/');
+ define('BW_EXTERNAL', BW_OBJ . 'external');
+ 
+-define('BW_PHPLOT', BW_EXTERNAL . '/phplot/');
+-define('BW_SMARTY', BW_EXTERNAL . '/smarty/libs/');
+-define('BW_SMARTY_GETTEXT', BW_EXTERNAL . '/smarty-gettext/');
++define('BW_PHPLOT', '/usr/share/php/phplot/');
++define('BW_SMARTY', '/usr/share/php/Smarty/');
+ 
+ // Configuration
+-define('CONFIG_DIR', BW_ROOT . "/application/config/");
++define('CONFIG_DIR', '/etc/webapps/bacula-web/');
+ define('CONFIG_FILE', CONFIG_DIR . "config.php");
+ 
+ // Main application
+@@ -33,7 +32,6 @@
+ 
+ // Template engine
+ require_once( BW_SMARTY . "Smarty.class.php");
+-require_once( BW_SMARTY_GETTEXT . "smarty_gettext.php" );
+ 
+ // Graph
+ require_once( BW_PHPLOT . "phplot.php");
+@@ -77,7 +75,8 @@
+ 
+ // Views
+ define('VIEW_DIR', BW_ROOT . "/application/view/");
+-define('VIEW_CACHE_DIR', "application/view/cache");
++define('VIEW_CACHE_DIR', '/var/cache/bacula-web');
++define('VIEW_CACHE_URL', 'cache');
+ 
+ // Locale
+ define('LOCALE_DIR', BW_ROOT . '/application/locale');
+--- bacula-web-5.2.11/core/i18n/ctranslation.class.php~	2012-08-11 13:14:04.000000000 +0300
++++ bacula-web-5.2.11/core/i18n/ctranslation.class.php	2013-01-24 19:38:38.147079534 +0200
+@@ -32,9 +32,6 @@
+     }
+ 
+     function set_Language(&$template) {
+-        // Template engine block registration
+-        $template->register_block('t', 'smarty_translate');
 -
- 		// Setting up language
- 		putenv("LANGUAGE=" . $this->language . '.' . $this->charset );
- 		putenv("LANG=" . $this->language . '.' . $this->charset );
+         // Setting up language
+         putenv("LANGUAGE=" . $this->language . '.' . $this->charset);
+         putenv("LANG=" . $this->language . '.' . $this->charset);
+--- bacula-web-5.2.11/core/graph/cgraph.class.php	2012-12-14 06:56:54.000000000 +0200
++++ bacula-web-5.2.11/core/graph/cgraph.class.php	2013-01-24 19:51:05.000000000 +0200
+@@ -31,6 +31,7 @@
+ 
+     function __construct($filename = "graph.png") {
+         $this->img_filename = VIEW_CACHE_DIR . '/' . $filename;
++        $this->img_fileurl = VIEW_CACHE_URL . '/' . $filename;
+     }
+ 
+     public function SetData($data_in, $graph_type) {
+@@ -51,7 +52,7 @@
+     }
+ 
+     private function get_Filepath() {
+-		return $this->img_filename;
++		return $this->img_fileurl;
+     }
+ 	
+     // ==================================================================================
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bacula-web.git/commitdiff/97184a12ead820c1405fdcd8c68b6a3d555036cc



More information about the pld-cvs-commit mailing list