WebSVN 2.3.3-1.1 fails to install on Ubuntu 14.04 using apt-get

Bug #1313973 reported by Stuart Jones on 2014-04-28
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
websvn (Ubuntu)
Undecided
Unassigned

Bug Description

When installing the websvn package for Ubuntu 14.04 64-bit server, the install process errors at:

"ln: failed to create symbolic link ‘/etc/apache2/conf.d/websvn’: No such file or directory"

On checking the apache2 config directory, there is no conf.d anymore - there is now a conf-available and conf-enabled instead. This is a fresh server that was installed with the LAMP role via tasksel.

Creating the directory '/etc/apache2/conf.d' allows the install to complete - but the conf.d contents will now need to be manually included as part of the apache2 configuration.

The websvn apache configuration file should be linked into the '/etc/apache2/conf-enabled' directory.

Stuart Jones (stu7rt) on 2014-04-28
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in websvn (Ubuntu):
status: New → Confirmed
Matt Bertram (matthewbertram) wrote :

I resolved this by doing the following...

sudo mkdir /etc/apache2/conf.d

(ls in the new conf.d directory to verify the symlink for websvn is present - if not, either create it yourself or reinstall/reconfig the websvn package)

sudo cp /etc/apache2/conf.d/websvn /etc/apache2/conf-enabled/websvn.conf

sudo /etc/init.d/apache2 restart

Then browse to http://<yourserver>/websvn

Brian Candler (b-candler) wrote :

Confirm workaround in #2 works (although creating a symlink rather than cp would be better)

The correct solution I believe is for the package to install its config file as
/etc/apache2/conf-available/websvn.conf
instead of
/etc/websvn/apache.conf

and then to enable it using

a2enconf websvn

You can do this yourself for now like this:

cp /etc/websvn/apache.conf /etc/apache2/conf-available/websvn.conf
a2enconf websvn

Josh Kelley (joshkel) wrote :

There are several other aspects of websvn's configuration that are out of date:

The websvn/webservers step still looks for apache, apache-ssl, and apache-perl, instead of just using apache2.

There are a few references to php4, but Ubuntu 14.04 uses PHP 5.

websvn/permissions gives Berkeley DB-specific instructions (without even specifying that they only apply to Berkeley DB), but "almost everyone" (according to the Subversion Book) uses the default fsfs.

Angel Perez (aperezhr) wrote :

This issue is also occurring in Ubuntu 15.04.

I was able to fix it by modifying the following configuration script:

sudo vi /var/lib/dpkg/info/websvn.postinst

Replace the following configuration fragment:

OLD:
if [ ! -f /etc/$webserver/conf.d/websvn ] && [ ! -h /etc/$webserver/conf.d/websvn ]; then
        ln -s /etc/websvn/apache.conf /etc/$webserver/conf.d/websvn
        restart="$restart $webserver"
fi

NEW:
if [ ! -f /etc/$webserver/sites-available/websvn.conf ] && [ ! -h /etc/$webserver/sites-available/websvn.conf ]; then
        ln -s /etc/websvn/apache.conf /etc/$webserver/sites-available/websvn.conf
        sudo a2ensite websvn
        restart="$restart $webserver"
fi

Then force re-configuration by running:

sudo apt-get -f install websvn

This has to be hard fixed into the websvn package in ubuntu

The work around I managed for Ubuntu 15.10, is similar to as suggested by @AngelPerez, though with a slight modification as follows:

Firstly I created a backup of /var/lib/dpkg/info/websvn.postinst as follows:

sudo cp -r /var/lib/dpkg/info/websvn.postinst /var/lib/dpkg/info/websvn_original.postinst

Then I modified the contents as follows:

sudo vim /var/lib/dpkg/info/websvn.postinst

OLD:
if [ ! -f /etc/$webserver/conf.d/websvn ] && [ ! -h /etc/$webserver/conf.d/websvn ]; then
        ln -s /etc/websvn/apache.conf /etc/$webserver/conf.d/websvn
        restart="$restart $webserver"
fi

NEW:
if [ ! -f /etc/$webserver/conf.d/websvn ] && [ ! -h /etc/$webserver/conf.d/websvn ]; then
        ln -s /etc/websvn/apache.conf /etc/$webserver/sites-available/websvn.conf
        sudo a2ensite websvn
        restart="$restart $webserver"
fi

Now I forced installed websvn with:

sudo apt-get -f install websvn

Now I copied apache.conf from websvn to websvn.conf inside apache2 as follows:

sudo cp -r /etc/websvn/apache.conf /etc/apache2/sites-available/websvn.conf

Restarted my apache2

sudo systemctl restart apache2

That is it. It started working after this :-)

Brian Candler (b-candler) wrote :

It seems websvn has dropped out of 16.04 completely.

Hence you need to use something else, e.g. viewvc.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers