I have Trac 1.0.1 installed via the MSI Installer (control panel says "Python 2.7 Trac-1.0.1").I see there's a 1.0.5 version available now. If I just run that MSI installer, will it do an upgrade? Or is there more to it?
It looks like it's not finding the Python ldap package. You might be able to install that from pypi.
The server has definitely been restarted.The only thing in httpd.conf that seems relevant is:WSGIScriptAlias / C:\Apache\cgi-bin\trac.wsgiThere is no “WSGIDaemonProcess” and python isn’t even mentioned in the Apache config files.That file exists and contains:def application(environ, start_request):if not 'trac.env_parent_dir' in environ:environ.setdefault('trac.env_path', 'c:\\trac\\stimulant')if 'PYTHON_EGG_CACHE' in environ:os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']elif 'trac.env_path' in environ:os.environ['PYTHON_EGG_CACHE'] = \os.path.join(environ['trac.env_path'], '.egg-cache')elif 'trac.env_parent_dir' in environ:os.environ['PYTHON_EGG_CACHE'] = \os.path.join(environ['trac.env_parent_dir'], '.egg-cache')from trac.web.main import dispatch_requestreturn dispatch_request(environ, start_request)The only python install on the path is c:\python27 and c:\python27\scripts. c:\python27\scripts\tracd.exe and trac-admin exist, and report being 1.0.6.I suspect you’re right, it’s loading the wrong thing, or loading a cached thing, but I’m not sure where to look for the thing.I see the C:\Users\trac\AppData\Roaming\Python-Eggs and C:\trac\stimulant\.egg-cache directories, but they seem to only contain plugins, not trac itself.thanks again,-josh
I made the "Error with navigation contributor AccountModule” go away by disabling acct_mgr.web_ui.accountmodule.
Sorry for slightly misleading you, it is a while since I set this up here.
There are two parts to this (a) getting the data back from LDAP and
(b) getting Trac to use that data...
For (a) you can edit your LDAPURL to something like:
...DC=net?sAMAccountName,mail?sub?(objectClass=*)
i.e. you can specify a comma-separated list of attributes. Authentication
relies only on the first specified item (e.g. sAMAccountName usually) but I
found that mod_wsgi passes all retrieved attributes through to the python
app (see #1 for some test code):
AUTHENTICATE_MAIL: 'my....@address.com'
AUTHENTICATE_SAMACCOUNTNAME: 'my-user-id'
...i.e. the attributes are available as AUTHENTICATE_<ATTR>
I have not solved (b) as I was not confident to hack into the Trac code but
I do not think it would be too difficult to check for the presence of these
WSGI session values in the relevant place (I think they all started WSGI_
but will have to have another look).
Note that simply logging in is not usually enough to get the session data
updated ~ I have a local macro to list "authenticated" users and people do
not tend to appear until they have "done something" like edit a wiki page.
If I get some time I will try to poke at this again as it would be useful
for me too. Any pointers of where to look in Trac source would be
appreciated!
Also, [1] states that `formatter.req` is "(to be deprecated)" but does not say how else to get at the data? This is my biggest gripe with python code is that it can be difficult to work out how to get to the data I want.
> Maybe we can grab and save the values in LoginModule. I'd have to investigate
> further to be more confident.
> http://trac.edgewall.org/browser/tags/trac-1.1.5/trac/web/auth.py#L39
But I believe that my setup does not use the login module at all, all
authentication is done by httpd. I certainly never use the "login" address...
> I'd also like to write a new TracApache page and consolidate the information
> on configuring Trac with Apache. LDAP specific configuration info would be
> included. I'd like to get this included in the Trac 1.2 release and have
> examples for Apache 2.4 in addition to Apache 2.2.
I could probably contribute to that too, let me know...
"experience" rather than "expertise" but I would be happy to help where I can.
I'm not on dev@, feel free to ping me an email.
~ Mark C