-
-
Notifications
You must be signed in to change notification settings - Fork 6
Upgrade to v1.0.0
-
Make a fresh clone of the sage_trac_plugin git repository and cd into it:
$ git clone https://github.com/sagemath/sage_trac_plugin.git && cd sage_trac_plugin -
Check out the v1.0.0 tag:
$ git checkout v1.0.0 -
Put the Trac site in "maintenance" mode be creating the special file
.down:$ sudo touch /srv/trac/sage_trac/htdocs/.downIt should be fine to leave git access up. Alternatively, you can write the following contents to
.down:Define allowed_ip <IP_ADDRESS>and provide your external IP address. This way the site will still be accessible to you while performing maintenance. -
Install the new version of the plugin (without upgrading dependencies for now):
$ sudo pip install --no-deps --upgrade . -
I noticed for some reason the server has some old
.egg-infodirectories for old versions of the plug-in lying around, so clean those up too:$ sudo rm -rf /usr/local/lib/python2.7/dist-packages/sage_trac-0.3.*.egg-info -
Delete the custom ticket box template--this is provided directly by the plugin now:
$ sudo rm -f /srv/trac/sage_trac/templates/ticket_box.html -
The new version has a couple new settings that must be added to the
trac.ini. So with your preferred editor, open/srv/trac/sage_trac/conf/trac.ini. First find the[components]section of the configuration, and add to it:sage_trac.ticket_box.ticketbox = enabledThen find the
[sage_trac]section and add the option:patchbot_url = https://patchbot.sagemath.org -
One issue to be aware of--due to a minor annoyance of the Sage plugin, it tries update the clone of the
gitolite-adminrepository even when runningtrac-admincommands (this should be fixed later). This means that the user running the commands has to have an SSH key with permissions to pull from thegitolite-adminrepo. There are a few options here: You can add therootuser's public key to thegitolite-adminrepository and give it read access to the repository. Or, since thewww-datauser already (by necessity) has R/W access to the repository, you can run the following commands as thewww-datauser. For now we'll prefer the latter. First, it's necessary to become root:$ sudo su -
Now perform the database upgrade as the
www-datauser:# sudo -u www-data -H trac-admin /srv/trac/sage_trac upgrade -
Get back out of the root sub-shell:
# exit -
Restart the web server, and then take it out of maintenance mode:
$ sudo service apache2 restart $ sudo rm /srv/trac/sage_trac/htdocs/.down