Commits

theoden committed 9fcd994

At moment, nginx 1.2 and uwsgi 1.2 are successfully **installed** in Squeeze.
See UwsgiPrepareTest

  • Participants
  • Parent commits 9c01873
  • Branches uwsgi

Comments (0)

Files changed (2)

File fab_deploy/system.py

         install_sudo()
 
     setup_backports()
+    setup_package_sources()
     install_software()
 
 @task
         return
 
     sudo("echo 'deb %s' > /etc/apt/sources.list.d/backports.sources.list" % backports[os])
+
+@task
+@utils.run_as_sudo
+def setup_package_sources():
+    """ Adds additional repos to apt sources. """
+    os = utils.detect_os()
+    nginx = {
+        'lucid': 'http://nginx.org/packages/ubuntu/ lucid nginx',
+        'squeeze': 'http://nginx.org/packages/debian/ squeeze nginx',
+    }
+    if os in nginx:
+        run('wget -O ./nginx_signing.key http://nginx.org/keys/nginx_signing.key')
+        sudo('sudo apt-key add ./nginx_signing.key')
+        sudo("echo 'deb %s' > /etc/apt/sources.list.d/nginx.list" % nginx[os])
+    uwsgi = {
+        'lucid': 'http://ppa.launchpad.net/uwsgi/release/ubuntu lucid main',
+        'squeeze': 'http://ftp.ru.debian.org/debian testing main contrib non-free',
+    }
+    if os in uwsgi:
+        sudo("echo 'deb %s' > /etc/apt/sources.list.d/uwsgi.list" % uwsgi[os])
+    if os=='squeeze':
+        sudo('echo \'APT::Default-Release "stable";\' > /etc/apt/apt.conf.d/default')
     with settings(warn_only=True):
         sudo('aptitude update')
         env.conf._APTITUDE_UPDATED = True
 
+
 @task
 @utils.run_as_sudo
 def create_linux_account(pub_key_file, username=None):

File fab_deploy_tests/tests/__init__.py

 from .crontab import *
 from .deploy import *
 from .virtualenv import *
+from .uwsgi_prepare import *