[glpi/f14] update to 0.78.5

Remi Collet remi at fedoraproject.org
Sun Jul 24 07:16:23 UTC 2011


commit 042f3a9086b3eff2e0ef0d003f8acd0292deda60
Author: remi <fedora at famillecollet.com>
Date:   Sun Jul 24 09:15:57 2011 +0200

    update to 0.78.5

 .gitignore           |    3 +++
 glpi-config_path.php |   32 ++++++++++++++++++++------------
 glpi-cron.patch      |   24 ++++++++++++++++++++++++
 glpi-httpd.conf      |    6 +++---
 glpi.spec            |   48 ++++++++++++++++++++++++++++++++----------------
 mktar.sh             |   15 +++++++++++++++
 sources              |    2 +-
 7 files changed, 98 insertions(+), 32 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 67982fd..73e8ba7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
+*~
 glpi-0.72.4-11497.tar.gz
+/glpi-0.78.5.tar.gz
+/glpi-0.78-14966.tar.gz
diff --git a/glpi-config_path.php b/glpi-config_path.php
index 8da8779..e7b42b7 100644
--- a/glpi-config_path.php
+++ b/glpi-config_path.php
@@ -1,20 +1,28 @@
 <?php
 // for Redhat/Fedora RPM defaults
 
-define("GLPI_CONFIG_DIR",     "/etc/glpi");
+// Config
+define('GLPI_CONFIG_DIR',     '/etc/glpi');
 
-define("GLPI_DUMP_DIR",       "/var/lib/glpi/files/_dumps");
-define("GLPI_DOC_DIR",        "/var/lib/glpi/files");
-define("GLPI_CACHE_DIR",      "/var/lib/glpi/files/_cache/");
-define("GLPI_CRON_DIR",       "/var/lib/glpi/files/_cron");
-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/");
+// Runtime Data
+define('GLPI_DOC_DIR',        '/var/lib/glpi/files');
+define('GLPI_DUMP_DIR',       '/var/lib/glpi/files/_dumps');
+define('GLPI_CACHE_DIR',      '/var/lib/glpi/files/_cache/');
+define('GLPI_CRON_DIR',       '/var/lib/glpi/files/_cron');
+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_LOG_DIR",        "/var/log/glpi");
+// Log
+define('GLPI_LOG_DIR',        '/var/log/glpi');
 
 // System libraries
-define("GLPI_CACHE_LITE_DIR", "Cache");
-define("GLPI_PHPMAILER_DIR",  "PHPMailer");
-define("GLPI_PHPCAS",         "CAS.php");
+define('GLPI_CACHE_LITE_DIR', 'Cache');
+define('GLPI_PHPMAILER_DIR',  'PHPMailer');
+define('GLPI_EZC_BASE',       'ezc/Base/base.php');
+define('GLPI_PHPCAS',         'CAS.php');
+
+// Fonts
+define('GLPI_FONT_FREESANS',  '/usr/share/fonts/gnu-free/FreeSans.ttf');
 ?>
diff --git a/glpi-cron.patch b/glpi-cron.patch
new file mode 100644
index 0000000..80c2136
--- /dev/null
+++ b/glpi-cron.patch
@@ -0,0 +1,24 @@
+diff -up install/update_0723_078.php.cron install/update_0723_078.php
+--- install/update_0723_078.php.cron	2010-06-15 19:21:06.749549193 +0200
++++ install/update_0723_078.php	2010-06-15 19:23:32.651892513 +0200
+@@ -2097,6 +2097,9 @@ function update0723to078($output='HTML')
+          ('Ticket','alertnotclosed','43200',NULL,'1','1','3','0','24','30',NULL,NULL,NULL)";
+       $DB->query($query) or die("0.78 populate glpi_crontasks" . $LANG['update'][90] . $DB->error());
+ 
++      // RPM provides a good system cron
++      $query = "UPDATE `glpi_crontasks` SET `mode`=2 WHERE `mode`=1";
++      $DB->query($query) or die("0.78 update glpi_crontasks (for RPM)" . $LANG['update'][90] . $DB->error());
+    }
+    $ADDTODISPLAYPREF['Crontask']=array(8,3,4,7);
+ 
+--- install/mysql/glpi-0.78.2-empty.sql.cron	2010-11-15 18:57:02.766598708 +0100
++++ install/mysql/glpi-0.78.2-empty.sql	2010-11-15 18:57:44.406719150 +0100
+@@ -910,6 +910,8 @@
+ INSERT INTO `glpi_crontasks` VALUES ('14','ReservationItem','reservation','3600',NULL,'1','1','3','0','24','30',NULL,NULL,NULL);
+ INSERT INTO `glpi_crontasks` VALUES ('15','Ticket','closeticket','43200',NULL,'1','1','3','0','24','30',NULL,NULL,NULL);
+ INSERT INTO `glpi_crontasks` VALUES ('16','Ticket','alertnotclosed','43200',NULL,'1','1','3','0','24','30',NULL,NULL,NULL);
++### RPM provides a good system cron
++UPDATE `glpi_crontasks` SET `mode`=2 WHERE `mode`=1;
+ 
+ ### Dump table glpi_devicecases
+ 
diff --git a/glpi-httpd.conf b/glpi-httpd.conf
index c8870d3..ecb4270 100644
--- a/glpi-httpd.conf
+++ b/glpi-httpd.conf
@@ -12,9 +12,9 @@ Alias /glpi /usr/share/glpi
 
 <Directory /usr/share/glpi/install>
 
-    # 15" should be enough for migration in most case
-    php_value max_execution_time 900
-    php_value memory_limit 128M
+    # migration could be very long
+    php_value max_execution_time 0
+    php_value memory_limit -1
 
 </Directory>
 
