0

I'm using The Trac Project with TracModWSGI – The Trac Project on RHEL7:

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
# rpm -q httpd mod_wsgi subversion swig
httpd-2.4.6-18.el7_0.x86_64
mod_wsgi-3.4-12.el7_0.x86_64
subversion-1.7.14-6.el7.x86_64
swig-2.0.10-4.el7.x86_64
# grep tracopt.versioncontrol conf/trac.ini
tracopt.versioncontrol.git.* = enabled
tracopt.versioncontrol.svn.* = enabled
# 

While trying to Browse Source (Subversion), I'm getting following error:

Trac Error: - Unsupported version control system "svn": No module named svn

Logging:

Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/tracopt/versioncontrol/svn/svn_fs.py", line 296, in __init__
    _import_svn()
  File "build/bdist.linux-x86_64/egg/tracopt/versioncontrol/svn/svn_fs.py", line 78, in _import_svn
    from svn import fs, repos, core, delta
ImportError: No module named svn

Issue is with Python bindings for Subversion can't be loaded by Trac:

# python
Python 2.7.5 (default, Feb 11 2014, 07:46:25) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from svn import core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named svn
>>> 
# 

Quote from TracSubversion – The Trac Project:

One simple solution for rpm-based operating systems, is to install the subversion-python bindings rpm.

Unfortunately No package subversion-python available.:

# subscription-manager repos | grep '^Repo ID' | egrep -v 'beta|debug|fastrack|source'
Repo ID:   rhel-7-server-v2vwin-1-rpms
Repo ID:   rhel-7-server-rpms
Repo ID:   rhel-7-server-extras-rpms
Repo ID:   rhel-7-server-rhn-tools-rpms
Repo ID:   rhel-7-server-thirdparty-oracle-java-rpms
Repo ID:   rhel-7-server-rh-common-rpms
Repo ID:   rhel-7-server-supplementary-rpms
Repo ID:   rhel-7-server-optional-rpms
# yum install subversion-python
Loaded plugins: product-id, subscription-manager
No package subversion-python available.
Error: Nothing to do
# yum repolist
Loaded plugins: product-id, subscription-manager
repo id                                   repo name                                               status
!epel/x86_64                              Extra Packages for Enterprise Linux 7 - x86_64          7,192
rhel-7-server-rpms/7Server/x86_64         Red Hat Enterprise Linux 7 Server (RPMs)                5,320
repolist: 12,512
# 

Please advise.

alexus
  • 12,342
  • 27
  • 115
  • 173
  • 1
    Did you remember to enable the optional channel? – Michael Hampton Feb 06 '15 at 22:27
  • The reference you link says subversion is the package you need for RHEL family. subversion-python is for Debian. – richardb Feb 06 '15 at 22:32
  • @MichaelHampton `rhel-7-server-optional-rpms` & `epel` is enabled. – alexus Feb 07 '15 at 16:32
  • @richardb I paste following quote in my question: `One simple solution for rpm-based operating systems, is to install the subversion-python bindings rpm.` – alexus Feb 07 '15 at 16:36
  • It's true it says that later on but just about the [first thing it suggests](http://trac.edgewall.org/wiki/TracSubversion#RedHatFedoraCentOSLinux) is 'yum install subversion' to install the vendor package. – richardb Feb 09 '15 at 20:22
  • @richardb as I originally stated in my question, `subversion` package is installed on the system. – alexus Feb 09 '15 at 20:32

1 Answers1

1

It turns out while subversion-python-1.7.14-6.el7.x86_64.rpm is part of rhel-7-workstation-optional-rpms, it's not part of rhel-7-server-optional-rpms. I found rpm on following mirrors:

after installing subversion-python rpm, binding working as expected it.

alexus
  • 12,342
  • 27
  • 115
  • 173