I am working on the Setup of the Subversion server in one of my environments using RHEL 8 Apache 2.4 Subversion 1.10.6 Python 2.7 Viewvc 1.2.1

Apache & Subversion installation has been done successfully. Further I am trying to use the WebSVN as Viewvc.

ViewVC was installed successfully and integrated with Python. While browsing the viewvc.cgi page I am able to see the page.

While I configure the viewvc for svnrepositories. I am getting error ImportError: No module named svn.core Python Traceback

I have installed the python svn module subversion-python. But still getting the issue.

Any help will be appreciated.

  • It'd be easier for someone to answer this if you were to add pip freeze output to this question. – Petter H Apr 16 at 8:53
  • @PetterH thanks for your reply. – pravintemghare Apr 16 at 8:54
  • # pip-2 freeze altgraph==0.17 dis3==0.1.3 nose==1.3.7 nxpy-command==1.0.0 nxpy-core==1.0.2 nxpy-file-object==1.0.0 nxpy-nonblocking-subprocess==1.0.0 nxpy-past==1.0.1 nxpy-path==1.0.0 nxpy-sequence==1.0.0 nxpy-svn==1.0.3 nxpy-temp-file==1.0.0 PyInstaller==3.6 python-dateutil==2.8.1 six==1.14.0 svn==1.0.1 – pravintemghare Apr 16 at 8:54

As RedHat don't provide Subversion SWIG Python bindings package[1] which is needed for ViewVC Subversion support, you need 3rd party package[2], such as Collabnet or WANdisco, or build it from source.

[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.0_release_notes/rhel-8_0_0_release#platform-tools

[2] https://subversion.apache.org/packages.html#redhat

| improve this answer | |

I am not sure if you were ever able to fix this. I was handed a similar task in moving our subversion server (currently hosted on an Ubuntu LTS machine) to a Centos 8 server. This is one of our legacy services. However, like you I just could not make this work. The short version is I gave up on this and told the users they had to move to git.

Here is what I did to try to make it work, for those who may find this post. The first problem is, of course, that viewvc isn't packaged for Centos (RHEL) 8, including in EPEL. So, I went to the github source https://github.com/viewvc/viewvc/ and downloaded the latest release (at the time, 1.2.1). I extracted, read the INSTALL and started. I applied the ./viewvc-install script, which seemed to work without error. I updated the viewvc.conf with our settings after reviewing it and installed the configuration file in apache. That all seemed to work and I could get basic viewvc executing. However, like you I found that ImportError: No module named svn.core when I tried to view a subversion repository. Release branch 1.2 requires python2, so I installed that through dnf. I read the advice in the INSTALL file and tried getting svn.core to import. However, it appears there is no packaging in core centos repos, epel, or pypi for those bindings (which appear to be the SWIG bindings). I got encouraged when I installed through pip2 svn and was able to import svn, but not svn.core. It appears this is not the svn package that viewvc is looking for. I seemed to get confirmation that what I actually needed was in the subversion project when I found this page: https://cwiki.apache.org/confluence/display/SVN/Subversion%27s+Python+3+Support+Status which listed every python file in subversion and confirmed that there is a core.py (subversion/bindings/swig/python/svn/core.py). I am not sure why this is not packaged or where to find and install it. I really wasn't interested in trying to grab the subversion source and try to distribute it myself it would be the second package (in addition to viewvc) that I would then need to regularly check for security issues and manually upgrade. (That is what a package manager is for!)

However, after seeing that page about python3 support status, I decided to look at the viewvc again and see if it supported python3. I found issue 138 (https://github.com/viewvc/viewvc/issues/138) and it was closed! I thought I was now in luck. It seems that as of the date of this post, the master branch supported python3 (viewvc) and that it was going to soon be released as the 1.3 version. This seemed encouraging. I downloaded master, and installed it. However, I soon realized that subversion needs to be at 1.14 to support python3 (which at time of writing was still unreleased, but at rc2). Regardless, I judged it nearly impossible that RHEL would rebase subversion to 1.14 in the RHEL 8 / Centos 8 lifetime, which again means more hand updating for the life of the server.

With all that, I abandoned the subversion repos. There is a really good svn2git program out there. For a minimal web interface, git-web was simple to get up and running and is roughly equivalent to viewvc. It is also a supported package (dnf install git-web). If you wanted a slightly more pretty interface, GOGS (gogs.io) seemed nice and didn't have requirements for an external database installation (it can just use sqlite). However, it doesn't appear to be packaged for RHEL / Centos / EPEL. I am going to give git-web a go unless we need something prettier.

| improve this answer | |

It appears RHEL 8 is going to support SVN 1.14 eventually: https://bugzilla.redhat.com/show_bug.cgi?id=1844947

Koji also shows build attempts, which support this: https://koji.fedoraproject.org/koji/packageinfo?packageID=752

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.