diff --git a/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js b/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js index 6087bb6a2..1032a83f7 100644 --- a/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js +++ b/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js @@ -8,9 +8,9 @@ function getContent() { var msg = ""; if(isUpToDate()) { msg = "You are running the latest version"; - } else if(diff <= 2) { + } else if(diff == 1) { msg = "New version available: " + link; - } else if(diff == 3) { + } else if(diff == 2) { msg = "This version will soon be obsolete.
Please upgrade to " + link; } else { msg = "This version is no longer supported.
Please upgrade to " + link; @@ -44,7 +44,7 @@ function getLatestVersion() { * Returns the download link to latest release in HTML */ function getLatestLink() { - return "" + getLatestVersion() + ""; + return "" + getLatestVersion() + ""; } /** @@ -58,6 +58,13 @@ function isUpToDate() { return (diff == 0 && current == latest) || diff < 0; } +/** + * Opens the link in a new window + */ +function openLatestLink() { + window.open($("#version-link").html()); +} + /** * Sets up the tooltip for version notification */ diff --git a/dev_tools/fabric/fab_liquidsoap_compile.py b/dev_tools/fabric/fab_liquidsoap_compile.py index f62068cb9..fb4146897 100644 --- a/dev_tools/fabric/fab_liquidsoap_compile.py +++ b/dev_tools/fabric/fab_liquidsoap_compile.py @@ -55,7 +55,7 @@ def create_fresh_os(vm_name, debian=False): download_if_needed(vdi_dir, xml_dir, vm_name, vm_vdi_file, vm_xml_file) - """ + if not os.path.exists("%s/vm_registered"%vdi_dir): local("VBoxManage registervm %s"%os.path.join(xml_dir, vm_xml_file), capture=True) local('VBoxManage storagectl "%s" --name "SATA Controller" --add sata'%vm_name) @@ -63,9 +63,8 @@ def create_fresh_os(vm_name, debian=False): local("VBoxManage modifyvm %s --snapshotfolder %s"%(vm_name, vdi_snapshot_dir)) local("VBoxManage snapshot %s take fresh_install"%vm_name) local("touch %s/vm_registered"%vdi_dir) - """ - #local('VBoxManage snapshot %s restore fresh_install'%vm_name) + local('VBoxManage snapshot %s restore fresh_install'%vm_name) local('VBoxManage startvm %s'%vm_name) print "Please wait while attempting to acquire IP address" @@ -87,8 +86,6 @@ def create_fresh_os(vm_name, debian=False): if debian: append('/etc/apt/sources.list', "deb http://www.debian-multimedia.org squeeze main non-free", use_sudo=True) - - def ubuntu_lucid_32(fresh_os=True): if (fresh_os): create_fresh_os('Ubuntu_10.04_32') @@ -96,6 +93,14 @@ def ubuntu_lucid_32(fresh_os=True): def ubuntu_lucid_64(fresh_os=True): if (fresh_os): create_fresh_os('Ubuntu_10.04_64') + +def ubuntu_maverick_32(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_10.10_32') + +def ubuntu_maverick_64(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_10.10_64') def ubuntu_natty_32(fresh_os=True): if (fresh_os): @@ -105,6 +110,18 @@ def ubuntu_natty_64(fresh_os=True): if (fresh_os): create_fresh_os('Ubuntu_11.04_64') +def ubuntu_oneiric_32(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_11.10_32') + +def ubuntu_oneiric_64(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_11.10_64') + +def debian_squeeze_32(fresh_os=True): + if (fresh_os): + create_fresh_os('Debian_Squeeze_32', debian=True) + def debian_squeeze_64(fresh_os=True): if (fresh_os): create_fresh_os('Debian_Squeeze_64', debian=True) @@ -114,12 +131,14 @@ def compile_liquidsoap(filename="liquidsoap"): sudo('apt-get update') sudo('apt-get upgrade -y --force-yes') - sudo('sudo apt-get install -y --force-yes libocamlcvs-ocaml-dev ocaml-findlib libao-ocaml-dev libportaudio-ocaml-dev ' + \ + sudo('sudo apt-get install -y --force-yes ocaml-findlib libao-ocaml-dev libportaudio-ocaml-dev ' + \ 'libmad-ocaml-dev libtaglib-ocaml-dev libalsa-ocaml-dev libtaglib-ocaml-dev libvorbis-ocaml-dev ' + \ 'libspeex-dev libspeexdsp-dev speex libladspa-ocaml-dev festival festival-dev ' + \ 'libsamplerate-dev libxmlplaylist-ocaml-dev libxmlrpc-light-ocaml-dev libflac-dev ' + \ 'libxml-dom-perl libxml-dom-xpath-perl icecast2 patch autoconf libmp3lame-dev ' + \ 'libcamomile-ocaml-dev libcamlimages-ocaml-dev libtool libpulse-dev libjack-dev camlidl') + + #libocamlcvs-ocaml-dev root = '/home/martin/src' run('mkdir -p %s' % root) diff --git a/dev_tools/fabric/fab_release_test.py b/dev_tools/fabric/fab_release_test.py index 5b583027f..39116f040 100644 --- a/dev_tools/fabric/fab_release_test.py +++ b/dev_tools/fabric/fab_release_test.py @@ -53,6 +53,13 @@ def download_if_needed(vdi_dir, xml_dir, vm_name, vm_vdi_file, vm_xml_file): def create_fresh_os(vm_name, update_virtualenv=False, debian=False): + """ + remove known_hosts because if two virtual machines get the same ip address, + then they will most likey have a different host key, and ssh will fail, warning + about a possible man in the middle attack. + """ + local("rm ~/.ssh/known_hosts") + vm_vdi_file = '%s.vdi'%vm_name vm_xml_file = '%s.xml'%vm_name vdi_dir = os.path.expanduser('~/tmp/vms/%s'%vm_name) @@ -128,6 +135,14 @@ def ubuntu_lucid_32(fresh_os=True): def ubuntu_lucid_64(fresh_os=True): if (fresh_os): create_fresh_os('Ubuntu_10.04_64', update_virtualenv=True) + +def ubuntu_maverick_32(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_10.10_32') + +def ubuntu_maverick_64(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_10.10_64') def ubuntu_natty_32(fresh_os=True): if (fresh_os): @@ -137,6 +152,14 @@ def ubuntu_natty_64(fresh_os=True): if (fresh_os): create_fresh_os('Ubuntu_11.04_64') +def ubuntu_oneiric_32(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_11.10_32') + +def ubuntu_oneiric_64(fresh_os=True): + if (fresh_os): + create_fresh_os('Ubuntu_11.10_64') + def debian_squeeze_32(fresh_os=True): if (fresh_os): create_fresh_os('Debian_Squeeze_32', debian=True) diff --git a/dev_tools/fabric/run.sh b/dev_tools/fabric/run.sh index 85b7bc4a8..de947b917 100755 --- a/dev_tools/fabric/run.sh +++ b/dev_tools/fabric/run.sh @@ -2,10 +2,9 @@ exec 2>&1 -target="airtime_195_tar" -airtime_versions=("" "airtime_182_tar" "airtime_194_tar") -ubuntu_versions=("ubuntu_lucid_32" "ubuntu_natty_32") - +target="airtime_git_branch" +airtime_versions=("") +ubuntu_versions=("ubuntu_maverick_32") num1=${#ubuntu_versions[@]} num2=${#airtime_versions[@]} diff --git a/dev_tools/fabric/run2.sh b/dev_tools/fabric/run2.sh index 1f1cd3f56..6e4a0f521 100755 --- a/dev_tools/fabric/run2.sh +++ b/dev_tools/fabric/run2.sh @@ -2,15 +2,13 @@ exec 2>&1 -ubuntu_versions=("ubuntu_lucid_32" "ubuntu_lucid_64" "ubuntu_natty_32" "ubuntu_natty_64") - +ubuntu_versions=("debian_squeeze_32") num1=${#ubuntu_versions[@]} - mkdir -p ./upgrade_logs2 for i in $(seq 0 $(($num1 -1))); do - fab -f fab_liquidsoap_compile.py ${ubuntu_versions[$i]} compile_liquidsoap:${ubuntu_versions[$i]} shutdown 2>&1 | tee "./upgrade_logs2/${ubuntu_versions[$i]}.log" + fab -f fab_liquidsoap_compile.py ${ubuntu_versions[$i]} compile_liquidsoap:filename=${ubuntu_versions[$i]} shutdown 2>&1 | tee "./upgrade_logs2/${ubuntu_versions[$i]}.log" done diff --git a/python_apps/pypo/install/pypo-initialize.py b/python_apps/pypo/install/pypo-initialize.py index cdb13a9ec..c0f3e88c8 100644 --- a/python_apps/pypo/install/pypo-initialize.py +++ b/python_apps/pypo/install/pypo-initialize.py @@ -79,7 +79,7 @@ PATH_INI_FILE = '/etc/airtime/pypo.cfg' PATH_LIQUIDSOAP_BIN = '/usr/lib/airtime/pypo/bin/liquidsoap_bin' #any debian/ubuntu codename in this et will automatically use the natty liquidsoap binary -codenames_for_natty_binary = set(["natty", "oneiric", "precise", "squeeze"]) +arch_map = dict({"32bit":"i386", "64bit":"amd64"}) # load config file try: @@ -91,29 +91,19 @@ except Exception, e: try: #select appropriate liquidsoap file for given system os/architecture architecture = platform.architecture()[0] - #natty = is_natty() + arch = arch_map[architecture] print "* Detecting OS: ...", (codename, fullname) = get_os_codename() - print " Found %s" % fullname - natty = codename in codenames_for_natty_binary - - if architecture == '64bit' and natty: - print " * Installing 64-bit liquidsoap binary (Natty)" - shutil.copy("%s/liquidsoap-natty-amd64"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN) - elif architecture == '32bit' and natty: - print " * Installing 32-bit liquidsoap binary (Natty)" - shutil.copy("%s/liquidsoap-natty-i386"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN) - elif architecture == '64bit' and not natty: - print " * Installing 64-bit liquidsoap binary" - shutil.copy("%s/liquidsoap-amd64"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN) - elif architecture == '32bit' and not natty: - print " * Installing 32-bit liquidsoap binary" - shutil.copy("%s/liquidsoap-i386"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN) - else: - print "Unknown system architecture." - sys.exit(1) + print " Found %s (%s) on %s architecture" % (fullname, codename, arch) + print " * Installing Liquidsoap binary" + if (os.path.exists("%s/liquidsoap_%s_%s"%(PATH_LIQUIDSOAP_BIN, codename, arch))): + shutil.copy("%s/liquidsoap_%s_%s"%(PATH_LIQUIDSOAP_BIN, codename, arch), "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN) + else: + print "Unsupported system architecture." + sys.exit(1) + #initialize init.d scripts p = Popen("update-rc.d airtime-playout defaults >/dev/null 2>&1", shell=True) sts = os.waitpid(p.pid, 0)[1] diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap-amd64 b/python_apps/pypo/liquidsoap_bin/liquidsoap_lucid_amd64 similarity index 100% rename from python_apps/pypo/liquidsoap_bin/liquidsoap-amd64 rename to python_apps/pypo/liquidsoap_bin/liquidsoap_lucid_amd64 diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap-i386 b/python_apps/pypo/liquidsoap_bin/liquidsoap_lucid_i386 similarity index 100% rename from python_apps/pypo/liquidsoap_bin/liquidsoap-i386 rename to python_apps/pypo/liquidsoap_bin/liquidsoap_lucid_i386 diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap_maverick_amd64 b/python_apps/pypo/liquidsoap_bin/liquidsoap_maverick_amd64 new file mode 100755 index 000000000..f1cfb7bc5 Binary files /dev/null and b/python_apps/pypo/liquidsoap_bin/liquidsoap_maverick_amd64 differ diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap_maverick_i386 b/python_apps/pypo/liquidsoap_bin/liquidsoap_maverick_i386 new file mode 100755 index 000000000..ac09e7a6d Binary files /dev/null and b/python_apps/pypo/liquidsoap_bin/liquidsoap_maverick_i386 differ diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap-natty-amd64 b/python_apps/pypo/liquidsoap_bin/liquidsoap_natty_amd64 similarity index 100% rename from python_apps/pypo/liquidsoap_bin/liquidsoap-natty-amd64 rename to python_apps/pypo/liquidsoap_bin/liquidsoap_natty_amd64 diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap-natty-i386 b/python_apps/pypo/liquidsoap_bin/liquidsoap_natty_i386 similarity index 100% rename from python_apps/pypo/liquidsoap_bin/liquidsoap-natty-i386 rename to python_apps/pypo/liquidsoap_bin/liquidsoap_natty_i386 diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap_oneiric_amd64 b/python_apps/pypo/liquidsoap_bin/liquidsoap_oneiric_amd64 new file mode 100755 index 000000000..8d153881e Binary files /dev/null and b/python_apps/pypo/liquidsoap_bin/liquidsoap_oneiric_amd64 differ diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap_oneiric_i386 b/python_apps/pypo/liquidsoap_bin/liquidsoap_oneiric_i386 new file mode 100755 index 000000000..3fc7a4a81 Binary files /dev/null and b/python_apps/pypo/liquidsoap_bin/liquidsoap_oneiric_i386 differ diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap_squeeze_amd64 b/python_apps/pypo/liquidsoap_bin/liquidsoap_squeeze_amd64 new file mode 100755 index 000000000..2454190d1 Binary files /dev/null and b/python_apps/pypo/liquidsoap_bin/liquidsoap_squeeze_amd64 differ diff --git a/python_apps/pypo/liquidsoap_bin/liquidsoap_squeeze_i386 b/python_apps/pypo/liquidsoap_bin/liquidsoap_squeeze_i386 new file mode 100755 index 000000000..7f119078d Binary files /dev/null and b/python_apps/pypo/liquidsoap_bin/liquidsoap_squeeze_i386 differ