Merge branch '1.9.1' into devel

Conflicts:
	install_full/ubuntu/airtime-full-install
	utils/airtime-update-db-settings.py
This commit is contained in:
martin 2011-09-15 17:44:07 -04:00
commit b5684bb5b1
20 changed files with 1921 additions and 46 deletions

View file

@ -1,7 +1,8 @@
1.9.4 - Sept 13, 2011 1.9.4 - Sept 13, 2011
*Improvements *Improvements
-"airtime-import" command-line utility now offers better help when invalid parameters have -DEB packages now available for Ubuntu & Debian
been passed. -"airtime-easy-install" DEB package now available which will install everything with a single click
-"airtime-import" command-line utility now offers better help when invalid parameters have been passed.
*Fixes *Fixes
-Fixed "Show Contents" displaying full-length of tracks, even if cue-points had been set. -Fixed "Show Contents" displaying full-length of tracks, even if cue-points had been set.
-Fixed start date of show not updating after dragging and dropping. -Fixed start date of show not updating after dragging and dropping.
@ -11,6 +12,8 @@
-Fixed issue where deleting a file from the Playlist Builder wouldn't always refresh the list to -Fixed issue where deleting a file from the Playlist Builder wouldn't always refresh the list to
remove the file. remove the file.
-Fixed issue where upgrading from any previous Airtime would set "Toronto/America" as the default timezone -Fixed issue where upgrading from any previous Airtime would set "Toronto/America" as the default timezone
-Fixed playout engine (Pypo) using a large amount of CPU when there was a long history of played shows
-Fixed playout engine (Pypo) using 100% CPU when it could not connect to RabbitMQ
1.9.3 - August 26th, 2011 1.9.3 - August 26th, 2011
*Improvements *Improvements

View file

@ -26,9 +26,14 @@ echo "----------------------------------------------------"
apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \
php-pear php5-gd postgresql odbc-postgresql python2.6 lame libsoundtouch-ocaml \ php-pear php5-gd postgresql odbc-postgresql python2.6 lame libsoundtouch-ocaml \
libmp3lame-dev libtaglib-ocaml libao-ocaml libmad-ocaml ecasound \ libmp3lame-dev libtaglib-ocaml libao-ocaml libmad-ocaml ecasound \
libesd0 icecast2 sudo libportaudio2 libsamplerate0 rabbitmq-server \ libesd0 icecast2 libportaudio2 libsamplerate0 rabbitmq-server patch \
php5-curl mpg123 monit python-virtualenv php5-curl mpg123 monit python-virtualenv
#possibly remove?
#libvorbis-ocaml-dev
#libcamomile-ocaml-dev
if [ "$?" -ne "0" ]; then if [ "$?" -ne "0" ]; then
echo "" echo ""
echo "There was a problem with apt-get. Please check the above error and try again." echo "There was a problem with apt-get. Please check the above error and try again."

View file

