LoginSignup
3
3

More than 5 years have passed since last update.

Ubuntu 14.04のSubversionを1.7に戻す

Last updated at Posted at 2015-04-30

Ubuntu 14.04のSubversionを1.7に戻す

do-release-upgradeしたらSubversionが1.8.8になってしまったので1.7.xに戻そうと思ったら苦戦したのでメモ。
途中のなんやかんやはメモ取ってなかったので最後にメモ書き程度に。

※新規インストールではなく1.7で動いてたものを1.8にされたので1.7に戻す、という記事です。
※新規の場合は設定周りがもう少し必要かな?

移行前:Ubuntu 13.10(x64)
移行後:Ubuntu 14.04(x64)
SVN+Apache2(WebDAV)です。

作業前

$ svn --version
svn, version 1.8.8 (r1568071)
   compiled Aug 13 2014, 17:12:39 on x86_64-pc-linux-gnu

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.3
  - handles 'http' scheme
  - handles 'https' scheme

手順1 アンインストール

$ sudo apt-get remove subversion libsvn1 libapache2-mod-svn libapache2-svn

手順2 インストール

$ sudo mkdir -p /usr/local/src/svn
$ sudo chmod a+w /usr/local/src/svn
$ cd /usr/local/src/svn
$ wget http://launchpadlibrarian.net/161750374/subversion_1.7.14-1ubuntu2_amd64.deb
$ wget http://launchpadlibrarian.net/161750375/libsvn1_1.7.14-1ubuntu2_amd64.deb
$ wget http://launchpadlibrarian.net/161753561/libapache2-svn_1.7.14-1ubuntu2_all.deb
$ wget http://launchpadlibrarian.net/161750377/libapache2-mod-svn_1.7.14-1ubuntu2_amd64.deb
$ wget http://launchpadlibrarian.net/161750382/libsvn-perl_1.7.14-1ubuntu2_amd64.deb # 2015.05.05追加:git-svnを入れようと思ったらこれが入ってなくて依存関係で怒られたので追加。
$ sudo dpkg -i *

手順3 設定

authz_svn_moduleの読み込みはdav_svn_moduleの後のほうがいいってどっかに書いてあったので
authz_svn.loadの中身はコメントアウトして
dav_svn.loadの後に追記した。
あとはdav_svn.confをいい感じに設定。

手順4 後処理

apt-get upgradeでうっかり1.8に戻してしまわないようにおまじないをしておく。

$ echo subversion hold | sudo dpkg --set-selections
$ echo libsvn1 hold | sudo dpkg --set-selections
$ echo libapache2-svn hold | sudo dpkg --set-selections
$ echo libapache2-mod-svn hold | sudo dpkg --set-selections

作業後

$ svn --version
svn, version 1.7.14 (r1542130)
   compiled Jan  6 2014, 22:58:18

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

ハマった点など

最初WANdiscoから持ってこようとしたらlibapache2-mod-svnがなくて、それだけlaunchpadから持ってきたりしたんだけど、そのせいで不整合が起きたっぽくて
Cannot load /usr/lib/apache2/modules/mod_authz_svn.so into server: libsvn_repos-1.so.0: cannot open shared object file: No such file or directory
みたいなエラーが出まくって困った。
なのでlaunchpadから1.7.14の必要なもの全部持ってきたらすんなりできた。
この際1.8に移行してしまえばよかったのかもしれないけど...諸事情で1.7しか使ったこと無いので。



以上です。
試行錯誤しながら何とか辿り着いた答えなので間違いなどあるかもしれません。
不足などありましたらご指摘ください。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3