Installing TRAC on CentOS 6 VM Pro

Trying to install TRAC, I get the following error and am unsure how to clear it. Suggestions?

In domain tracker.datingchecklist.com Found http://ftp.edgewall.com:80/pub/trac/Trac-1.0.1.tar.gz in cache .. Found http://www.saddi.com:80/software/flup/dist/flup-1.0.tar.gz in cache ..

Now installing Trac version 1.0.1 .. Trac source install failed : Traceback (most recent call last): File "setup.py", line 162, in **extra File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__ self.fetch_build_eggs(attrs.pop('setup_requires')) File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 550, in resolve raise VersionConflict(dist,req) # XXX put more info here pkg_resources.VersionConflict: (Genshi 0.5.1 (/usr/lib64/python2.6/site-packages), Requirement.parse('Genshi>=0.6')) .. failed! See the error message above for the reason why.

Status: 
Closed (fixed)

Comments

Howdy -- it looks like newer versions of Trac require version 0.6 of a library called Genshi.

The problem is, RHEL/CentOS only provides version 0.5.1 of that library.

It's a bug that the Trac Install Script doesn't check for that, and we'll add a test in there to make sure Virtualmin doesn't offer to install version 1.0.1 if Genshi 0.6 isn't available.

Trac version 0.12.5 should work correctly on your distro, and doesn't have the same Genshi requirements. You could always try installing that.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 12:19 Pro Licensee

Do you know of a repo that has that newer lib so I can install it?

Rather than revert to an older version, you could probably include the lib in your own repo or download from that repo.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 12:24 Pro Licensee

Actually that is in the EPEL repo. I installed it but still get that same error from virtualmin.

[root@hosting2 ~]# yum install python-genshi06 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.supremebytes.com * epel: dl.fedoraproject.org * extras: mirror.supremebytes.com * remi: mirrors.mediatemple.net * updates: mirror.supremebytes.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package python-genshi06.noarch 0:0.6-1.el6 will be installed --> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================

Package Arch Version Repository Size

Installing: python-genshi06 noarch 0.6-1.el6 epel 496 k

Transaction Summary

Install 1 Package(s)

Total download size: 496 k Installed size: 3.9 M Is this ok [y/N]: y Downloading Packages: python-genshi06-0.6-1.el6.noarch.rpm | 496 kB 00:00
Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : python-genshi06-0.6-1.el6.noarch 1/1 Verifying : python-genshi06-0.6-1.el6.noarch 1/1

Installed: python-genshi06.noarch 0:0.6-1.el6

Complete!

Now installing Trac version 1.0.1 .. Trac source install failed : Traceback (most recent call last): File "setup.py", line 162, in **extra File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__ self.fetch_build_eggs(attrs.pop('setup_requires')) File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 550, in resolve raise VersionConflict(dist,req) # XXX put more info here pkg_resources.VersionConflict: (Genshi 0.5.1 (/usr/lib64/python2.6/site-packages), Requirement.parse('Genshi>=0.6')) .. failed! See the error message above for the reason why.

It may be possible to get it working using a package from another repo, but we're not familiar with how to do that, unfortunately.

We do know that using other distros that include a more recent Genshi version do work properly with Trac 1.0.1. I just verified that it installs properly on Ubuntu, for example.

One idea is that you could always try removing the older Genshi version installed via your distro's repo, and see if that helps, maybe Python is looking at the wrong one.

We haven't done any testing with third party Genshi packages though, so we don't know if it's possible to make that work on, or if you might run into any problems trying to install that. That being said, most of the packages we've tried from the EPEL repository have worked well.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 13:25 Pro Licensee

These are what I now have installed.

[root@hosting2 ~]# find / -name genshi /usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi /usr/lib64/python2.6/site-packages/genshi /usr/share/doc/python-genshi06-0.6/examples/bench/genshi /usr/share/doc/python-genshi-0.5.1/examples/bench/genshi

I can't figure out why the installer does not see the version .6/.

There are newer versions albeit not in the epel repo.

http://pkgs.repoforge.org/python-genshi/

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 13:31 Pro Licensee

I can't tell at this point which is the culprit. I removed the genshi that comes with the CentOS 6 distro to ensure I only had the newer one. It appears that the VM installer is not seeing the newer one installed and installs the older one causing it to fail. Any ideas?

Python module genshi is required .. Installing package python-genshi .. Installing package(s) with command yum -y install python-genshi .. Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.supremebytes.com * epel: dl.fedoraproject.org * extras: mirror.supremebytes.com * updates: mirror.supremebytes.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package python-genshi.x86_64 0:0.5.1-7.1.el6 will be installed --> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package Arch Version Repository Size

Installing: python-genshi x86_64 0.5.1-7.1.el6 base 429 k

Transaction Summary

Install 1 Package(s)

Total download size: 429 k Installed size: 2.7 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : python-genshi-0.5.1-7.1.el6.x86_64 1/1 Verifying : python-genshi-0.5.1-7.1.el6.x86_64 1/1

Installed:

