Code

Added redhat directory to build rpms
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Nov 2008 13:02:01 +0000 (13:02 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Nov 2008 13:02:01 +0000 (13:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13023 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/redhat/01_fix_template_location.patch [new file with mode: 0644]
gosa-core/redhat/02_fix_class_mapping.patch [new file with mode: 0644]
gosa-core/redhat/03_fix_locale_location.patch [new file with mode: 0644]
gosa-core/redhat/04_fix_online_help_location.patch [new file with mode: 0644]

diff --git a/gosa-core/redhat/01_fix_template_location.patch b/gosa-core/redhat/01_fix_template_location.patch
new file mode 100644 (file)
index 0000000..785696e
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urNad gosa-core~/include/functions.inc gosa-core/include/functions.inc
+--- gosa-core~/include/functions.inc   2008-05-30 10:39:33.000000000 +0200
++++ gosa-core/include/functions.inc    2008-06-03 09:16:19.000000000 +0200
+@@ -40,7 +40,7 @@
+   define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']);
+ }
+-define ("CONFIG_TEMPLATE_DIR", "../contrib");
++define ("CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa");
+ define ("TEMP_DIR","/var/cache/gosa/tmp");
+ /* Define get_list flags */
diff --git a/gosa-core/redhat/02_fix_class_mapping.patch b/gosa-core/redhat/02_fix_class_mapping.patch
new file mode 100644 (file)
index 0000000..07316cc
--- /dev/null
@@ -0,0 +1,53 @@
+diff -urNad gosa-core~/include/class_config.inc gosa-core/include/class_config.inc
+--- gosa-core~/include/class_config.inc        2008-07-10 17:18:52.000000000 +0200
++++ gosa-core/include/class_config.inc 2008-07-15 10:00:12.000000000 +0200
+@@ -76,12 +76,12 @@
+         if we have installed or removed plugins. 
+      */
+     if(session::is_set("class_location.inc:timestamp")){
+-      $tmp = stat("../include/class_location.inc");
++      $tmp = stat("/var/cache/gosa/class.cache");
+       if($tmp['mtime'] != session::get("class_location.inc:timestamp")){
+         session::un_set("plist");
+       }
+     }
+-    $tmp = stat("../include/class_location.inc");
++    $tmp = stat("/var/cache/gosa/class.cache");
+     session::set("class_location.inc:timestamp",$tmp['mtime']);
+diff -urNad gosa-core~/include/functions.inc gosa-core/include/functions.inc
+--- gosa-core~/include/functions.inc   2008-07-15 09:58:50.000000000 +0200
++++ gosa-core/include/functions.inc    2008-07-15 09:58:51.000000000 +0200
+@@ -73,7 +73,7 @@
+ $svn_revision = '$Revision: 9246 $';
+ /* Include required files */
+-require_once("class_location.inc");
++require_once("/var/cache/gosa/class.cache");
+ require_once ("functions_debug.inc");
+ require_once ("accept-to-gettext.inc");
+diff -urNad gosa-core~/update-gosa gosa-core/update-gosa
+--- gosa-core~/update-gosa     2008-06-10 09:56:22.000000000 +0200
++++ gosa-core/update-gosa      2008-07-15 09:58:51.000000000 +0200
+@@ -21,7 +21,7 @@
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+-define ("GOSA_HOME", dirname(__FILE__));
++define ("GOSA_HOME", "/usr/share/gosa");
+ define ("LOCALE_DIR", GOSA_HOME."/locale");
+ define ("PLUGSTATE_DIR", GOSA_HOME."/state");
+@@ -122,8 +122,8 @@
+ function rescan_classes()
+ {
+       echo "Updating class cache...\n";
+-      $class_mapping= get_classes();
+-      $filename= GOSA_HOME."/include/class_location.inc";
++      $class_mapping= get_classes("/usr/share/gosa");
++      $filename= "/var/cache/gosa/class.cache";
+       /* Sanity checks */
+       if (!file_exists($filename) || is_writable($filename)) {
diff --git a/gosa-core/redhat/03_fix_locale_location.patch b/gosa-core/redhat/03_fix_locale_location.patch
new file mode 100644 (file)
index 0000000..148a9d0
--- /dev/null
@@ -0,0 +1,41 @@
+diff -urNad gosa-2.6.0+svn11288~/include/php_setup.inc gosa-2.6.0+svn11288/include/php_setup.inc
+--- gosa-2.6.0+svn11288~/include/php_setup.inc 2008-06-11 15:55:59.000000000 +0200
++++ gosa-2.6.0+svn11288/include/php_setup.inc  2008-06-11 15:56:00.000000000 +0200
+@@ -20,7 +20,7 @@
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+-define ("LOCALE_DIR", dirname(dirname(__FILE__))."/locale/compiled");
++define ("LOCALE_DIR", "/var/cache/gosa/locale");
+ function gosaRaiseError($errno, $errstr, $errfile, $errline)
+ {
+diff -urNad gosa-2.6.0+svn11288~/update-gosa gosa-2.6.0+svn11288/update-gosa
+--- gosa-2.6.0+svn11288~/update-gosa   2008-06-11 15:55:59.000000000 +0200
++++ gosa-2.6.0+svn11288/update-gosa    2008-06-11 16:02:30.000000000 +0200
+@@ -169,20 +169,20 @@
+       /* For each language, merge the target .mo to the compiled directory. */
+       foreach ($languages as $language => $po_files){
+-              if (!is_dir(LOCALE_DIR."/compiled/${language}/LC_MESSAGES")){
+-                      if (!mkdir (LOCALE_DIR."/compiled/${language}/LC_MESSAGES", 0755, TRUE)){
+-                              echo "Failed to create '".LOCALE_DIR."/compiled/${language}/LC_MESSAGES'- aborted";
++              if (!is_dir("/var/cache/gosa/locale/${language}/LC_MESSAGES")){
++                      if (!mkdir ("/var/cache/gosa/locale/${language}/LC_MESSAGES", 0755, TRUE)){
++                              echo "Failed to create '/var/cache/gosa/locale/${language}/LC_MESSAGES'- aborted";
+                               exit (3);
+                       }
+               }
+               /* Cat all these po files into one single file */
+-              system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > compiled/${language}/LC_MESSAGES/messages.po)", $val);
++              system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > /var/cache/gosa/locale/${language}/LC_MESSAGES/messages.po)", $val);
+               if ($val != 0){
+                       echo "Merging of message files failed - aborted";
+                       exit (4);
+               }
+-              system ("(cd ".LOCALE_DIR."/compiled/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
++              system ("(cd /var/cache/gosa/locale/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
+               if ($val != 0){
+                       echo "Compiling of message files failed - aborted";
+                       exit (5);
diff --git a/gosa-core/redhat/04_fix_online_help_location.patch b/gosa-core/redhat/04_fix_online_help_location.patch
new file mode 100644 (file)
index 0000000..85f8ff6
--- /dev/null
@@ -0,0 +1,24 @@
+diff -urNad gosa-core~/html/helpviewer.php gosa-core/html/helpviewer.php
+--- gosa-core~/html/helpviewer.php     2008-04-12 19:58:14.000000000 +0200
++++ gosa-core/html/helpviewer.php      2008-04-14 17:25:10.000000000 +0200
+@@ -110,7 +110,7 @@
+ if(session::is_set('current_class_for_help')){
+   /* Create new XML parser with the path to the Xml file */
+-  $xml = new parseXml("../doc/guide.xml");
++  $xml = new parseXml("/etc/gosa/guide.xml");
+   
+   /* Generate help array */
+   $str = $xml->parse();
+diff -urNad gosa-core~/update-gosa gosa-core/update-gosa
+--- gosa-core~/update-gosa     2008-04-14 14:59:22.000000000 +0200
++++ gosa-core/update-gosa      2008-04-14 17:24:53.000000000 +0200
+@@ -193,7 +193,7 @@
+ function rescan_guide()
+ {
+-      $master_guide= "doc/guide.xml";
++      $master_guide= "/etc/gosa/guide.xml";
+       echo "Updating Online Help Index...\n";
+       $master_guide_content="<?xml version=\"1.0\"?>\n".
+               "<!--\n".