#10460 closed defect (worksforme)
Unable to install TracMercurial globally
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | plugin/mercurial | Version: | 0.12-stable |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I followed the instructions, but the plugin doesn't appear in the "plugins" section, and editing trac.ini manually doesn't make "hg" appear in the repository type list.
Here's exactly what I did:
# svn co http://svn.edgewall.com/repos/trac/plugins/0.12/mercurial-plugin A mercurial-plugin/setup.py […] U mercurial-plugin Révision 10874 extraite. # cd mercurial-plugin/ # python setup.py install running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -E -c pass TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files running bdist_egg running egg_info creating TracMercurial.egg-info writing requirements to TracMercurial.egg-info/requires.txt […] copying TracMercurial.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/TracMercurial-0.12.0.28dev_r10784-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing TracMercurial-0.12.0.28dev_r10784-py2.7.egg removing '/usr/local/lib/python2.7/dist-packages/TracMercurial-0.12.0.28dev_r10784-py2.7.egg' (and everything under it) creating /usr/local/lib/python2.7/dist-packages/TracMercurial-0.12.0.28dev_r10784-py2.7.egg Extracting TracMercurial-0.12.0.28dev_r10784-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding TracMercurial 0.12.0.28dev-r10784 to easy-install.pth file Installed /usr/local/lib/python2.7/dist-packages/TracMercurial-0.12.0.28dev_r10784-py2.7.egg Processing dependencies for TracMercurial==0.12.0.28dev-r10784 Searching for Trac==0.12.2 Best match: Trac 0.12.2 Adding Trac 0.12.2 to easy-install.pth file Installing trac-admin script to /usr/local/bin Installing tracd script to /usr/local/bin Using /usr/lib/python2.7/dist-packages Searching for Genshi==0.6 Best match: Genshi 0.6 Adding Genshi 0.6 to easy-install.pth file Using /usr/lib/python2.7/dist-packages Searching for distribute==0.6.16dev-r0 Best match: distribute 0.6.16dev-r0 Adding distribute 0.6.16dev-r0 to easy-install.pth file Installing easy_install script to /usr/local/bin Installing easy_install-2.7 script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin Using /usr/lib/python2.7/dist-packages Finished processing dependencies for TracMercurial==0.12.0.28dev-r10784
In my trac.ini:
[components] tracopt.ticket.commit_updater.* = enabled tracext.* = enabled
Now even if I restart tracd, hg doesn't appear:
Now if I install the egg dir in the plugins directory, everything works fine.
Trac version: ubuntu trac 0.12.2
Attachments (0)
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
1. PYTHON_EGG_CACHE
I thought that it was a problem with PYTHON_EGG_CACHE.
But again it does not seem to be the case:
(idenitifed as www-data)
$ export PYTHON_EGG_CACHE=/tmp $ echo $PYTHON_EGG_CACHE /tmp $ tracd …
Results in:
And no egg file in the /tmp directory.
2. Command line tool
Another strange thing is that if I try to invoke trac-admin as a non-root user, no command is recognised:
$ trac-admin . wiki list Error: Command not found
But it works fine if I do it as a super-user or if I remove the TracMercurial plugin, or if I install it locally.
follow-up: 4 comment:3 by , 13 years ago
Solution
I was able to eventually make it work.
The problem was that my root umask was set to 0077.
Doing the same installation after executing umask 0022 fixed everything.
Is it something that should be fixed in Trac or should it figure in documentation?
follow-up: 5 comment:4 by , 13 years ago
Milestone: | plugin - mercurial |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Replying to digimag <digimag@…>:
The problem was that my root umask was set to 0077.
That's a typical InstallationIssue.
Is it something that should be fixed in Trac or should it figure in documentation?
Well, it's not a bug (neither in Trac, nor anywhere else). File written by a user have the umask applied to the permissions. That's a pretty basic fact of *nix system administration.
We already have various hints about permissions (to the environment, the database, trac.ini and the logs) sprinkled throughout the guide, but if you feel mentioning this specific case somewhere would help others avoid it, feel free to add it to the guide.
comment:5 by , 13 years ago
Sorry for InstallationIssue.
Replying to rblank:
Well, it's not a bug (neither in Trac, nor anywhere else). File written by a user have the umask applied to the permissions. That's a pretty basic fact of *nix system administration.
Sure. It's just that umask 0077 shouldn't cause problems, so it's probably better to mention it clearly that it has to be changed during the installation process. I'll do it tomorrow.
Update
It seems to be a permission problem.
If I run tracd using root, it works fine.
But now when I reload tracd under www-data, I get this error message:
(note that everything related to my trac installation is readable and writable by www-data)
I can only get rid of this error message if I uninstall TracMercurial:
And after that Trac works fine again (but without mercurial support of course).
Any ideas?