diff --git a/glpi.spec b/glpi.spec
index 1f2bd82..77c4cb4 100644
--- a/glpi.spec
+++ b/glpi.spec
@@ -4,13 +4,12 @@
 %global useselinux 0
 %endif
 
-%global tarballversion 0.72.4
-%global svnrelease 11497
+%global svnrelease 14966
 
 Name:           glpi
-Version:        0.72.4
+Version:        0.78.5
 %if 0%{?svnrelease}
-Release:        3.svn%{svnrelease}%{?dist}
+Release:        2.svn%{svnrelease}%{?dist}
 %else
 Release:        1%{?dist}
 %endif
@@ -18,24 +17,24 @@ Summary:        Free IT asset management software
 Summary(fr):    Gestion Libre de Parc Informatique
 
 Group:          Applications/Internet
-License:        GPLv2+
+License:        GPLv2+ and GPLv3+
 URL:            http://www.glpi-project.org/
 %if 0%{?svnrelease}
-# svn export -r 11497 https://forge.indepnet.net/svn/glpi/branches/0.72-bugfixes glpi
-# rm -rf glpi/tools
-# mv glpi/install/mysql/glpi-0.72.3-empty.sql .
-# rm -f glpi/install/mysql/*.sql
-# mv glpi-0.72.3-empty.sql glpi/install/mysql/
-# tar czf glpi-0.72.4-11497.tar.gz glpi
-Source0:        glpi-0.72.4-%{svnrelease}.tar.gz
+# launch mktar %{svnrelease} to create
+Source0:        glpi-0.78-%{svnrelease}.tar.gz
+Source99:       mktar.sh
 %else
-Source0:        https://forge.indepnet.net/attachments/download/597/glpi-0.72.4.tar.gz
+Source0:        https://forge.indepnet.net/attachments/download/850/glpi-0.78.5.tar.gz
 %endif
 
 Source1:        glpi-httpd.conf
 Source2:        glpi-config_path.php
 Source3:        glpi-logrotate
 
+# Switch all internal cron tasks to system
+Patch0:         glpi-cron.patch
+
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
@@ -43,6 +42,12 @@ Requires:       php >= 5.0.0, php-mysql, httpd, php-gd, php-ldap, php-imap, php-
 Requires:       php-pear(Cache_Lite) >= 1.7.4
 Requires:       php-PHPMailer
 Requires:       php-pear-CAS >= 1.1.0
+Requires:       php-pear(components.ez.no/Graph) >= 1.5
+%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
+Requires:       gnu-free-sans-fonts
+%else
+Requires:       freefont
+%endif
 Requires:       %{_sysconfdir}/logrotate.d
 Requires(postun): /sbin/service
 Requires(post): /sbin/service
@@ -75,16 +80,24 @@ techniciens grâce à une maintenance plus cohérente.
 %prep
 %setup -q -n glpi
 
+%patch0
+find install -name \*.orig -exec rm {} \; -print
+
 # Use system lib
 rm -rf lib/cache_lite
 rm -rf lib/phpmailer
 rm -rf lib/phpcas
+rm -rf lib/ezcomponents
 
+%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
 cp %{SOURCE2} config/config_path.php 
+%else
+# fix font path on old version
+sed -e /GLPI_FONT_FREESANS/s/gnu-free/freefont/ %{SOURCE2} >config/config_path.php
+%endif
 
 mv lib/tiny_mce/license.txt LICENSE.tiny_mce
-mv lib/extjs/license.txt    LICENSE.extjs
-rm lib/extjs/{CHANGES.html,INCLUDE_ORDER.txt}
+mv lib/extjs/gpl-3.0.txt    LICENSE.extjs
 mv lib/icalcreator/lgpl.txt LICENSE.icalcreator
 rm scripts/glpi_cron_*.sh
 
@@ -117,7 +130,6 @@ do   cp -ar $i %{buildroot}/%{_datadir}/%{name}/$i
 done
 
 find %{buildroot}/%{_datadir}/%{name} -type f -exec chmod 644 {} \; 
-# chmod 755 %{buildroot}/%{_datadir}/%{name}/scripts/*.sh
 
 # ===== apache =====
 mkdir -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/
@@ -233,6 +245,10 @@ fi
 
 
 %changelog
+* Fri Jul 22 2011 Remi Collet <Fedora at FamilleCollet.com> - 0.78.5-2.svn14966
+- version 0.78.5 released
+- bug and security fix from SVN.
+
 * Thu May 20 2010 Remi Collet <Fedora at FamilleCollet.com> - 0.72.4-3.svn11497
 - use system phpCAS instead of bundled copy
 - minor bug fixes from SVN
diff --git a/mktar.sh b/mktar.sh
new file mode 100755
index 0000000..1e2db0a
--- /dev/null
+++ b/mktar.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [ "$1" = "" ]; then
+	echo mising rev number
+	exit 1
+fi
+
+svn export -r $1 https://forge.indepnet.net/svn/glpi/branches/0.78-bugfixes glpi
+rm -rf glpi/tools
+mv glpi/install/mysql/glpi-0.78.2-empty.sql .
+rm -f glpi/install/mysql/*.sql
+mv glpi-0.78.2-empty.sql glpi/install/mysql/
+tar czf glpi-0.78-$1.tar.gz glpi && echo glpi-0.78-$1.tar.gz created
+rm -rf glpi
+
diff --git a/sources b/sources
index 42d842f..e3f4e2a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-91c9aef1d7b886041fd802a49cf45893  glpi-0.72.4-11497.tar.gz
+9706b8a4e7f03bf0c5023a19bfb3bf1d  glpi-0.78-14966.tar.gz


More information about the scm-commits mailing list