@ -26,7 +26,7 @@ echo -e "\n*** Creating Pypo User ***"
python ${SCRIPTPATH}/../python_apps/create-pypo-user.py python ${SCRIPTPATH}/../python_apps/create-pypo-user.py
set +e set +e
php ${SCRIPTPATH}/include/airtime-install.php $@ php --php-ini ${SCRIPTPATH}/airtime-php.ini --file ${SCRIPTPATH}/include/airtime-install.php $@
result=$? result=$?
if [ "$result" -eq "2" ]; then if [ "$result" -eq "2" ]; then
#We've just finished an upgrade, so let's exit #We've just finished an upgrade, so let's exit

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@ require_once('DB.php');
class AirtimeInstall class AirtimeInstall
{ {
const CONF_DIR_BINARIES = "/usr/lib/airtime"; const CONF_DIR_BINARIES = "/usr/lib/airtime";
const CONF_DIR_WWW = "/usr/share/airtime/"; const CONF_DIR_WWW = "/usr/share/airtime";
const CONF_DIR_LOG = "/var/log/airtime"; const CONF_DIR_LOG = "/var/log/airtime";
public static $databaseTablesCreated = false; public static $databaseTablesCreated = false;

View file

@ -51,29 +51,31 @@ echo "******************************** Update Begin ****************************
//convert strings like 1.9.0-devel to 1.9.0 //convert strings like 1.9.0-devel to 1.9.0
$version = substr($version, 0, 5); $version = substr($version, 0, 5);
$SCRIPTPATH = __DIR__;
if (strcmp($version, "1.7.0") < 0){ if (strcmp($version, "1.7.0") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.7.0/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.7.0/airtime-upgrade.php");
} }
if (strcmp($version, "1.8.0") < 0){ if (strcmp($version, "1.8.0") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.8.0/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.8.0/airtime-upgrade.php");
} }
if (strcmp($version, "1.8.1") < 0){ if (strcmp($version, "1.8.1") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.8.1/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.8.1/airtime-upgrade.php");
} }
if (strcmp($version, "1.8.2") < 0){ if (strcmp($version, "1.8.2") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.8.2/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.8.2/airtime-upgrade.php");
} }
if (strcmp($version, "1.9.0") < 0){ if (strcmp($version, "1.9.0") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.9.0/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.9.0/airtime-upgrade.php");
} }
if (strcmp($version, "1.9.2") < 0){ if (strcmp($version, "1.9.2") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.9.2/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.9.2/airtime-upgrade.php");
} }
if (strcmp($version, "1.9.3") < 0){ if (strcmp($version, "1.9.3") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.9.3/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.9.3/airtime-upgrade.php");
} }
if (strcmp($version, "1.9.4") < 0){ if (strcmp($version, "1.9.4") < 0){
system("php ".__DIR__."/../upgrades/airtime-1.9.4/airtime-upgrade.php"); passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini --file $SCRIPTPATH/../upgrades/airtime-1.9.4/airtime-upgrade.php");
} }
if (strcmp($version, "2.0.0") < 0){ if (strcmp($version, "2.0.0") < 0){
system("php ".__DIR__."/../upgrades/airtime-2.0.0/airtime-upgrade.php"); system("php ".__DIR__."/../upgrades/airtime-2.0.0/airtime-upgrade.php");
@ -89,16 +91,16 @@ $sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '$newVers
$CC_DBC->query($sql); $CC_DBC->query($sql);
echo PHP_EOL."*** Updating Api Client ***".PHP_EOL; echo PHP_EOL."*** Updating Api Client ***".PHP_EOL;
passthru("python ".__DIR__."/../../python_apps/api_clients/install/api_client_install.py"); passthru("python $SCRIPTPATH/../../python_apps/api_clients/install/api_client_install.py");
echo PHP_EOL."*** Updating Pypo ***".PHP_EOL; echo PHP_EOL."*** Updating Pypo ***".PHP_EOL;
passthru("python ".__DIR__."/../../python_apps/pypo/install/pypo-install.py"); passthru("python $SCRIPTPATH/../../python_apps/pypo/install/pypo-install.py");
echo PHP_EOL."*** Updating Recorder ***".PHP_EOL; echo PHP_EOL."*** Updating Recorder ***".PHP_EOL;
passthru("python ".__DIR__."/../../python_apps/show-recorder/install/recorder-install.py"); passthru("python $SCRIPTPATH/../../python_apps/show-recorder/install/recorder-install.py");
echo PHP_EOL."*** Updating Media Monitor ***".PHP_EOL; echo PHP_EOL."*** Updating Media Monitor ***".PHP_EOL;
passthru("python ".__DIR__."/../../python_apps/media-monitor/install/media-monitor-install.py"); passthru("python $SCRIPTPATH/../../python_apps/media-monitor/install/media-monitor-install.py");
sleep(4); sleep(4);
passthru("airtime-check-system"); passthru("airtime-check-system");

View file

@ -172,6 +172,9 @@ function MergeConfigFiles($configFiles, $suffix)
// Parse with sections // Parse with sections
$newSettings = parse_ini_file($conf, true); $newSettings = parse_ini_file($conf, true);
$oldSettings = parse_ini_file("$conf$suffix.bak", true); $oldSettings = parse_ini_file("$conf$suffix.bak", true);
$oldSettings['general']['airtime_dir'] = '/var/www/airtime';
$oldSettings['general']['base_files_dir'] = '/srv/airtime';
} }
else { else {
$newSettings = ReadPythonConfig($conf); $newSettings = ReadPythonConfig($conf);
@ -238,6 +241,13 @@ function LoadConfig($CC_CONFIG) {
return $CC_CONFIG; return $CC_CONFIG;
} }
function movePhpFiles($CC_CONFIG){
$phpDir = $CC_CONFIG['phpDir'];
echo "Copying Server files from $phpDir/airtime_mvc to /var/www/airtime";
exec("mkdir -p /var/www/airtime");
exec("cp -R $phpDir/airtime_mvc/* /var/www/airtime");
}
// Backup the config files // Backup the config files
$suffix = date("Ymdhis")."-1.8.0"; $suffix = date("Ymdhis")."-1.8.0";
foreach ($configFiles as $conf) { foreach ($configFiles as $conf) {
@ -247,9 +257,16 @@ foreach ($configFiles as $conf) {
} }
} }
$CC_CONFIG = LoadConfig($CC_CONFIG);
movePhpFiles($CC_CONFIG);
$default_suffix = "180"; $default_suffix = "180";
CreateIniFiles($default_suffix); CreateIniFiles($default_suffix);
echo "* Initializing INI files".PHP_EOL; echo "* Initializing INI files".PHP_EOL;
MergeConfigFiles($configFiles, $suffix); MergeConfigFiles($configFiles, $suffix);
$CC_CONFIG = LoadConfig($CC_CONFIG);

View file

@ -84,21 +84,25 @@ class AirtimeInstall{
public static function BypassMigrations($dir, $version) public static function BypassMigrations($dir, $version)
{ {
$appDir = AirtimeInstall::GetAirtimeSrcDir(); $appDir = AirtimeInstall::GetAirtimeSrcDir();
$command = "php $appDir/library/doctrine/migrations/doctrine-migrations.phar ". $SCRIPTPATH = __DIR__;
$command = "php --php-ini $SCRIPTPATH/../../airtime-php.ini ".
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ".
"--configuration=$dir/../../DoctrineMigrations/migrations.xml ". "--configuration=$dir/../../DoctrineMigrations/migrations.xml ".
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
"--no-interaction --add migrations:version $version"; "--no-interaction --add migrations:version $version";
system($command); passthru($command);
} }
public static function MigrateTablesToVersion($dir, $version) public static function MigrateTablesToVersion($dir, $version)
{ {
$appDir = AirtimeInstall::GetAirtimeSrcDir(); $appDir = AirtimeInstall::GetAirtimeSrcDir();
$command = "php $appDir/library/doctrine/migrations/doctrine-migrations.phar ". $SCRIPTPATH = __DIR__;
$command = "php --php-ini $SCRIPTPATH/../../airtime-php.ini ".
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ".
"--configuration=$dir/../../DoctrineMigrations/migrations.xml ". "--configuration=$dir/../../DoctrineMigrations/migrations.xml ".
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
"--no-interaction migrations:migrate $version"; "--no-interaction migrations:migrate $version";
system($command); passthru($command);
} }
public static function CreateCronFile(){ public static function CreateCronFile(){
@ -577,16 +581,6 @@ class Airtime190Upgrade{
} }
// we don't need thses functions anymore as it's done in CreateSymlinksToUtils()
/*public static function removeOldAirtimeImport(){
exec('rm -f "/usr/bin/airtime-import"');
}
public static function updateAirtimeImportSymLink(){
$dir = "/usr/lib/airtime/utils/airtime-import/airtime-import";
exec("ln -s $dir /usr/bin/airtime-import");
}*/
public static function execSqlQuery($sql){ public static function execSqlQuery($sql){
global $CC_DBC; global $CC_DBC;

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ###############################################################################

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import time import time

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import time import time

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import sys import sys
import time import time

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import time import time

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os

View file

@ -10,9 +10,9 @@ import ConfigParser
import xml.dom.minidom import xml.dom.minidom
from xml.dom.minidom import Node from xml.dom.minidom import Node
if not os.geteuid() == 0: if os.geteuid() != 0:
sys.exit('Must be root user.') print "Please run this as root."
sys.exit(1)
#Read the universal values #Read the universal values
parser = ConfigParser.SafeConfigParser() parser = ConfigParser.SafeConfigParser()

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2.6
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.