From 7927a035be85367b79d053e54a5a3a473790259a Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 17 Dec 2014 16:01:30 +0000 Subject: [PATCH 1/4] Bring snapshots up to date with current packaging --- debian/changelog | 55 +++++++- debian/compat | 2 +- debian/control | 33 +++-- debian/copyright | 5 +- debian/etc/airtime.ini | 2 + debian/etc/apache.vhost.tpl | 24 +++- debian/etc/apache24.vhost.tpl | 37 +++++ debian/install | 2 +- debian/po/fr.po | 252 ++++++++++++++++++++++++++++++++++ debian/po/templates.pot | 14 +- debian/postinst | 55 ++++++-- gen-snapshot.sh | 6 +- 12 files changed, 449 insertions(+), 38 deletions(-) create mode 100644 debian/etc/apache24.vhost.tpl create mode 100644 debian/po/fr.po diff --git a/debian/changelog b/debian/changelog index 31d2f92ca..7b8a32bc3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,59 @@ -airtime (2.5.1-1) unstable; urgency=low +airtime (2.5.2-1) unstable; urgency=low * Nightly development snapshot of Airtime 2.5.x series - -- Daniel James Thu, 24 Oct 2013 11:04:56 +0100 + -- Daniel James Wed, 17 Dec 2014 12:06:33 +0000 + +airtime (2.5.1-6) unstable; urgency=low + + * Newer Ubuntu distros use a real directory instead of a symlink for + /etc/php5/apache2/conf.d/ - thanks Mathieu + + -- Daniel James Wed, 17 Dec 2014 12:06:32 +0000 + +airtime (2.5.1-5) unstable; urgency=low + + * Don't set SSL compression to off, it is now the default, for backwards + compatibility with versions of Apache before 2.2.24 or 2.4.3 + + -- Daniel James Tue, 16 Dec 2014 16:42:26 +0000 + +airtime (2.5.1-4) unstable; urgency=low + + * Fix installation of Apache 2.4 file + * Disable SSLv3 and compression by default + + -- Daniel James Thu, 06 Nov 2014 15:15:21 +0000 + +airtime (2.5.1-3) unstable; urgency=low + + * Don't force https access in case of SSL issues + + -- Daniel James Fri, 18 Jul 2014 10:04:30 +0100 + +airtime (2.5.1-2) unstable; urgency=low + + * Upstream 2.5.1a security release + + -- Daniel James Tue, 15 Jul 2014 11:14:01 +0100 + +airtime (2.5.1-1) unstable; urgency=low + + * Upstream 2.5.1-ga release + + -- Daniel James Tue, 17 Dec 2013 11:02:35 +0000 + +airtime (2.5.0-3) unstable; urgency=low + + * Added dependency on php5-json for newer distros + + -- Daniel James Tue, 05 Nov 2013 13:33:10 +0000 + +airtime (2.5.0-2) unstable; urgency=low + + * Fixed error in upgrade handling + + -- Daniel James Thu, 24 Oct 2013 11:17:42 +0100 airtime (2.5.0-1) unstable; urgency=low diff --git a/debian/compat b/debian/compat index 7f8f011eb..ec635144f 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index 92479d53b..20051bfa3 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: airtime Section: web Priority: optional Maintainer: Daniel James -Build-Depends: debhelper (>= 7.0.50~), po-debconf +Build-Depends: debhelper (>= 9.20120909), po-debconf Standards-Version: 3.9.3 Homepage: http://www.sourcefabric.org/en/airtime/ @@ -16,25 +16,38 @@ Depends: apache2, flac, gzip (>= 1.3.12), libapache2-mod-php5, - libcamomile-ocaml-data, liquidsoap (>= 1.1.1~), + liquidsoap-plugin-alsa, + liquidsoap-plugin-ao, + liquidsoap-plugin-faad, + liquidsoap-plugin-flac, + liquidsoap-plugin-icecast, + liquidsoap-plugin-lame, + liquidsoap-plugin-mad, + liquidsoap-plugin-ogg, + liquidsoap-plugin-opus, + liquidsoap-plugin-portaudio, + liquidsoap-plugin-pulseaudio, + liquidsoap-plugin-taglib, + liquidsoap-plugin-voaacenc, + liquidsoap-plugin-vorbis, locales, lsof, monit, mp3gain, multitail, - odbc-postgresql, - patch, php5-cli, php5-curl, - php-db, php5-gd, - php-pear, + php5-json, php5-pgsql, + php-apc, + php-pear, pwgen, python, rabbitmq-server, silan (>= 0.3.1~), + ssl-cert, sudo, sysv-rc, tar (>= 1.22), @@ -42,10 +55,10 @@ Depends: apache2, vorbisgain, vorbis-tools, zendframework | libzend-framework-php, - ${misc:Depends} -Recommends: icecast2, php-apc -Suggests: airtime-audio-samples, - alsa-utils + ${misc:Depends}, + ${perl:Depends} +Recommends: icecast2 +Suggests: airtime-audio-samples, alsa-utils Description: open broadcast software for scheduling and station management. Airtime is an open source application that provides remote automation of a broadcast station. diff --git a/debian/copyright b/debian/copyright index 80d81c352..2d7dd13b7 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,11 +5,11 @@ Source: http://sourceforge.net/projects/airtime/files/ Files: * Copyright: - 2010-2012 Sourcefabric o.p.s + 2010-2014 Sourcefabric z.ú. 2004-2009 Media Development Loan Fund License: GPL-3 -Files: airtime/python_apps/pypo/* +Files: python_apps/pypo/* Copyright: Jonas Ohrstrom Paul Baranowski @@ -51,6 +51,7 @@ License: Expat Files: debian/* Copyright: + 2013-2014 Daniel James 2012 Alessio Treglia 2011 Robin Gareus License: GPL-2+ diff --git a/debian/etc/airtime.ini b/debian/etc/airtime.ini index e35f600b0..c75cf0025 100644 --- a/debian/etc/airtime.ini +++ b/debian/etc/airtime.ini @@ -3,3 +3,5 @@ memory_limit = 512M magic_quotes_gpc = Off file_uploads = On upload_tmp_dir = /tmp +apc.write_lock = 1 +apc.slam_defense = 0 diff --git a/debian/etc/apache.vhost.tpl b/debian/etc/apache.vhost.tpl index 3d7334107..9ee53b3e1 100644 --- a/debian/etc/apache.vhost.tpl +++ b/debian/etc/apache.vhost.tpl @@ -1,4 +1,10 @@ - + + SSLEngine on + SSLProtocol All -SSLv2 -SSLv3 + SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem + SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key + Header always set Strict-Transport-Security "max-age=31536000" + ServerName __SERVER_NAME__ #ServerAlias www.example.com @@ -7,6 +13,22 @@ DocumentRoot /usr/share/airtime/public DirectoryIndex index.php + + Options -Indexes FollowSymLinks MultiViews + AllowOverride all + Order allow,deny + Allow from all + + + + + ServerName __SERVER_NAME__ + + ServerAdmin __SERVER_ADMIN__ + + DocumentRoot /usr/share/airtime/public + Redirect permanent /login https://__SERVER_NAME__/login + SetEnv APPLICATION_ENV "production" diff --git a/debian/etc/apache24.vhost.tpl b/debian/etc/apache24.vhost.tpl new file mode 100644 index 000000000..b1a972b53 --- /dev/null +++ b/debian/etc/apache24.vhost.tpl @@ -0,0 +1,37 @@ + + SSLEngine on + SSLProtocol all -SSLv2 + SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem + SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key + Header always set Strict-Transport-Security "max-age=31536000" + + ServerName __SERVER_NAME__ + #ServerAlias www.example.com + + ServerAdmin __SERVER_ADMIN__ + + DocumentRoot /usr/share/airtime/public + DirectoryIndex index.php + + + AllowOverride all + Require all granted + + + + + ServerName __SERVER_NAME__ + + ServerAdmin __SERVER_ADMIN__ + + DocumentRoot /usr/share/airtime/public + DirectoryIndex index.php + Redirect permanent /login https://__SERVER_NAME__/login + + SetEnv APPLICATION_ENV "production" + + + AllowOverride All + Require all granted + + diff --git a/debian/install b/debian/install index 763300c99..a9ef74bbd 100644 --- a/debian/install +++ b/debian/install @@ -5,9 +5,9 @@ airtime/utils var/lib/airtime/tmp/ airtime/widgets usr/share/doc/airtime/examples/ -debian/etc/apache.conf /etc/airtime/ debian/etc/airtime.ini /etc/airtime/ debian/etc/apache.vhost.tpl /etc/airtime/ +debian/etc/apache24.vhost.tpl /etc/airtime/ debian/usr/bin/airtime-launch-browser /usr/bin/ debian/usr/share/applications/airtime.desktop /usr/share/applications/ diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 000000000..f1edb9c08 --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,252 @@ +# Debconf translation strings for Airtime. +# Copyright (C) 2012 Airtime contributors +# This file is distributed under the same license as the Airtime package. +# +# Translators: +# AlbertFR , 2014 +msgid "" +msgstr "" +"Project-Id-Version: Airtime\n" +"Report-Msgid-Bugs-To: contact@sourcefabric.org\n" +"POT-Creation-Date: 2012-07-05 16:49+0100\n" +"PO-Revision-Date: 2014-11-11 17:40+0000\n" +"Last-Translator: AlbertFR \n" +"Language-Team: French (France) (http://www.transifex.com/projects/p/airtime/language/fr_FR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr_FR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. Type: select +#. Choices +#: ../templates:1001 +msgid "dedicated v-host" +msgstr "v-host dédié" + +#. Type: select +#. Choices +#: ../templates:1001 +msgid "no thanks" +msgstr "non merci" + +#. Type: select +#. Description +#: ../templates:1002 +msgid "Create apache2 config:" +msgstr "Création de la configuration d'Apache2 :" + +#. Type: select +#. Description +#: ../templates:1002 +msgid "" +"This setup script can perform Apache web server configuration so that you " +"can connect to Airtime directly after this installation." +msgstr "Ce script d'installation peut effectuer la configuration du serveur Web Apache de sorte que vous pouvez vous connecter à Airtime directement après cette installation." + +#. Type: select +#. Description +#: ../templates:1002 +msgid "" +"Production systems should choose \"dedicated v-host\". This option will ask " +"for a server hostname (FQDN) and will create a minimal Apache virtual host " +"configuration that you can adapt." +msgstr "Les systèmes en production doivent choisir \"dedicated v-host\". Cette option vous demandera un nom d'hôte pour le du serveur (FQDN) et créera une configuration d'hôte virtuel Apache minimal que vous pourrez adapter." + +#. Type: select +#. Description +#: ../templates:1002 +msgid "" +"\"no, thanks\": no problem. You're welcome to set it up however you like. " +"Note that the files in /etc/airtime/ may come in handy doing so." +msgstr "\"Non, merci\": pas de problème. Vous êtes invités à configurer comme bon vous semble. Notez que les fichiers dans /etc/airtime/ peuvent être utiles à modifier..." + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "remove default" +msgstr "Retirer défaut" + +#. Type: select +#. Choices +#: ../templates:2001 +msgid "no change" +msgstr "aucun changement" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "Remove 000-default apache config:" +msgstr "Supprimer 000-default de la configuration d'Apache :" + +#. Type: select +#. Description +#: ../templates:2002 +msgid "" +"By default the Apache webserver is configured to send all virtual hosts to " +"the /var/www/ directory." +msgstr "Par défaut, le serveur Web Apache est configuré pour envoyer tous les hôtes virtuels vers le répertoire / var / www /." + +#. Type: select +#. Description +#: ../templates:2002 +msgid "" +"This option will invoke `sudo a2dissite default` and is recommended when " +"using a virtual host for Airtime." +msgstr "Cette option invoque `sudo a2dissite default` et est recommandé lorsque vous utilisez un hôte virtuel pour Airtime." + +#. Type: string +#. Description +#: ../templates:3001 +msgid "FQDN - Apache virtual host ServerName:" +msgstr "Nom de domaine complet - Nom de l'hôte virtuel du serveur Apache :" + +#. Type: string +#. Description +#: ../templates:3001 +msgid "" +"Enter the main hostname of the web server. The DNS of this name must resolve" +" to the Apache server running on this machine." +msgstr "Entrez le nom d'hôte principal du serveur web. Le DNS de ce nom doit être résolu par le serveur web Apache en cours d'exécution sur cette machine." + +#. Type: string +#. Description +#: ../templates:3001 +msgid "e.g. \"example.com\" or \"www.example.com\" (without the quotes)" +msgstr "ex. \"exemple.fr\" ou \"www.exemple.fr\" (sans les guillemets) " + +#. Type: string +#. Description +#: ../templates:3001 +msgid "" +"You can customize /etc/apache2/sites-enabled/airtime.vhost afterward and add" +" ServerAliases and further custom configuration." +msgstr "Vous pouvez personnaliser /etc/apache2/sites-enabled/airtime.vhost et ajouter des ServerAliases et autres configurations personnalisées." + +#. Type: string +#. Description +#: ../templates:4001 +msgid "Email of the ServerAdmin:" +msgstr "Courriel de l'administrateur du serveur :" + +#. Type: string +#. Description +#: ../templates:4001 +msgid "An email address is required for the virtual host configuration." +msgstr "Une adresse de courriel est requise pour la configuration de l'hôte virtuel." + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "Enable Icecast2 and set passwords automatically?" +msgstr "Activer Icecast2 et mettre les mots de passe automatiquement ?" + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "" +"This option enables a local Icecast streaming media server to start on boot," +" and configures passwords for both the Icecast server and Airtime." +msgstr "Cette option permet à un serveur Icecast local de s'activer au démarrage, et configure les mots de passe pour le serveur Icecast et Airtime." + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "" +"Note: these settings are here for convenience only. Strictly speaking they " +"should be done during Icecast installation - not Airtime installation." +msgstr "Remarque : ces paramètres sont ici pour plus de commodité seulement. Strictement parlant, ils doivent être effectués lors de l'installation d'Icecast - pas pendant l'installation d'Airtime." + +#. Type: boolean +#. Description +#: ../templates:5001 +msgid "" +"If you wish to set Icecast server passwords manually, you should answer No " +"here." +msgstr "Si vous souhaitez saisir manuellement les mots de passe du serveur Icecast, vous devez répondre Non ici." + +#. Type: string +#. Description +#: ../templates:6001 +msgid "Icecast2 hostname:" +msgstr "Nom de l'hote d'Icecast2 :" + +#. Type: string +#. Description +#: ../templates:6001 +msgid "" +"Specify the hostname of the Icecast server. Depending on your setup, this " +"might be the same as the Airtime ServerName. For testing purposes, you can " +"use the default of 'localhost'." +msgstr "Spécifier le nom d'hôte du serveur Icecast. Dépend de vos réglages, celui-ci peut être le même que le nom du serveur Airtime. A des fins de tests, vous pouvez utiliser par défaut 'localhost'." + +#. Type: string +#. Description +#: ../templates:7001 +msgid "Icecast2 Source Password:" +msgstr "Mot de passe Source Icecast 2 : " + +#. Type: string +#. Description +#: ../templates:7001 +msgid "Specify a password to send A/V sources to Icecast" +msgstr "Spécifier un mot de passe pour envoyer les sources A/V à Icecast" + +#. Type: string +#. Description +#: ../templates:8001 +msgid "Icecast2 Relay Password:" +msgstr "Mot de passe Relai d'Icecast2 :" + +#. Type: string +#. Description +#: ../templates:8001 +msgid "" +"Specify a password for stream relay access. This is not needed by Airtime, " +"however you should change it from the default to lock down your system." +msgstr "Indiquez un mot de passe pour l'accès flux relais. Ce n'est pas nécessaire par Airtime, mais vous pouvez changer la valeur par défaut pour verrouiller votre système." + +#. Type: string +#. Description +#: ../templates:9001 +msgid "Icecast2 Admin Password:" +msgstr "Mot de passe administrateur Icecast2 :" + +#. Type: string +#. Description +#: ../templates:9001 +msgid "" +"Specify the admin password for Icecast. You can access icecast2's admin " +"interface via http://localhost:8000/ - and both monitor connection as well " +"as block users." +msgstr "Spécifiez le mot de passe admin pour Icecast. Vous pouvez accéder à l'interface d'administration de icecast2 via http://localhost:8000/ - et surveiller les utilisateurs et flux." + +#. Type: string +#. Description +#: ../templates:10001 +msgid "Airtime Admin Password:" +msgstr "Mot de passe administrateur Airtime :" + +#. Type: string +#. Description +#: ../templates:10001 +msgid "" +"Specify a secure admin password for Airtime. You can access the Airtime " +"administration interface at http://localhost/ to set up other user accounts," +" upload media, create playlists and schedule shows." +msgstr "Indiquez un mot de passe admin sécurisé pour Airtime. Vous pouvez accéder à l'interface d'administration d'Airtime à l'adresse http://localhost/ pour configurer d'autres comptes d'utilisateurs, télécharger des médias, créer des playlists et gérer vos horaires d'émissions." + +#. Type: string +#. Description +#: ../templates:11001 +msgid "Airtime Storage Directory:" +msgstr "Dossier de stockage Airtime :" + +#. Type: string +#. Description +#: ../templates:11001 +msgid "" +"Specify the main storage path which Airtime will use, ending with a slash. " +"You can also specify watched folders in the Airtime administration " +"interface." +msgstr "Indiquez le chemin de stockage principal que va utiliser d'Airtime, se terminant par une barre oblique. Vous pouvez également spécifier des dossiers surveillés dans l'interface d'administration d'Airtime." diff --git a/debian/po/templates.pot b/debian/po/templates.pot index 6458b85ac..7e74b96f7 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -1,17 +1,17 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Debconf translation strings for Airtime. +# Copyright (C) 2012 Airtime contributors +# This file is distributed under the same license as the Airtime package. +# Daniel James , 2012. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: airtime@packages.debian.org\n" +"Project-Id-Version: Airtime 2.5.1\n" +"Report-Msgid-Bugs-To: contact@sourcefabric.org\n" "POT-Creation-Date: 2012-07-05 16:49+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: Airtime Localization \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/debian/postinst b/debian/postinst index f57c972de..a28c0252d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -12,11 +12,12 @@ fi wwwdir="/usr/share/airtime" tmpdir="/var/lib/airtime/tmp" configdir="/etc/airtime" -includefile="${configdir}/apache.conf" a2tplfile="${configdir}/apache.vhost.tpl" +a24tplfile="${configdir}/apache24.vhost.tpl" phpinifile="${configdir}/airtime.ini" OLDVERSION="$2" NEWVERSION="2.5.1" +POSTGRESRUNNING=$(invoke-rc.d postgresql status | grep main || true) case "$1" in configure|reconfigure) @@ -55,11 +56,23 @@ case "$1" in db_get airtime/apache-serveradmin SA=$RET + # create the config directory if it doesn't exist if [ ! -d /etc/$webserver/sites-available/ ]; then install -d -m755 /etc/$webserver/sites-available/ fi - sed -e "s/__SERVER_ADMIN__/${SA}/;s/__SERVER_NAME__/${SN}/" \ + + # check for apache version 2.4, virtualhost syntax is different + APACHEVERSION=$(dpkg-query -f '${Version}' -W 'apache2' | cut -c 1-3) + + if [ "$APACHEVERSION" = "2.4" ] ; then + echo "Apache 2.4 detected, using newer access configuration..." + sed -e "s/__SERVER_ADMIN__/${SA}/g;s/__SERVER_NAME__/${SN}/g" \ + ${a24tplfile} > /etc/$webserver/sites-available/airtime-vhost.conf + + else + sed -e "s/__SERVER_ADMIN__/${SA}/g;s/__SERVER_NAME__/${SN}/g" \ ${a2tplfile} > /etc/$webserver/sites-available/airtime-vhost.conf + fi command -v a2ensite > /dev/null RETVAL=$? @@ -83,11 +96,11 @@ case "$1" in fi fi - # enable the rewrite module + # enable the alias, headers, rewrite and ssl modules command -v a2enmod > /dev/null RETVAL=$? if [ $RETVAL -eq 0 ]; then - a2enmod rewrite + a2enmod alias headers rewrite ssl fi # remove the default site, if requested to @@ -105,10 +118,21 @@ case "$1" in if [ ! -d /etc/$php/conf.d/ ]; then install -d -m755 /etc/$php/conf.d/ fi + + # Newer Ubuntu distros use a real directory instead of a symlink for /etc/php5/apache2/conf.d/ - thanks Mathieu! + if [ ! -d /etc/$php/$webserver/conf.d/ ]; then + install -d -m755 /etc/$php/$webserver/conf.d/ + fi + if [ ! -e /etc/$php/conf.d/airtime.ini ]; then ln -s ${phpinifile} /etc/$php/conf.d/airtime.ini fi + # Newer style configuration + if [ ! -e /etc/$php/$webserver/conf.d/airtime.ini ]; then + ln -s ${phpinifile} /etc/$php/$webserver/conf.d/airtime.ini + fi + # restart apache invoke-rc.d apache2 restart fi @@ -228,15 +252,20 @@ case "$1" in # don't run airtime-install if the user is doing a dpkg-reconfigure if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ] ; then echo "Reconfiguration complete." - else + + # exit here if the current install is too old to be upgraded + elif [ -n "$OLDVERSION" ] && [[ "${OLDVERSION:0:3}" < "2.3" ]]; then + echo "Upgrades from Airtime versions before 2.3.0 are not supported. Please back up your files and perform a clean install." - if [ -n "$OLDVERSION" ] && [[ "${OLDVERSION:0:3}" < "2.1" ]]; then - 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 + # has the user chosen not to configure the web server? If so, don't run airtime-install + elif [ "${APACHESETUP}" == "no thanks" ]; then echo "Please run the ${tmpdir}/install_minimal/airtime-install script with the -d option after you have set up the web server." - else + # should postgres not be running yet, don't run airtime-install + elif [ -z "${POSTGRESRUNNING}" ]; then + echo "Please run the ${tmpdir}/install_minimal/airtime-install script with the -d option after you have started the database server." + + else mkdir -p /var/log/airtime cd $tmpdir/install_minimal/ @@ -244,6 +273,11 @@ case "$1" in if [ "${OLDVERSION:0:5}" == "${NEWVERSION}" ] ; then echo "Reinstallation detected..." echo | ./airtime-install --disable-deb-check -rp 2> /var/log/airtime/reinstallation-errors.log + + if [ -f /etc/init.d/icecast2 ] ; then + invoke-rc.d icecast2 restart || true + fi + else ./airtime-install --disable-deb-check 2> /var/log/airtime/installation-errors.log @@ -254,7 +288,6 @@ case "$1" in if test -x /usr/bin/update-menus; then update-menus; fi - fi fi ;; diff --git a/gen-snapshot.sh b/gen-snapshot.sh index bb96ddd53..b0c39a4ed 100755 --- a/gen-snapshot.sh +++ b/gen-snapshot.sh @@ -2,7 +2,7 @@ # Script for generating nightly Airtime snapshot packages # Run from the directory containg the files checked out from git -VERSION=2.5.1~$(date "+%Y%m%d") +VERSION=2.5.2~$(date "+%Y%m%d") BUILDDEST=/tmp/airtime-${VERSION}/ DEBDIR=`pwd`/debian @@ -23,9 +23,9 @@ cd ${BUILDDEST} || exit # Set the version of the snapshot package -sed -i "1s:(2.5.1-1):(${VERSION}):g" debian/changelog +sed -i "1s:(2.5.2-1):(${VERSION}):g" debian/changelog -# FIXES for 2.5.1 ############# +# FIXES for 2.5.2 ############# # these are all moved to debian/copyright rm airtime/python_apps/pypo/LICENSE From c614f4d711fb7edf737e3770819c2ad16cf3ecce Mon Sep 17 00:00:00 2001 From: localizer Date: Thu, 15 Jan 2015 11:12:14 +0000 Subject: [PATCH 2/4] updated translation resources --- airtime_mvc/locale/az/LC_MESSAGES/airtime.mo | Bin 474 -> 474 bytes airtime_mvc/locale/az/LC_MESSAGES/airtime.po | 2 +- .../locale/de_AT/LC_MESSAGES/airtime.mo | Bin 63465 -> 63465 bytes .../locale/de_AT/LC_MESSAGES/airtime.po | 2 +- .../locale/en_GB/LC_MESSAGES/airtime.mo | Bin 61416 -> 61416 bytes .../locale/en_GB/LC_MESSAGES/airtime.po | 2 +- .../locale/fr_FR/LC_MESSAGES/airtime.mo | Bin 68579 -> 68579 bytes .../locale/fr_FR/LC_MESSAGES/airtime.po | 2 +- .../locale/hy_AM/LC_MESSAGES/airtime.mo | Bin 487 -> 487 bytes .../locale/hy_AM/LC_MESSAGES/airtime.po | 2 +- airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo | Bin 464 -> 464 bytes airtime_mvc/locale/ka/LC_MESSAGES/airtime.po | 2 +- .../locale/pt_BR/LC_MESSAGES/airtime.mo | Bin 57870 -> 57870 bytes .../locale/pt_BR/LC_MESSAGES/airtime.po | 2 +- 14 files changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/locale/az/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/az/LC_MESSAGES/airtime.mo index 6785de6785149cddaf880a948303f9c10017b49c..b09021a2cd7ca24e2c43ed84e510451d25726d9a 100644 GIT binary patch delta 24 fcmcb`e2aO)Dqd4v14CUyQw2jqD?`JL+m#ssV4(*B delta 24 fcmcb`e2aO)Dqa&^LnB=SQw2i\n" "Language-Team: Azerbaijani (http://www.transifex.com/projects/p/airtime/language/az/)\n" "MIME-Version: 1.0\n" diff --git a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo index 76942ed77169f8cb72764aaff613ab588c18a207..e07f4df00d62c69e88f6918ad5c9bef1c4b42c01 100644 GIT binary patch delta 28 kcmaF)p84f_<_+&A^P1`!80s3DDi|7C85(Z>J^5WS0JvHU`v3p{ delta 28 kcmaF)p84f_<_+&A^P1=y8tEFCDi|7A85?c>J^5WS0Jvof{Qv*} diff --git a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po index d9ad52eea..dea02c8d1 100644 --- a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Airtime\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-11-13 13:55-0500\n" -"PO-Revision-Date: 2014-12-05 10:32+0000\n" +"PO-Revision-Date: 2015-01-15 11:11+0000\n" "Last-Translator: Daniel James \n" "Language-Team: German (Austria) (http://www.transifex.com/projects/p/airtime/language/de_AT/)\n" "MIME-Version: 1.0\n" diff --git a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo index 4ca8d6170c591ca8352b180d8743e6454998c90c..9e6d68da7a2bd014a4d42e6073f3d529c265e89e 100644 GIT binary patch delta 28 kcmaEHpZUdo<_$TscujQ;40R1n6$}ln3=KC|&dLu30H@drRsaA1 delta 28 kcmaEHpZUdo<_$TscujN-jdTr66$}lmjEy!|&dLu30H@;$SO5S3 diff --git a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po index c17dfe604..753cb7f96 100644 --- a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Airtime\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-11-13 13:55-0500\n" -"PO-Revision-Date: 2014-12-05 10:32+0000\n" +"PO-Revision-Date: 2015-01-15 11:11+0000\n" "Last-Translator: Daniel James \n" "Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/airtime/language/en_GB/)\n" "MIME-Version: 1.0\n" diff --git a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.mo index 6a2e72329569abb395919fa2debea10678ec0108..c07671388ea1364e46449220814eae90933d33e1 100644 GIT binary patch delta 17 ZcmaDno#pX#mJQ{zm<$a!SI){R1OQ362g3jW delta 17 ZcmaDno#pX#mJQ{zm<%j8SI){R1OQ3l2g(2d diff --git a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po index ba2c9278b..26709555e 100644 --- a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Airtime\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-11-13 13:55-0500\n" -"PO-Revision-Date: 2014-12-23 10:09+0000\n" +"PO-Revision-Date: 2014-12-23 10:11+0000\n" "Last-Translator: AlbertFR \n" "Language-Team: French (France) (http://www.transifex.com/projects/p/airtime/language/fr_FR/)\n" "MIME-Version: 1.0\n" diff --git a/airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo index 114eb85d3a4f4bb0562bd40b8d65cead176f84ef..76a62ff71e4bd1b49eb96584e1ba089694036b22 100644 GIT binary patch delta 24 fcmaFP{G55hDqd4v14CUyQw2jqD?`JL+YJ~2V-W`_ delta 24 fcmaFP{G55hDqa&^LnB=SQw2i\n" "Language-Team: Armenian (Armenia) (http://www.transifex.com/projects/p/airtime/language/hy_AM/)\n" "MIME-Version: 1.0\n" diff --git a/airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo index 1cd4bb1acc82b4cd0c1fbbd2905c7f1a2fb944b6..6411fcaf96f5f070c16601edcee0a9c4c00ee534 100644 GIT binary patch delta 24 fcmcb>e1UnwDqd4v14CUyQw2jqD?`JL+a(zRUcme1UnwDqa&^LnB=SQw2i\n" "Language-Team: Georgian (http://www.transifex.com/projects/p/airtime/language/ka/)\n" "MIME-Version: 1.0\n" diff --git a/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo index abd94d09de69dd70d843750bc615c04bec577c82..8267a2179c9002fa86dd0f88c31914aa714f8b1f 100644 GIT binary patch delta 28 jcmeA>!rXU+d4p>Quc@wqp{}8+f}x?6q2cDBjy;h8iv|fx delta 28 jcmeA>!rXU+d4p>QuZgaqk* Date: Thu, 15 Jan 2015 16:33:03 +0000 Subject: [PATCH 3/4] Fix link to user manual --- README | 2 +- airtime_mvc/application/configs/constants.php | 2 +- airtime_mvc/application/configs/navigation.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 0c003c7e7..d83dbde3b 100644 --- a/README +++ b/README @@ -43,7 +43,7 @@ For installation from git on Debian wheezy, run: Quick links to our resources ---------------------------- -User manuals: http://www.sourcefabric.org/en/airtime/manuals/ +User manual: http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/ Forums and mailing lists: http://forum.sourcefabric.org Bug tracker: http://dev.sourcefabric.org Source code: http://github.com/sourcefabric/Airtime diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 7b27bc891..5ecf5d21e 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -11,7 +11,7 @@ define('COMPANY_SITE_URL' , 'http://sourcefabric.org/'); define('WHOS_USING_URL' , 'http://sourcefabric.org/en/airtime/whosusing'); define('TERMS_AND_CONDITIONS_URL' , 'http://www.sourcefabric.org/en/about/policy/'); define('PRIVACY_POLICY_URL' , 'http://www.sourcefabric.org/en/about/policy/'); -define('USER_MANUAL_URL' , 'http://www.sourcefabric.org/en/airtime/manuals/'); +define('USER_MANUAL_URL' , 'http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/'); define('LICENSE_VERSION' , 'GNU AGPL v.3'); define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.html'); diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index f3149f146..21a603900 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -123,7 +123,7 @@ $pages = array( ), array( 'label' => _('User Manual'), - 'uri' => "http://www.sourcefabric.org/en/airtime/manuals/", + 'uri' => "http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/", 'target' => "_blank" ), array( From f9bf71a34922b172a1c57c4daf3b15de47ca12b0 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 15 Jan 2015 16:28:18 -0500 Subject: [PATCH 4/4] Moved the Station Logo field to GeneralPreferences, and stopped using AJAX on the general prefs form --- .../controllers/PreferenceController.php | 31 ++++++++----------- .../application/forms/GeneralPreferences.php | 15 +++++++++ airtime_mvc/application/forms/Preferences.php | 10 ++++-- .../application/forms/SupportSettings.php | 13 -------- .../views/scripts/form/preferences.phtml | 4 ++- .../scripts/form/preferences_general.phtml | 4 +++ .../views/scripts/form/support-setting.phtml | 20 ------------ .../views/scripts/preference/index.phtml | 9 +++--- airtime_mvc/public/css/styles.css | 1 + .../js/airtime/preferences/preferences.js | 5 +-- 10 files changed, 50 insertions(+), 62 deletions(-) diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 84718c66d..767fd3b62 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -34,15 +34,11 @@ class PreferenceController extends Zend_Controller_Action $form = new Application_Form_Preferences(); $values = array(); - if ($request->isPost()) { - $params = $request->getPost(); - $postData = explode('&', $params['data']); - foreach($postData as $k=>$v) { - $v = explode('=', $v); - $values[$v[0]] = urldecode($v[1]); - } - if ($form->isValid($values)) { + if ($request->isPost()) { + $values = $request->getPost(); + if ($form->isValid($values)) + { Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view); Application_Model_Preference::SetDefaultCrossfadeDuration($values["stationDefaultCrossfadeDuration"]); Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]); @@ -52,6 +48,11 @@ class PreferenceController extends Zend_Controller_Action Application_Model_Preference::SetDefaultTimezone($values["timezone"]); Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]); + $logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo'); + $logoUploadElement->receive(); + $imagePath = $logoUploadElement->getFileName(); + Application_Model_Preference::SetStationLogo($imagePath); + Application_Model_Preference::SetEnableSystemEmail($values["enableSystemEmail"]); Application_Model_Preference::SetSystemEmail($values["systemEmail"]); Application_Model_Preference::SetMailServerConfigured($values["configureMailServer"]); @@ -73,12 +74,14 @@ class PreferenceController extends Zend_Controller_Action $this->view->statusMsg = "
". _("Preferences updated.")."
"; $this->view->form = $form; - $this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml'))); + //$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml'))); } else { $this->view->form = $form; - $this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml'))); + //$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml'))); } } + $this->view->logoImg = Application_Model_Preference::GetStationLogo(); + $this->view->form = $form; } @@ -111,13 +114,9 @@ class PreferenceController extends Zend_Controller_Action Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]); Application_Model_Preference::SetPublicise($values["Publicise"]); - $form->Logo->receive(); - $imagePath = $form->Logo->getFileName(); - Application_Model_Preference::SetStationCountry($values["Country"]); Application_Model_Preference::SetStationCity($values["City"]); Application_Model_Preference::SetStationDescription($values["Description"]); - Application_Model_Preference::SetStationLogo($imagePath); if (isset($values["Privacy"])) { Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]); } @@ -125,10 +124,6 @@ class PreferenceController extends Zend_Controller_Action $this->view->statusMsg = "
"._("Support setting updated.")."
"; } - $logo = Application_Model_Preference::GetStationLogo(); - if ($logo) { - $this->view->logoImg = $logo; - } $privacyChecked = false; if (Application_Model_Preference::GetPrivacyPolicyCheck() == 1) { $privacyChecked = true; diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index d956b8d1e..52f14332a 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -1,11 +1,14 @@ setEnctype(Zend_Form::ENCTYPE_MULTIPART); $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator(); $rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9); @@ -34,6 +37,18 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm $stationDescription->setAttrib('rows', 4); $this->addElement($stationDescription); + // Station Logo + $stationLogoUpload = new Zend_Form_Element_File('stationLogo'); + $stationLogoUpload->setLabel(_('Station Logo:')) + ->setDescription(_("Note: Anything larger than 600x600 will be resized.")) + ->setRequired(false) + ->addValidator('Count', false, 1) + ->addValidator('Extension', false, 'jpg,jpeg,png,gif') + ->setMaxFileSize(1000000) + ->addFilter('ImageSize'); + $stationLogoUpload->setAttrib('accept', 'image/*'); + $this->addElement($stationLogoUpload); + //Default station crossfade duration $this->addElement('text', 'stationDefaultCrossfadeDuration', array( 'class' => 'input_text', diff --git a/airtime_mvc/application/forms/Preferences.php b/airtime_mvc/application/forms/Preferences.php index 977cae355..7187c467c 100644 --- a/airtime_mvc/application/forms/Preferences.php +++ b/airtime_mvc/application/forms/Preferences.php @@ -7,9 +7,6 @@ class Application_Form_Preferences extends Zend_Form { $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->setMethod('post'); - - $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/preferences.phtml')) )); @@ -31,5 +28,12 @@ class Application_Form_Preferences extends Zend_Form $soundcloud_pref = new Application_Form_SoundcloudPreferences(); $this->addSubForm($soundcloud_pref, 'preferences_soundcloud'); + $submit = new Zend_Form_Element_Submit('submit'); + $submit->setLabel(_('Save')); + //$submit->removeDecorator('Label'); + $submit->setAttribs(array('class'=>'btn right-floated')); + $submit->removeDecorator('DtDdWrapper'); + + $this->addElement($submit); } } diff --git a/airtime_mvc/application/forms/SupportSettings.php b/airtime_mvc/application/forms/SupportSettings.php index 87e5588de..0fbf0ccf7 100644 --- a/airtime_mvc/application/forms/SupportSettings.php +++ b/airtime_mvc/application/forms/SupportSettings.php @@ -1,7 +1,5 @@ setAttrib('COLS','58'); $this->addElement($description); - // Station Logo - $upload = new Zend_Form_Element_File('Logo'); - $upload->setLabel(_('Station Logo:')) - ->setRequired(false) - ->setDecorators(array('File')) - ->addValidator('Count', false, 1) - ->addValidator('Extension', false, 'jpg,jpeg,png,gif') - ->addFilter('ImageSize'); - $upload->setAttrib('accept', 'image/*'); - $this->addElement($upload); - //enable support feedback $this->addElement('checkbox', 'SupportFeedback', array( 'label' => _('Send support feedback'), diff --git a/airtime_mvc/application/views/scripts/form/preferences.phtml b/airtime_mvc/application/views/scripts/form/preferences.phtml index afc324126..53062036a 100644 --- a/airtime_mvc/application/views/scripts/form/preferences.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences.phtml @@ -1,7 +1,7 @@
element->getElement('csrf') ?> + element->getSubform('preferences_general') ?> -

element->getSubform('preferences_email_server') ?> @@ -12,5 +12,7 @@
element->getSubform('preferences_soundcloud') ?>
+
+ element->submit->render() ?> diff --git a/airtime_mvc/application/views/scripts/form/preferences_general.phtml b/airtime_mvc/application/views/scripts/form/preferences_general.phtml index de3f6b13d..7bf5d487d 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_general.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_general.phtml @@ -5,6 +5,10 @@ element->getElement('stationDescription')->render() ?> + element->getElement('stationLogo')->render() ?> + +
+ element->getElement('locale')->render() ?> element->getElement('timezone')->render() ?> diff --git a/airtime_mvc/application/views/scripts/form/support-setting.phtml b/airtime_mvc/application/views/scripts/form/support-setting.phtml index b1c0a3e37..7b164bdee 100644 --- a/airtime_mvc/application/views/scripts/form/support-setting.phtml +++ b/airtime_mvc/application/views/scripts/form/support-setting.phtml @@ -143,26 +143,6 @@ -
- -
-
- element->getView()->logoImg){?> -
- - - element->getElement('Logo') ?> -
-

-
- element->getElement('Logo')->hasErrors()) : ?> -
    - element->getElement('Logo')->getMessages() as $error): ?> -
  • - -
- -
diff --git a/airtime_mvc/application/views/scripts/preference/index.phtml b/airtime_mvc/application/views/scripts/preference/index.phtml index 7d84200b4..147cd1b99 100644 --- a/airtime_mvc/application/views/scripts/preference/index.phtml +++ b/airtime_mvc/application/views/scripts/preference/index.phtml @@ -1,16 +1,15 @@

-
- - + + + form->getElement('submit')->render() ?>
- + statusMsg; echo $this->form; ?>
-
diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index a868e5df7..f5442493d 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -2121,6 +2121,7 @@ span.errors.sp-errors{ } .preferences { width: 500px; + margin-bottom: 40px; } .manage-folders { width: 610px; diff --git a/airtime_mvc/public/js/airtime/preferences/preferences.js b/airtime_mvc/public/js/airtime/preferences/preferences.js index e774033d0..4f37d7033 100644 --- a/airtime_mvc/public/js/airtime/preferences/preferences.js +++ b/airtime_mvc/public/js/airtime/preferences/preferences.js @@ -103,7 +103,8 @@ $(document).ready(function() { $(this).toggleClass("closed"); return false; }).next().hide(); - + + /* No longer using AJAX for this form. Zend + our code makes it needlessly hard to deal with. -- Albert $('#pref_save').live('click', function() { var data = $('#pref_form').serialize(); var url = baseUrl+'Preference/index'; @@ -116,7 +117,7 @@ $(document).ready(function() { setConfigureMailServerListener(); setEnableSystemEmailsListener(); }); - }); + });*/ showErrorSections();