From 5e3bbf5dd8cba503af3a06c2a4fb8a927939d61b Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Fri, 6 Dec 2013 09:56:16 +0100 Subject: [PATCH] Version: 6.0.0 --- bacula-web.spec | 14 ++++--- sys-libs.patch | 100 +++++++++++++++++++++++------------------------- 2 files changed, 56 insertions(+), 58 deletions(-) diff --git a/bacula-web.spec b/bacula-web.spec index 7fe47f7..6cb5ee7 100644 --- a/bacula-web.spec +++ b/bacula-web.spec @@ -4,12 +4,12 @@ %include /usr/lib/rpm/macros.php Summary: Open source monitoring and reporting tool for Bacula Name: bacula-web -Version: 5.2.12 +Version: 6.0.0 Release: 4 License: GPL v2 Group: Applications/WWW -Source0: http://www.bacula-web.org/tl_files/downloads/%{name}-%{version}.tar.gz -# Source0-md5: 6d3d212a9d145f8d112ce15f5a40538d +Source0: http://www.bacula-web.org/download/articles/bacula-web-600.html?file=files/bacula-web.org/downloads/%{name}-%{version}.tgz +# Source0-md5: 3e99f9626cf4329ce43947f11a9d8f49 Source1: apache.conf Patch0: sys-libs.patch URL: http://www.bacula-web.org/ @@ -50,7 +50,7 @@ summarized view of your bacula's backup infrastructure. It obtain his information from your bacula catalog's database. %prep -%setup -qc +%setup -q %patch0 -p1 mv application/config . @@ -58,7 +58,7 @@ mv config/config.php{.sample,} %{__rm} application/locale/*/LC_MESSAGES/*.po %{__rm} -r application/view/cache mv core/external . -mv docs/* . +mv DOCS/* . # you'll need this if you cp -a complete dir in source # cleanup backups after patching @@ -115,7 +115,8 @@ fi %{_appdir}/test.php %dir %{_appdir}/core -%{_appdir}/core/bweb.inc.php +%{_appdir}/core/bweb.class.php +%{_appdir}/core/const.inc.php %{_appdir}/core/global.inc.php %{_appdir}/core/app %{_appdir}/core/db @@ -134,6 +135,7 @@ fi %lang(es) %{_appdir}/application/locale/es_ES %lang(fr) %{_appdir}/application/locale/fr_FR %lang(it) %{_appdir}/application/locale/it_IT +%lang(nl) %{_appdir}/application/locale/nl_NL %lang(pt_BR) %{_appdir}/application/locale/pt_BR %lang(sv) %{_appdir}/application/locale/sv_SV diff --git a/sys-libs.patch b/sys-libs.patch index ff9c586..6f00616 100644 --- a/sys-libs.patch +++ b/sys-libs.patch @@ -1,54 +1,36 @@ ---- 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); ---- 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 @@ +diff -dur bacula-web-6.0.0.orig/core/global.inc.php bacula-web-6.0.0/core/global.inc.php +--- bacula-web-6.0.0.orig/core/global.inc.php 2013-11-11 17:06:40.000000000 +0100 ++++ bacula-web-6.0.0/core/global.inc.php 2013-12-06 09:45:58.000000000 +0100 +@@ -31,20 +31,21 @@ + // Views path + define('BW_ROOT', getcwd()); + 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'); + + // Configuration +- define('CONFIG_DIR', BW_ROOT . "/application/config/"); ++ define('CONFIG_DIR', '/etc/webapps/bacula-web/'); + define('CONFIG_FILE', CONFIG_DIR . "config.php"); + + // Locales + define('LOCALE_DIR', BW_ROOT . '/application/locale'); + + // Smarty +- require_once(BW_ROOT . '/core/external/smarty-gettext/smarty-gettext.php'); ++ require_once('/usr/share/php/Smarty/Smarty.class.php'); + + // PHPLot +- require_once(BW_ROOT . '/core/external/phplot/phplot.php'); ++ require_once('/usr/share/php/phplot/phplot.php'); + + // Constants + require_once(BW_ROOT . '/core/const.inc.php'); +diff -dur bacula-web-6.0.0.orig/core/graph/cgraph.class.php bacula-web-6.0.0/core/graph/cgraph.class.php +--- bacula-web-6.0.0.orig/core/graph/cgraph.class.php 2013-11-11 17:06:40.000000000 +0100 ++++ bacula-web-6.0.0/core/graph/cgraph.class.php 2013-12-06 09:40:53.000000000 +0100 +@@ -32,6 +32,7 @@ function __construct($filename = "graph.png") { $this->img_filename = VIEW_CACHE_DIR . '/' . $filename; @@ -56,7 +38,7 @@ } public function SetData($data_in, $graph_type) { -@@ -51,7 +52,7 @@ +@@ -52,7 +53,7 @@ } private function get_Filepath() { @@ -65,3 +47,17 @@ } // ================================================================================== +Only in bacula-web-6.0.0/core/graph: cgraph.class.php.orig +diff -dur bacula-web-6.0.0.orig/core/i18n/ctranslation.class.php bacula-web-6.0.0/core/i18n/ctranslation.class.php +--- bacula-web-6.0.0.orig/core/i18n/ctranslation.class.php 2013-11-11 17:06:40.000000000 +0100 ++++ bacula-web-6.0.0/core/i18n/ctranslation.class.php 2013-12-06 09:40:53.000000000 +0100 +@@ -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); -- 2.44.0