I would like to follow development of ispcp on a test server (debian).
I am wondering what would be the best setup to be able to "svn update" my local tree and test slight mods in "real time".
Currently I have to svn update then make install and then go trough the "perl ispcp-update" script that takes ages.
There must be a simpler and more direct way, specially for small daily updates where ispcp-update really is not updating from an "old" version but from "yesterday".
I would like to get an idea on how you devs have solved this problem. Do you work in /var/www/ispcp (and have your repository there) or do you copy every changed file over and over to /var/www.... perhaps I'm missing something obvious.
ispcomm
PS: Yes... i like to tweak things around and I want to understand how development works in ispcp so I can fix myself out if I need to ;-)
Nobody has any ideas? Weird
There is an HowTo in the Wiki. With this it should possible to upgrade from nightly to nightly. But all changes in the configs /etc you have to update it manually. You have to read the changelog in the Timeline, to see what has changed.
Being a lazy programmer I made a script to automate nightly updates. It's little more than cut and paste from the wiki, but I think it might be usefull for somebody. Use it and mod it to your liking ;-)
Run it from the ispcp root directory (that would be the "trunk" dir in case you're following trunk).
Updated: version 0.0.1, including a proper license an credits. Very alpha but seems to work.
Code:
#!/bin/sh
#
# ispcp-nightly-update
# Version: 0.0.1
# License: GPL
# Author : ispcomm
# Credits: ispcp development team
# Variables
BACKUPDIR="/var/www/backup"
WWWDIR="/var/www"
ISPCPDIR="${WWWDIR}/ispcp/"
REBUILD_SITES="yes"
# Backup current installation
mkdir -p ${BACKUPDIR}
pushd ${BACKUPDIR}
tar czpf "ispcp_backup-`date +'%Y-%m-%d %H-%M-%S'`.tar.gz" ../ispcp/
cp ../ispcp/engine/ispcp-db-keys.pl .
cp ../ispcp/gui/include/ispcp-db-keys.php .
cp ../ispcp/gui/tools/pma/config.inc.php .
popd
# Compile ispcp. Install will copy files to /tmp/ispcp
make clean install
# Update current installation
/etc/init.d/ispcp_daemon stop
pushd /tmp/ispcp${WWWDIR}
cp -R ispcp/ ${WWWDIR}
find ${ISPCPDIR} -type d -name '.svn' -exec rm -fr '{}' \;
cd ${BACKUPDIR}
cp ispcp-db-keys.pl ../ispcp/engine/
cp ispcp-db-keys.pl ../ispcp/engine/messager/
cp ispcp-db-keys.php ../ispcp/gui/include/
cp config.inc.php ../ispcp/gui/tools/pma/
cd ../ispcp/engine/setup/
./set-engine-permissions.sh
./set-gui-permissions.sh
if [ $REBUILD_SITES == "yes" ] ; then
# Some old releases require this. not necessary for current ones.
#DELETE FROM config WHERE name = 'DATABASE_REVISION';
cat <<EOF | mysql -uroot -p ispcp
UPDATE mail_users SET status='toadd' where status='ok';
UPDATE domain SET domain_status = 'change' WHERE domain_status = 'ok';
UPDATE domain_aliasses SET alias_status = 'change' WHERE alias_status = 'ok';
UPDATE subdomain SET subdomain_status = 'change' WHERE subdomain_status = 'ok';
EOF
${ISPCPDIR}/engine/ispcp-rqst-mngr
fi
/etc/init.d/ispcp_daemon start
rm -fR /tmp/ispcp
popd
ispcomm
Hi ispcomm,
thanks for your script. It looks very nice.
Mr.X
thanks for that script. I will test it at the Weekend. Maybe we can "tune" it.

since svn 1134, freebsd distro have a little capability to detect if system already installed with ispcp, may be this can be merge to other distro
BSDmakefile
=-=-=-=-=-=
... cut ...
.if exists ($(SYSTEM_WEB)/ispcp/engine/ispcp-db-keys.pl)
#
# Previous database key detected, assuming being perform Upgrade Procedure
#
cp $(SYSTEM_WEB)/ispcp/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/
cp $(SYSTEM_WEB)/ispcp/engine/messager/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/
cp $(SYSTEM_WEB)/ispcp/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/gui/include/
cp $(SYSTEM_WEB)/ispcp/gui/tools/pma/config.inc.php $(SYSTEM_ROOT)/gui/tools/pma/
.endif
.. cut ..
Can someone test and confirm this works. It would make life so much easier if us testers can keep up with Nightly builds. I know BeNe would love this for his Demo server.
I`ve tested and it worked for me. But if you are using svn you should remove all folder named .svn copied by line
Quote:cp -R ispcp/ /var/www/
(it`s not a good ideea to expose php code even if there are not any confidential data: passwords to database). Maybe you can add a
Quote:rm -r `find -iname .svn`
.
Second, none of template file are copied in /etc. (i think that files from ../parts are mandatory.
Anyway, great tools.