Complete! .. install complete. .. done Now installing Trac version 1.0.1 .. Trac source install failed : Traceback (most recent call last): File "setup.py", line 162, in **extra File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__ self.fetch_build_eggs(attrs.pop('setup_requires')) File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 550, in resolve raise VersionConflict(dist,req) # XXX put more info here pkg_resources.VersionConflict: (Genshi 0.5.1 (/usr/lib64/python2.6/site-packages), Requirement.parse('Genshi>=0.6')) .. failed! See the error message above for the reason why.

The error you're seeing is from Trac, not the Virtualmin Install Script.

For some reason, Trac/Python isn't seeing the library you installed.

Unfortunately, I'm not sure why you're receiving that error, or what you could do to resolve it.

Is it an option to use the older version of Trac?

While it may be possible to get it to work with a third party library, I'm not sure what steps to suggest to get that up and running.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 14:02 Pro Licensee

The first lines:

Python module genshi is required .. Installing package python-genshi

Those are from TRAC and not VM?

Ah, I understand now... yes, that is indeed a Virtualmin error. Virtualmin doesn't appear to be able to detect non-standard library installs.

I suppose you could try installing the 0.5.1 Genshi module, but then rename/remove the files it installs, while leaving the package itself installed. That might make Trac see your desired module version, while solving Virtualmin's dependencies.

Other than that, I'm not sure there's much else we can offer, unfortunately. I spoke to Jamie a bit about the issues you're seeing, but it doesn't sound like we're going to have any sort of official support for Trac 1.0.1 in CentOS 6 anytime soon since it relies on packages that aren't included in the standard repositories.

With RHEL7/CentOS7 support right around the corner, that'll likely be the best way to install newer web applications.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 14:50 Pro Licensee

Can you give me an updated file to try and see if it gets past that point? It seems as if CentOS 6 will not be going away any time soon. I'll try hiding those files as you suggested to see if I can trick the VM installer.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 15:11 Pro Licensee

Fooling around I made a little progress.

in /usr/lib64/python2.6/site-packages I made 2 symlinks

ln -s /usr/share/doc/python-genshi06-0.6/examples/bench/genshi genshi ln -s /usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/EGG-INFO Genshi-0.6-py2.6.egg-info

Now when running the VM installer I get:

Now installing Trac version 1.0.1 .. Project initialization install failed : Initenv for '/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/trac' failed. Failed to create environment. unsupported operand type(s) for /: 'int' and 'NoneType' Traceback (most recent call last): File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/admin/console.py", line 456, in do_initenv options=options) File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/core.py", line 124, in call self.init(*args, kwargs) File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/env.py", line 281, in init self.create(options) File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/env.py", line 584, in create DatabaseManager(self).init_db() File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/db/api.py", line 251, in init_db connector.init_db(args) File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/db/mysql_backend.py", line 117, in init_db for stmt in self.to_sql(table, utf8_size=utf8_size): File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/db/mysql_backend.py", line 166, in to_sql utf8_size=utf8_size)) File "/home/datingchecklist/domains/tracker.datingchecklist.com/public_html/lib/python/Trac-1.0.1-py2.6.egg/trac/db/mysql_backend.py", line 130, in _collist limit_col = 767 / utf8_size TypeError: unsupported operand type(s) for /: 'int' and 'NoneType' Creating and Initializing Project .. failed! See the error message above for the reason why.

Joe's picture
Submitted by Joe on Thu, 06/19/2014 - 16:29 Pro Licensee

I'm gonna look at this one for a bit. I used to maintain a bunch of trac instances and packages for many (many) Python modules. I can probably bang this into a shape that works. Will take me a bit of time to get a test environment up and running...but, we're not giving up on this one just yet.

Steffan's picture
Submitted by Steffan on Thu, 06/19/2014 - 17:00 Pro Licensee

Awesome! I'm game to test whatever you come up with.

I think some of the issue is that the new version genshi that's required is a noarch and therefore gets put into the /usr/lib/python2.6/site-packages rather than /usr/lib64/python2.6/site-packages where the TRAC installer looks. That may be an issue with the EPEL repo's version but looking at repoforge, it seems that all the newer genshi are noarch. My symlinks at least get me a little further but no solid answer.

For the fun of it I decided to try Bugzilla. NOT impressed. One small bug that I'll file separately is that the installer script should install CPAN if not already installed. Once that's done, the installer script works fine. Mantis and Flyspray are ok but development seems NIL.

Steffan's picture
Submitted by Steffan on Fri, 06/20/2014 - 00:25 Pro Licensee

I removed Bugzilla to try Trac again. First time it would not let me. Upon checking the directory I saw it was somehow owned by root. Changed it back to the site owner and ran again. Lo and behold it installed BUT it has an error I need to figure out. Not sure where to start. This is what you see on the first visit to trac.

Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

So, this is a no-go. I'll wait to see what you come up with.

Steffan's picture
Submitted by Steffan on Wed, 06/25/2014 - 12:35 Pro Licensee

Anything I can test on this yet?

Steffan's picture
Submitted by Steffan on Sat, 04/18/2015 - 12:08 Pro Licensee

It's been quite some time. Any progress?

Have you re-tried this with the latest version of the Trac script installer? Virtualmin should update installers automatically..

Steffan's picture
Submitted by Steffan on Sun, 11/29/2015 - 10:17 Pro Licensee

Seems this one is an issue with the developer. I'll close this since no activity for some time. I used another installer script that works out of the box.