#519 closed defect (fixed)

can't Register new accounts in Trac

Reported by: warner Owned by: zooko
Priority: major Milestone: undecided
Component: dev-infrastructure Version: 1.2.0
Keywords: Cc:
Launchpad Bug:

Description

At some point, the 'Register' button in the top-right navbar disappeared, which means new users can't create themselves accounts on this Trac. The last modification to the htdigest file was on september 01, so some time in the last two weeks, we lost the ability to accept new .org contributors.

I suspect this could be due to a TracAccountManager plugin gone missing, since the trac.conf file still references it. The trac installation on .org no longer appears to be managed by apt, however (dpkg -L trac claims that trac is not installed, and /usr/bin/trac-admin is not owned by any debian package), and I suspect that Zooko used easy_install, so I can't figure out where the 'plugins' directory is supposed to live.

I shall defer this issue to him.

Change History (3)

comment:1 Changed at 2008-09-19T12:51:16Z by zooko

Fixed -- thanks!

I'm happy to admin trac (see: http://allmydata.org/trac), but for future reference here are some tips if you find yourself in a situation where you suspect easy_install may have been used to install some software:

  1. Less the executable (/usr/bin/trac-admin). In this case, its contents are:
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'Trac==0.11.1','console_scripts','trac-admin'
__requires__ = 'Trac==0.11.1'
import sys
from pkg_resources import load_entry_point

sys.exit(
   load_entry_point('Trac==0.11.1', 'console_scripts', 'trac-admin')()
)

Okay! You have confirmation that easy_install was used to install this software. In addition, you can see that the Python distribution name that is being used is Trac, the version number is 0.11.1, and the script that gets executed is the one named trac-admin within the scope of this Python distribution's "entry points".

Now to find the Python distribution in question, an easy way is python -c "import pkg_resources;print pkg_resources.require('Trac')". Equivalently, you can search the sys.path for things named Trac-0.11.1-py2.5.egg.

Suppose you want to find out exactly what code will get run by /usr/bin/trac-admin?

Once you've found the Python distribution, you can now answer the question of what does trac-admin mean within this distribution's entry points. Look in the metadata (.egg-info or ./EGG-INFO) for the "entry points":

zooko@org:~$ grep trac-admin /usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/EGG-INFO/entry_points.txt 
        trac-admin = trac.admin.console:run

Okay, so now you know that the function run inside the package trac.admin.console inside this Python distribution is what happens when someone runs /usr/bin/trac-admin.

By the way, even if this had been installed with dpkg, you could not have learned where the plugins directory is that way, since the plugins directory is set in our ~trac/projects/tahoe/conf/trac.ini:

plugins_dir = /home/trac/plugins

comment:2 Changed at 2008-09-19T12:51:21Z by zooko

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed at 2008-09-19T21:56:42Z by warner

thanks for the explanation!

For reference, debian packages usually create a directory for things like plugins, so I was expecting 'dpkg -L trac' to show me an empty /usr/share/trac/plugins/ or something.

Somehow I missed the plugins_dir= entry in the trac.ini .

thanks for fixing this!

-Brian

Note: See TracTickets for help on using tickets.