View Single Post
  #2  
Old 28th August 2011, 05:28
nveid nveid is offline
Member
 
Join Date: Jan 2006
Location: Daytona Beach, FL
Posts: 87
Thanks: 7
Thanked 17 Times in 14 Posts
Send a message via Yahoo to nveid Send a message via Skype™ to nveid
Default

Welp.. Answered my own question & thought I'd give the quickest setup to someone who might search the forums in the future.

1. do your svn check out as normal

2. cp -sr /path/to/your/svn /path/for/a/copy

3. Backup Up the following configuration files:
At /usr/local/ispconfig/server/lib
config.inc.php mysql_clientdb.conf
At /usr/local/ispconfig/interface/lib
config.inc.php
4. Get rid of your server/interface directories, and move your symbolic link farms into the place of server/interface.

5. Move your configuration files back in place.. Everything should be peachy.

Now when you make changes or when your pulling new changes svn diff works correctly off your work to the repo.

And the update script in install/ directory works beautiful without not affecting my setup & just updating sql entries in the database.

EDIT:
There is 2 limitations preventing this setup, however I solved it in my current checkout(I'm using git-svn.. so I just stash my changes I'm not committing), if Falko or Till say its okay I'll commit these changes. Basically its this..
1. At server.php.. Its using a require(), its not so symbolic link friendly.. Have to specify an absolute path. So here's the needed change.

diff --git a/server/server.php b/server/server.php
old mode 100644
new mode 100755
index c171d48..967d13a
--- a/server/server.php
+++ b/server/server.php
@@ -1,5 +1,4 @@
<?php
-
/*
Copyright (c) 2007-2011, Till Brehm, projektfarm Gmbh
All rights reserved.
@@ -28,8 +27,11 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

-require('lib/config.inc.php');
-require('lib/app.inc.php');

+// $script_path allows development work of using a symbolic link farm
+// to use along side git or svn
+$script_path = dirname($_SERVER["SCRIPT_FILENAME"]);
+require("$script_path/lib/config.inc.php");
+require("$script_path/lib/app.inc.php");


set_time_limit(0);
ini_set('error_reporting', E_ALL & ~E_NOTICE);

2. At server/lib/app.inc.php, the code explicitly disallows symbolic linked classes. This is the diff I did to allow this changed.
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -75,7 +75,8 @@ class app {
if(is_array($cl)) {
foreach($cl as $classname) {
if(!@is_object($this->$classname)) {
- if(is_file($conf['classpath'].'/'.$classname.'.inc.php') && !is_link($conf['classpath'].'/'.$classname.'.inc.php')) {
+ // Nveid: Why was this protected against links?
+ if(is_file($conf['classpath'].'/'.$classname.'.inc.php') || is_link($conf['classpath'].'/'.$classname.'.inc.php')) {

include_once($conf['classpath'].'/'.$classname.'.inc.php');
$this->$classname = new $classname;
}
@@ -91,7 +92,7 @@ class app {
$cl = explode(',',$classes);
if(is_array($cl)) {
foreach($cl as $classname) {
- if(is_file($conf['classpath'].'/'.$classname.'.inc.php') && !is_link($conf['classpath'].'/'.$classname.'.inc.php')) {
+ if(is_file($conf['classpath'].'/'.$classname.'.inc.php') || is_link($conf['classpath'].'/'.$classname.'.inc.php')) {
include_once($conf['classpath'].'/'.$classname.'.inc.php');
} else {
die('Unable to load: '.$conf['classpath'].'/'.$classname.'.inc.php');
__________________
-- RLB

Last edited by nveid; 29th August 2011 at 01:25. Reason: Road Block in setup
Reply With Quote