diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-09-29 17:48:52 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-09-29 17:48:52 +0200 |
commit | ce129625274030609afb4c4d8d48cf10eb604c18 (patch) | |
tree | 42b2ac89df06725423ddb24290cc8bb70237ab7b | |
parent | 4450a3b9d83bf670684cd25b741877bafc642ea4 (diff) |
glpi: 0.84.2 (WIP)
-rw-r--r-- | glpi-0.83-cron.patch | 34 | ||||
-rw-r--r-- | glpi-0.84-cron.patch | 31 | ||||
-rw-r--r-- | glpi-0.84-zend.patch | 34 | ||||
-rw-r--r-- | glpi-config_path.php | 7 | ||||
-rw-r--r-- | glpi.spec | 59 |
5 files changed, 118 insertions, 47 deletions
diff --git a/glpi-0.83-cron.patch b/glpi-0.83-cron.patch deleted file mode 100644 index 25906e5..0000000 --- a/glpi-0.83-cron.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up install/install.php.orig install/install.php ---- install/install.php.orig 2012-01-24 12:22:16.000000000 +0100 -+++ install/install.php 2012-02-26 10:04:57.482199413 +0100 -@@ -351,6 +351,15 @@ function step4 ($host, $user, $password, - $query = "UPDATE `glpi_users` - SET `language` = NULL"; - $DB->query($query) or die("4203 ".$LANG['update'][90].$DB->error()); -+ -+ // RPM provides a good system cron -+ $query = "UPDATE `glpi_crontasks` SET `mode`=2 WHERE `name`!='watcher' AND (`allowmode` & 2)"; -+ $DB->query($query) -+ or die("RPM update of glpi_crontasks. " . $LANG['update'][90] . $DB->error()); -+ -+ $query = "UPDATE `glpi_configs` SET `cron_limit` = '3'"; -+ $DB->query($query) -+ or die("RPM update of glpi_configs. " . $LANG['update'][90] . $DB->error()); - } - - -diff -up install/update.php.orig install/update.php ---- install/update.php.orig 2012-02-09 21:19:30.000000000 +0100 -+++ install/update.php 2012-02-26 10:07:24.899206029 +0100 -@@ -770,6 +770,11 @@ function updateDbUpTo031() { - $plugin = new Plugin(); - $plugin->unactivateAll(); - -+ // RPM provides a good system cron -+ $query = "UPDATE `glpi_crontasks` SET `mode`=2 WHERE `name`!='watcher' AND (`allowmode` & 2)"; -+ $DB->query($query) -+ or die("RPM update of glpi_crontasks. " . $LANG['update'][90] . $DB->error()); -+ - DBmysql::optimize_tables($migration); - - return $ret; diff --git a/glpi-0.84-cron.patch b/glpi-0.84-cron.patch new file mode 100644 index 0000000..de3b6d7 --- /dev/null +++ b/glpi-0.84-cron.patch @@ -0,0 +1,31 @@ +diff -up install/install.php.orig install/install.php +--- install/install.php.orig 2013-09-29 17:04:16.326382959 +0200 ++++ install/install.php 2013-09-29 17:08:07.616396210 +0200 +@@ -350,6 +350,13 @@ function step4 ($databasename, $newdatab + $query = "UPDATE `glpi_users` + SET `language` = NULL"; + $DB->queryOrDie($query, "4203"); ++ ++ // RPM provides a good system cron ++ $query = "UPDATE `glpi_crontasks` SET `mode`=2 WHERE `name`!='watcher' AND (`allowmode` & 2)"; ++ $DB->queryOrDie($query, "4203"); ++ ++ $query = "UPDATE `glpi_configs` SET `cron_limit` = '3'"; ++ $DB->queryOrDie($query, "4203"); + } + + $link = new mysqli($host, $user, $password); +diff -up install/update.php.orig install/update.php +--- install/update.php.orig 2013-09-12 21:17:15.000000000 +0200 ++++ install/update.php 2013-09-29 17:07:53.124390070 +0200 +@@ -776,6 +776,10 @@ function updateDbUpTo031() { + $plugin = new Plugin(); + $plugin->unactivateAll(); + ++ // RPM provides a good system cron ++ $query = "UPDATE `glpi_crontasks` SET `mode`=2 WHERE `name`!='watcher' AND (`allowmode` & 2)"; ++ $DB->queryOrDie($query); ++ + DBmysql::optimize_tables($migration); + + return $ret; diff --git a/glpi-0.84-zend.patch b/glpi-0.84-zend.patch new file mode 100644 index 0000000..c79fb94 --- /dev/null +++ b/glpi-0.84-zend.patch @@ -0,0 +1,34 @@ +diff -up config/based_config.php.orig config/based_config.php +--- config/based_config.php.orig 2013-09-29 17:26:58.940921006 +0200 ++++ config/based_config.php 2013-09-29 17:27:03.507928854 +0200 +@@ -176,4 +176,12 @@ if (!defined('GLPI_HTMLAWED')) { + # if htmLawed available in system, use (in config_path.php) + # define('GLPI_HTMLAWED', '/usr/share/htmlawed/htmLawed.php'); + } ++ ++// Default patch to Zend Framework 2 ++if (!defined('GLPI_ZEND')) { ++ define('GLPI_ZEND', GLPI_ROOT.'/lib/Zend'); ++ ++ # if Zend Framework 2 available in system, use (in config_path.php) ++ # define('GLPI_ZEND', '/usr/share/php/Zend'); ++} + ?> +diff -up inc/autoload.function.php.orig inc/autoload.function.php +--- inc/autoload.function.php.orig 2013-09-12 21:17:15.000000000 +0200 ++++ inc/autoload.function.php 2013-09-29 17:22:33.420537657 +0200 +@@ -323,11 +323,9 @@ function glpi_autoload($classname) { + } + } + +-require_once (GLPI_ROOT . '/lib/Zend/Loader/ClassMapAutoloader.php'); +-$loader = new Zend\Loader\ClassMapAutoloader(); +-// Register the class map: +-$loader->registerAutoloadMap(GLPI_ROOT . '/lib/Zend/autoload_classmap.php'); +-// Register with spl_autoload: ++require_once (GLPI_ZEND . '/Loader/StandardAutoloader.php'); ++$option = array(Zend\Loader\StandardAutoloader::LOAD_NS => array('Zend' => GLPI_ZEND)); ++$loader = new Zend\Loader\StandardAutoloader($option); + $loader->register(); + + // SimplePie autoloader diff --git a/glpi-config_path.php b/glpi-config_path.php index 1027223..7e33abd 100644 --- a/glpi-config_path.php +++ b/glpi-config_path.php @@ -13,6 +13,11 @@ define('GLPI_SESSION_DIR', '/var/lib/glpi/files/_sessions'); define('GLPI_PLUGIN_DOC_DIR', '/var/lib/glpi/files/_plugins'); define('GLPI_LOCK_DIR', '/var/lib/glpi/files/_lock/'); define('GLPI_GRAPH_DIR', '/var/lib/glpi/files/_graphs/'); +define('GLPI_PICTURE_DIR', '/var/lib/glpi/files/_pictures/'); +define('GLPI_TMP_DIR', '/var/lib/glpi/files/_tmp/'); +define('GLPI_RSS_DIR', '/var/lib/glpi/files/_rss/'); +define('GLPI_UPLOAD_DIR', '/var/lib/glpi/files/_uploads/'); +//define('GLPI_SCRIPT_DIR', // Log define('GLPI_LOG_DIR', '/var/log/glpi'); @@ -23,6 +28,8 @@ define('GLPI_PHPMAILER_DIR', 'PHPMailer'); define('GLPI_EZC_BASE', 'ezc/Base/base.php'); define('GLPI_PHPCAS', 'CAS.php'); define('GLPI_HTMLAWED', 'htmLawed/htmLawed.php'); +define('GLPI_ZEND', '/usr/share/php/Zend'); +define("GLPI_SIMPLEPIE_PATH", '/usr/share/php/php-simplepie'); // Fonts define('GLPI_FONT_FREESANS', '/usr/share/fonts/gnu-free/FreeSans.ttf'); @@ -1,39 +1,64 @@ +# spec file for glpi +# +# Copyright (c) 2007-2013 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/3.0/ +# +# Please, preserve the changelog entries +# %global useselinux 1 Name: glpi -Version: 0.83.9.1 -Release: 4%{?dist} +Version: 0.84.2 +Release: 1%{?dist} Summary: Free IT asset management software Summary(fr): Gestion Libre de Parc Informatique Group: Applications/Internet License: GPLv2+ and GPLv3+ URL: http://www.glpi-project.org/ -Source0: https://forge.indepnet.net/attachments/download/1501/glpi-0.83.91.tar.gz +Source0: https://forge.indepnet.net/attachments/download/1593/glpi-0.84.2.tar.gz Source1: glpi-httpd.conf Source2: glpi-config_path.php Source3: glpi-logrotate # Switch all internal cron tasks to system -Patch0: glpi-0.83-cron.patch +Patch0: glpi-0.84-cron.patch +# For system Zend, waiting for upstream approval +Patch1: glpi-0.84-zend.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +BuildRequires: gettext Requires: httpd, mod_php -Requires: php-mysql +Requires: php(language) >= 5.3 +Requires: php-date Requires: php-gd -Requires: php-ldap +Requires: php-fileinfo Requires: php-imap +Requires: php-json +Requires: php-ldap Requires: php-mbstring +Requires: php-mysqli +Requires: php-pcre +Requires: php-session Requires: php-xml -Requires: php-json Requires: php-pear(Cache_Lite) >= 1.7.4 Requires: php-PHPMailer Requires: php-pear-CAS >= 1.2.0 Requires: php-htmLawed +Requires: php-simplepie +Requires: php-ZendFramework2-Cache +Requires: php-ZendFramework2-Cache-apc +Requires: php-ZendFramework2-I18n +Requires: php-ZendFramework2-Loader +Requires: php-ZendFramework2-ServiceManager +Requires: php-ZendFramework2-Stdlib +Requires: php-ZendFramework2-Version + %if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 Requires: php-pear(components.ez.no/Graph) >= 1.5 Requires: gnu-free-sans-fonts @@ -74,6 +99,8 @@ techniciens grâce à une maintenance plus cohérente. %setup -q -n glpi %patch0 -p0 +%patch1 -p0 + find . -name \*.orig -exec rm {} \; -print # Drop bundled Flash files @@ -84,14 +111,13 @@ rm -rf lib/cache_lite rm -rf lib/phpmailer rm -rf lib/phpcas rm -rf lib/htmlawed - -%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 +rm -rf lib/Zend +rm -rf lib/simplepie rm -rf lib/ezcomponents -cp %{SOURCE2} config/config_path.php -%else + +%if 0%{?fedora} < 9 && 0%{?rhel} < 6 # fix font path on old version sed -e '/GLPI_FONT_FREESANS/s/gnu-free/freefont/' \ - -e '/GLPI_EZC_BASE/d' \ %{SOURCE2} >config/config_path.php %endif @@ -114,7 +140,11 @@ EOF %build -# empty build +# Regenerate the locales +for po in locales/*.po +do + msgfmt $po -o $(dirname $po)/$(basename $po .po).mo +done %install @@ -244,6 +274,9 @@ fi %changelog +* Sun Sep 29 2013 Remi Collet <remi@fedoraproject.org> - 0.84.2-4 +- update to 0.84.2 + * Thu Sep 12 2013 Remi Collet <remi@fedoraproject.org> - 0.83.9.1-4 - restrict access for install to local for security |