--- a/fabfile.py
+++ b/fabfile.py
@@ -65,12 +65,15 @@
                                                     # for this - pip install is prone to fail
                                                     # here
 
+    # python-PIL is required by allura - install here to avoid issues later on
+    # See the PIL rewrite in the the requirements-common.txt
+    install('python-imaging')
     # pip, virtualenv
     install('python-pip')
     sudo('pip install virtualenv')
 
     if not user_exists('allura'):
-        sudo('useradd -r -s /bin/bash allura')
+        sudo('useradd -m -r -s /bin/bash allura')
     if not user_exists('solr'):
         sudo('useradd -r -s /bin/bash solr')
 
@@ -127,6 +130,14 @@
 
         if not files.exists(ALLURA_ANVIL):
             sudo('virtualenv --system-site-packages %s' % ALLURA_ANVIL)
+
+        # FIXME: we need to fix this in our Allura
+        # This is needed because the dependencies allura asks for are no longer
+        # in the repos and recent mercurial versions break allura
+        sudo('sed -i "s/mercurial==1.4.3//" %s/%s' % (ALLURA_BASE, 'forge-src/requirements-common.txt') )
+        sudo('sed -i "s/Ming==0.3.2dev-20121101/Ming/" %s/%s' % (ALLURA_BASE, 'forge-src/requirements-common.txt') )
+        sudo('sed -i "s/PIL==1.1.7/PIL/" %s/%s' % (ALLURA_BASE, 'forge-src/requirements-common.txt') )
+        sudo('sed -i "s/pytidylib==0.2.1/pytidylib/" %s/%s' % (ALLURA_BASE, 'forge-src/requirements-common.txt') )
 
         with _virtualenv():
             with cd(os.path.join(ALLURA_BASE, 'forge-src')):
@@ -249,6 +260,17 @@
     stop()
     start_osp()
 
+def allura_shell():
+    """
+    Opens up a paster shell
+    """
+    with settings(sudo_user='allura',
+        sudo_prefix=env['sudo_prefix'] + '-i '
+        ):
+        with _virtualenv():
+            with cd(os.path.join(ALLURA_SRC, 'Allura')):
+                sudo('paster shell' )
+
 def user_exists(user):
     """
     Return True if a user exists or False otherwise