]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-paths.patch
- uids/gids
[packages/eventum.git] / eventum-paths.patch
1 --- ./cli/eventum       2009-06-27 19:46:44.401524716 +0300
2 +++ ./cli/eventum       2009-06-27 19:45:22.781438493 +0300
3 @@ -12,9 +12,8 @@
4  // @(#) $Id$
5  
6  // definitions of path related variables
7 -define('APP_PATH', dirname(__FILE__) . '/');
8 -define('APP_INC_PATH', APP_PATH . '/lib/eventum');
9 -define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
10 +define('APP_PATH', '/usr/share/eventum');
11 +define('APP_INC_PATH', APP_PATH . '/cli');
12  
13  if (defined('APP_PEAR_PATH')) {
14      set_include_path(APP_PEAR_PATH . PATH_SEPARATOR . get_include_path());
15 --- eventum-2.2/init.php~       2009-10-12 22:40:04.000000000 +0300
16 +++ eventum-2.2/init.php        2009-10-12 22:40:41.619219457 +0300
17 @@ -27,7 +27,7 @@
18  // | Authors: Elan Ruusamäe <glen@delfi.ee>                               |
19  // +----------------------------------------------------------------------+
20  
21 -if (!file_exists(dirname(__FILE__) . '/config/config.php') || !filesize(dirname(__FILE__) . '/config/config.php')) {
22 +if (!file_exists('/etc/webapps/eventum/config.php') || !filesize('/etc/webapps/eventum/config.php')) {
23      Header('Location: setup/');
24      exit(0);
25  }
26 @@ -46,7 +46,7 @@
27  
28  // define base path
29  define('APP_PATH', realpath(dirname(__FILE__)));
30 -define('APP_CONFIG_PATH', APP_PATH . '/config');
31 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
32  
33  // include local site config. may override any default
34  require_once APP_CONFIG_PATH . '/config.php';
35 @@ -61,19 +61,15 @@
36  }
37  
38  if (!defined('APP_TPL_COMPILE_PATH')) {
39 -    define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
40 +    define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
41  }
42  
43  if (!defined('APP_INC_PATH')) {
44      define('APP_INC_PATH', APP_PATH . '/lib/eventum');
45  }
46  
47 -if (!defined('APP_PEAR_PATH')) {
48 -    define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
49 -}
50 -
51  if (!defined('APP_SMARTY_PATH')) {
52 -    define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
53 +    define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
54  }
55  
56  if (!defined('APP_JPGRAPH_PATH')) {
57 @@ -81,7 +77,7 @@
58  }
59  
60  if (!defined('APP_LOCKS_PATH')) {
61 -    define('APP_LOCKS_PATH', APP_PATH . '/locks');
62 +    define('APP_LOCKS_PATH', '/var/run/eventum/');
63  }
64  
65  if (!defined('APP_SQL_PATCHES_PATH')) {
66 @@ -89,7 +85,7 @@
67  }
68  
69  if (!defined('APP_LOG_PATH')) {
70 -    define('APP_LOG_PATH', APP_PATH . '/logs');
71 +    define('APP_LOG_PATH', '/var/log/eventum');
72  }
73  
74  if (!defined('APP_ROUTED_MAILS_SAVEDIR')) {
75 --- eventum-2.2/htdocs/setup/index.php~ 2010-07-28 12:09:26.000000000 +0300
76 +++ eventum-2.2/htdocs/setup/index.php  2010-07-28 12:09:48.715993083 +0300
77 @@ -42,14 +42,14 @@
78  define('APP_PATH', realpath(dirname(__FILE__) . '/../..'));
79  define('APP_INC_PATH', APP_PATH . '/lib/eventum');
80  define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
81 -define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
82 -define('APP_CONFIG_PATH', APP_PATH . '/config');
83 +define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
84 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
85  define('APP_SETUP_FILE', APP_CONFIG_PATH . '/setup.php');
86  define('APP_TPL_PATH', APP_PATH . '/templates');
87 -define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
88 -define('APP_LOG_PATH', APP_PATH . '/logs');
89 +define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
90 +define('APP_LOG_PATH', '/var/log/eventum');
91  define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log');
92 -define('APP_LOCKS_PATH', APP_PATH . '/locks');
93 +define('APP_LOCKS_PATH', '/var/run/eventum');
94  
95  header('Content-Type: text/html; charset=' . APP_CHARSET);
96  
97 @@ -252,10 +252,6 @@
98              "You need to install this extension for optimal operation. If you do not install this extension some unicode data will be corrupted.";
99      }
100  
101 -    $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", TRUE);
102 -    if (!empty($error)) {
103 -        $errors[] = $error;
104 -    }
105      $error = checkPermissions(APP_SETUP_FILE, "File '" . APP_SETUP_FILE. "'");
106      if (!empty($error)) {
107          $errors[] = $error;
108 @@ -329,10 +325,6 @@
109      $setup_file_path = APP_SETUP_FILE;
110  
111      clearstatcache();
112 -    // check if config directory is writable
113 -    if (!is_writable(APP_CONFIG_PATH)) {
114 -        return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again.";
115 -    }
116      // need to create a random private key variable
117      $private_key = '<?php
118  $private_key = "' . md5(microtime()) . '";
119 --- eventum-2.2/irc/eventum-irc-bot~    2009-07-23 14:03:41.422211655 +0300
120 +++ eventum-2.2/irc/eventum-irc-bot     2009-07-23 13:54:22.000000000 +0300
121 @@ -32,7 +32,7 @@
122  
123  ini_set('memory_limit', '1024M');
124  
125 -require_once dirname(__FILE__) . '/../init.php';
126 +require_once '/usr/share/eventum/init.php';
127  
128  if (!file_exists(APP_CONFIG_PATH . '/irc_config.php')) {
129      fwrite(STDERR, "ERROR: No config specified. Please see setup/irc_config.php for config information.\n\n");
130 --- eventum/crons/monitor.php   2010-11-24 17:24:23.000000000 +0200
131 +++ eventum/crons/monitor.php   2010-11-24 18:23:09.664934996 +0200
132 @@ -37,17 +37,17 @@
133  $required_files = array(
134      APP_CONFIG_PATH . '/config.php' => array(
135          'check_owner'      => true,
136 -        'owner'            => 'apache',
137 +        'owner'            => 'root',
138          'check_group'      => true,
139 -        'group'            => 'apache',
140 +        'group'            => 'http',
141          'check_permission' => true,
142          'permission'       => 640,
143      ),
144      APP_CONFIG_PATH . '/setup.php' => array(
145          'check_owner'      => true,
146 -        'owner'            => 'apache',
147 +        'owner'            => 'root',
148          'check_group'      => true,
149 -        'group'            => 'apache',
150 +        'group'            => 'http',
151          'check_permission' => true,
152          'permission'       => 660,
153          'check_filesize'   => true,
This page took 0.048855 seconds and 4 git commands to generate.