Merge branch '2.3.x' into devel

This commit is contained in:
Martin Konecny 2013-03-22 14:05:08 -04:00
commit 6d1025507a
9 changed files with 113 additions and 59 deletions

View file

@ -2,7 +2,7 @@
CREDITS CREDITS
======= =======
Version 2.3.0 Version 2.3.0/2.3.1
------------- -------------
Martin Konecny (martin.konecny@sourcefabric.org) Martin Konecny (martin.konecny@sourcefabric.org)
Role: Developer Team Lead Role: Developer Team Lead

View file

@ -1,3 +1,16 @@
2.3.1 - March 19th, 2013
* Bug fixes
* Security fixes with running unescaped shell commands
* Fix backend services not coming back online if RabbitMQ crashed and
then restarted
* Fix uninstall not properly cleaning system
* Improved Services watchdog (test whether Services are running and
responding, not just running)
* Much faster library import (Silan analyzer runs in background)
* Fixed zombie process sometimes being created
* Other
* Upgrade to Mutagen (tag reader) 1.21
2.3.0 - Jan 21st, 2013 2.3.0 - Jan 21st, 2013
* New features * New features
* Localization (Chinese, Czech, English, French, German, Italian, Korean, * Localization (Chinese, Czech, English, French, German, Italian, Korean,

11
debian/changelog vendored
View file

@ -1,8 +1,15 @@
airtime (2.3.0-2) unstable; urgency=low
* Don't run the airtime-install script if the user has chosen not to
set up Apache
-- Daniel James <daniel@64studio.com> Tue, 19 Mar 2013 16:39:23 +0000
airtime (2.3.0-1) unstable; urgency=low airtime (2.3.0-1) unstable; urgency=low
* Nightly development snapshot of Airtime 2.3.x * Upstream 2.3.0 release
-- Daniel James <daniel@64studio.com> Tue, 22 Jan 2013 11:44:57 +0000 -- Daniel James <daniel@64studio.com> Tue, 12 Feb 2013 11:44:57 +0000
airtime (2.2.1-1) unstable; urgency=low airtime (2.2.1-1) unstable; urgency=low

67
debian/postinst vendored
View file

@ -1,10 +1,14 @@
#!/bin/bash #!/bin/bash
#postinst script for airtime #postinst script for airtime
set -x set -e
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
if [ "$DPKG_DEBUG" = "developer" ]; then
set -x
fi
wwwdir="/usr/share/airtime" wwwdir="/usr/share/airtime"
tmpdir="/var/lib/airtime/tmp" tmpdir="/var/lib/airtime/tmp"
configdir="/etc/airtime" configdir="/etc/airtime"
@ -20,39 +24,30 @@ case "$1" in
webserver="apache2" webserver="apache2"
php="php5" php="php5"
# clean up previous configurations
if [ -L /etc/$webserver/conf.d/airtime.conf ]; then
rm -f /etc/$webserver/conf.d/airtime.conf
fi
if [ -f /etc/$webserver/sites-available/airtime-vhost ]; then
a2dissite airtime-vhost
fi
# this file in 1.8.2 is a directory path in 1.9.3 # this file in 1.8.2 is a directory path in 1.9.3
if [ -f /var/www/airtime/utils/airtime-import ]; then if [ -f /var/www/airtime/utils/airtime-import ]; then
rm -f /var/www/airtime/utils/airtime-import rm -f /var/www/airtime/utils/airtime-import
fi fi
# APACHE config # do we set up a virtual host?
echo "Setting up apache2..." db_get airtime/apache-setup
APACHESETUP=$RET
if [ "${APACHESETUP}" == "no thanks" ]; then
echo "Not setting up ${webserver} and ${php}..."
elif [ "${APACHESETUP}" == "dedicated v-host" ]; then
echo "Setting up ${webserver}..."
# create the document root if it doesn't exist # create the document root if it doesn't exist
if [ ! -d $wwwdir/public/ ]; then if [ ! -d $wwwdir/public/ ]; then
install -d -m755 $wwwdir/public/ install -d -m755 $wwwdir/public/
fi fi
# set up the virtual host # temporarily disable an existing virtual host
db_get airtime/apache-setup if [ -f /etc/$webserver/sites-available/airtime-vhost ]; then
if [ "$RET" == "system-wide (all vhosts)" ]; then a2dissite airtime-vhost
if [ ! -d /etc/$webserver/conf.d/ ]; then
install -d -m755 /etc/$webserver/conf.d/
fi
if [ ! -e /etc/$webserver/conf.d/airtime.conf ]; then
ln -s ${includefile} /etc/$webserver/conf.d/airtime.conf
fi fi
elif [ "$RET" == "dedicated v-host" ]; then
db_get airtime/apache-servername db_get airtime/apache-servername
SN=$RET SN=$RET
db_get airtime/apache-serveradmin db_get airtime/apache-serveradmin
@ -69,6 +64,21 @@ case "$1" in
if [ $RETVAL -eq 0 ]; then if [ $RETVAL -eq 0 ]; then
a2ensite airtime-vhost a2ensite airtime-vhost
fi fi
# insert a specific hostname, if provided, into API configuration
if [ "${SN}" != "localhost" ]; then
# new installs
if [ -f /var/lib/airtime/tmp/airtime_mvc/build/airtime.conf -a -f /var/lib/airtime/tmp/python_apps/api_clients/api_client.cfg ]; then
sed -i "s/base_url = localhost/base_url = ${SN}/" /var/lib/airtime/tmp/airtime_mvc/build/airtime.conf
sed -i "s/host = 'localhost'/host = '${SN}'/" /var/lib/airtime/tmp/python_apps/api_clients/api_client.cfg
fi
# upgrades
if [ -f /etc/airtime/airtime.conf -a -f /etc/airtime/api_client.cfg ]; then
sed -i "s/base_url = localhost/base_url = ${SN}/" /etc/airtime/airtime.conf
sed -i "s/host = 'localhost'/host = '${SN}'/" /etc/airtime/api_client.cfg
fi
fi fi
# enable the rewrite module # enable the rewrite module
@ -95,6 +105,10 @@ case "$1" in
ln -s ${phpinifile} /etc/$php/conf.d/airtime.ini ln -s ${phpinifile} /etc/$php/conf.d/airtime.ini
fi fi
# restart apache
invoke-rc.d apache2 restart
fi
# XXX ICECAST XXX # XXX ICECAST XXX
db_get airtime/icecast-setup db_get airtime/icecast-setup
if [ "$RET" == "true" ]; then if [ "$RET" == "true" ]; then
@ -186,9 +200,6 @@ case "$1" in
echo "The rabbitmq-server package does not appear to be installed on this server." echo "The rabbitmq-server package does not appear to be installed on this server."
fi fi
# restart apache
invoke-rc.d apache2 restart
# fix the Liquidsoap symlink if it doesn't point to standard location # fix the Liquidsoap symlink if it doesn't point to standard location
if [ -h /usr/bin/airtime-liquidsoap ]; then if [ -h /usr/bin/airtime-liquidsoap ]; then
SYMLINK_TARGET=`readlink /usr/bin/airtime-liquidsoap` SYMLINK_TARGET=`readlink /usr/bin/airtime-liquidsoap`
@ -214,8 +225,12 @@ case "$1" in
echo "Reconfiguration complete." echo "Reconfiguration complete."
else else
if [ -n "$OLDVERSION" ] && [[ "${OLDVERSION:0:3}" < "1.9" ]]; then if [ -n "$OLDVERSION" ] && [[ "${OLDVERSION:0:3}" < "2.1" ]]; then
echo "Upgrades from Airtime versions before 1.9.0 are not supported. Please back up your files and perform a clean install." echo "Upgrades from Airtime versions before 2.1.0 are not supported. Please back up your files and perform a clean install."
elif [ "${APACHESETUP}" == "no thanks" ]; then
echo "Please run the ${tmpdir}/install_minimal/airtime-install script after you have set up the web server."
else else
mkdir -p /var/log/airtime mkdir -p /var/log/airtime

View file

@ -28,6 +28,7 @@ stop () {
# Send TERM after 5 seconds, wait at most 30 seconds. # Send TERM after 5 seconds, wait at most 30 seconds.
start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE
rm -f $PIDFILE rm -f $PIDFILE
sleep 4
} }
start_no_monit() { start_no_monit() {

View file

@ -42,13 +42,13 @@ queue = amplify(1., override="replay_gain", queue)
# the crossfade function controls fade in/out # the crossfade function controls fade in/out
queue = crossfade_airtime(queue) queue = crossfade_airtime(queue)
queue = on_metadata(notify, queue) queue = on_metadata(notify, queue)
queue = map_metadata(update=false, append_title, queue)
output.dummy(fallible=true, queue) output.dummy(fallible=true, queue)
http = input.http_restart(id="http") http = input.http_restart(id="http")
http = cross_http(http_input_id="http",http) http = cross_http(http_input_id="http",http)
output.dummy(fallible=true, http) output.dummy(fallible=true, http)
stream_queue = http_fallback(http_input_id="http", http=http, default=queue) stream_queue = http_fallback(http_input_id="http", http=http, default=queue)
stream_queue = map_metadata(update=false, append_title, stream_queue)
ignore(output.dummy(stream_queue, fallible=true)) ignore(output.dummy(stream_queue, fallible=true))

View file

@ -534,7 +534,7 @@ class PypoFetch(Thread):
#check if this file is opened (sometimes Liquidsoap is still #check if this file is opened (sometimes Liquidsoap is still
#playing the file due to our knowledge of the track length #playing the file due to our knowledge of the track length
#being incorrect!) #being incorrect!)
if not self.is_file_opened(): if not self.is_file_opened(path):
os.remove(path) os.remove(path)
except Exception, e: except Exception, e:
self.logger.error(e) self.logger.error(e)

View file

@ -372,7 +372,17 @@ class PypoPush(Thread):
first_link = chain[0] first_link = chain[0]
self.modify_cue_point(first_link) self.modify_cue_point(first_link)
if float(first_link['cue_in']) >= float(first_link['cue_out']):
#ATM, we should never have an exception here. However in the future, it
#would be nice to allow cue_out to be None which would then allow us to
#fallback to the length of the track as the end point.
try:
end = first_link['cue_out']
except TypeError:
#cue_out is type None
end = first_link['length']
if float(first_link['cue_in']) >= float(end):
chain = chain [1:] chain = chain [1:]
return chain return chain
@ -498,6 +508,11 @@ class PypoPush(Thread):
self.logger.debug(msg) self.logger.debug(msg)
tn.write(msg) tn.write(msg)
show_name = media_item['show_name']
msg = 'vars.show_name %s\n' % show_name.encode('utf-8')
tn.write(msg)
self.logger.debug(msg)
tn.write("exit\n") tn.write("exit\n")
self.logger.debug(tn.read_all()) self.logger.debug(tn.read_all())

View file

@ -99,10 +99,13 @@ class AirtimeCheck {
{ {
$headerInfo = get_headers("http://$p_baseUrl:$p_basePort",1); $headerInfo = get_headers("http://$p_baseUrl:$p_basePort",1);
if (!isset($headerInfo['Server'][0])) if (!isset($headerInfo['Server'][0])) {
return self::UNKNOWN; return self::UNKNOWN;
else } else if (is_array($headerInfo['Server'])) {
return $headerInfo['Server'][0]; return $headerInfo['Server'][0];
} else {
return $headerInfo['Server'];
}
} }
public static function GetStatus($p_baseUrl, $p_basePort, $p_baseDir, $p_apiKey){ public static function GetStatus($p_baseUrl, $p_basePort, $p_baseDir, $p_apiKey){