KanonConductor

changeset 27:a4877cd05de3 centos5-support

use subversion package instead of local install (not complete yet.)
author okamototk
date Sat, 26 Mar 2011 01:44:02 +0900
parents 25f4428e12c2
children a8f5df57133e
files kanon-setup subversion-16-uninstall.sh subversion-16-upgrade.sh
diffstat 3 files changed, 5 insertions(+), 335 deletions(-) [+]
line diff
     1.1 --- a/kanon-setup	Sat Mar 26 00:28:50 2011 +0900
     1.2 +++ b/kanon-setup	Sat Mar 26 01:44:02 2011 +0900
     1.3 @@ -65,38 +65,11 @@
     1.4          yum -y install `cat pkglist.rhel6`
     1.5          ;;
     1.6      rhel5)
     1.7 -        # Upgrade Subversion.
     1.8 -        # FIXME もっといい文言を頼む.
     1.9 -        echo ""
    1.10 -        echo ""
    1.11 -        echo "KanonでのSubversionの利用について"
    1.12 -        echo "CentOS 5.x でSubversion連携を動作させるには、"
    1.13 -        echo "Python 2.6用の Subversionバインディングのインストールが必要となります。"
    1.14 -        echo "CentOS 5.x ではパッケージが提供されていないため、"
    1.15 -        echo "そのままではSubversion連携を動かすことができません。"
    1.16 -        echo "Kanonでは、最新のSubversion 1.6をインストールするオプションを提供します。"
    1.17 -        echo "インストールした場合システムに対し下記の影響があります。"
    1.18 -        echo " * CentOS 5.x 標準の subversion, mod_dav_svnパッケージの削除"
    1.19 -        echo " * /opt/kanon を prefixとしてSubversion 1.6のファイルを配置"
    1.20 -        echo " * /etc/yum.conf に exclude=subversion, mod_dav_svn の設定を追記"
    1.21 -        echo " * Apache モジュールのインストール"
    1.22 -        echo "   /usr/lib64/httpd/modules/mod_authz_svn.so"
    1.23 -        echo "   /usr/lib64/httpd/modules/mod_dav_svn.so"
    1.24 -        echo "   or"
    1.25 -        echo "   /usr/lib/httpd/modules/mod_authz_svn.so"
    1.26 -        echo "   /usr/lib/httpd/modules/mod_dav_svn.so"
    1.27 -        echo " * Apacheの設定ファイルにモジュールのロードを行う設定の追記"
    1.28 -        echo "   LoadModule dav_svn_module     /usr/lib64/httpd/modules/mod_dav_svn.so"
    1.29 -        echo "   LoadModule authz_svn_module   /usr/lib64/httpd/modules/mod_authz_svn.so"
    1.30 -        echo "   or"
    1.31 -        echo "   LoadModule dav_svn_module     /usr/lib/httpd/modules/mod_dav_svn.so"
    1.32 -        echo "   LoadModule authz_svn_module   /usr/lib/httpd/modules/mod_authz_svn.so"
    1.33 -        echo "アップグレードしたSubversionをアンインストールする場合は、"
    1.34 -        echo "subversion-16-uninstall.sh を使用してください。"
    1.35 -        echo ""
    1.36 -        echo -n "Subversionをアップグレードする?(y/n) "
    1.37 -        read UPGRADE_SVN
    1.38 -
    1.39 +        # TODO
    1.40 +        # アップグレードしたパッケージのリポジトリの設定(http://kanon.ultimania.org/pkg/centos5)と
    1.41 +        #   yum -y install subversion-1.6.15-1.el5の
    1.42 +        #   yum -y install mod_dav_svn-1.6.15-1.el5
    1.43 +        # の実行
    1.44          # Add EPEL Repositories. For python26, python26-devel, python26-mod_wsgi.
    1.45          EPEL_RPM_URL="http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm"
    1.46          wget $EPEL_RPM_URL
     2.1 --- a/subversion-16-uninstall.sh	Sat Mar 26 00:28:50 2011 +0900
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,198 +0,0 @@
     2.4 -#!/bin/bash
     2.5 -# -*- coding:utf-8 -*-
     2.6 -
     2.7 -# subversion-16-upgrade.sh でインストールしたSubversionをアンインストールする.
     2.8 -
     2.9 -
    2.10 -export KANON_HOME=/opt/kanon
    2.11 -
    2.12 -function not_supported {
    2.13 -    echo "サポートされていないOSです。"
    2.14 -    echo "現在サポートされいているOSは、"
    2.15 -    echo ""
    2.16 -    echo "  * CentOS 5.x (Experimental)"
    2.17 -    echo ""
    2.18 -    echo "です。"
    2.19 -    exit 1
    2.20 -}
    2.21 -
    2.22 -function check_os {
    2.23 -    if [ ! -f /etc/redhat-release ]
    2.24 -    then
    2.25 -        not_supported
    2.26 -    else
    2.27 -        CHK=`egrep "CentOS release 5|Red Hat Enterprise Linux .* 5" /etc/redhat-release`
    2.28 -        if [ "$CHK" == '' ]
    2.29 -        then
    2.30 -            not_supported
    2.31 -        fi
    2.32 -    fi
    2.33 -}
    2.34 -
    2.35 -check_os
    2.36 -
    2.37 -
    2.38 -# Apache Modules.
    2.39 -rm -f /usr/lib/httpd/modules/mod_authz_svn.so
    2.40 -rm -f /usr/lib/httpd/modules/mod_dav_svn.so
    2.41 -rm -f /usr/lib64/httpd/modules/mod_authz_svn.so
    2.42 -rm -f /usr/lib64/httpd/modules/mod_dav_svn.so
    2.43 -
    2.44 -# Subversion Commands.
    2.45 -rm -f /opt/kanon/bin/neon-config
    2.46 -rm -f /opt/kanon/bin/svn
    2.47 -rm -f /opt/kanon/bin/svnadmin
    2.48 -rm -f /opt/kanon/bin/svndumpfilter
    2.49 -rm -f /opt/kanon/bin/svnlook
    2.50 -rm -f /opt/kanon/bin/svnserve
    2.51 -rm -f /opt/kanon/bin/svnsync
    2.52 -rm -f /opt/kanon/bin/svnversion
    2.53 -
    2.54 -# include headers.
    2.55 -rm -rf /opt/kanon/include/neon
    2.56 -rm -rf /opt/kanon/include/serf-0
    2.57 -rm -rf /opt/kanon/include/subversion-1
    2.58 -
    2.59 -# python bindings for subversion.
    2.60 -rm -rf /opt/kanon/lib/svn-python
    2.61 -rm -f /opt/kanon/lib/python2.6/site-packages/libsvn
    2.62 -rm -f /opt/kanon/lib/python2.6/site-packages/svn
    2.63 -
    2.64 -# libs.
    2.65 -rm -rf /opt/kanon/lib/libneon*
    2.66 -rm -rf /opt/kanon/lib/libserf-0.*
    2.67 -rm -rf /opt/kanon/lib/libsvn_*
    2.68 -
    2.69 -# package config.
    2.70 -rm -f /opt/kanon/lib/pkgconfig/neon.pc
    2.71 -
    2.72 -# man
    2.73 -rm -f /opt/kanon/man/man1/svn.1
    2.74 -rm -f /opt/kanon/man/man1/svnadmin.1
    2.75 -rm -f /opt/kanon/man/man1/svndumpfilter.1
    2.76 -rm -f /opt/kanon/man/man1/svnlook.1
    2.77 -rm -f /opt/kanon/man/man1/svnsync.1
    2.78 -rm -f /opt/kanon/man/man1/svnversion.1
    2.79 -rm -f /opt/kanon/man/man5/svnserve.conf.5
    2.80 -rm -f /opt/kanon/man/man8/svnserve.8
    2.81 -
    2.82 -# share doc.
    2.83 -rm -rf /opt/kanon/share/doc/neon-0.28.6
    2.84 -
    2.85 -# share locale.
    2.86 -rm -f /opt/kanon/share/locale/cs/LC_MESSAGES/neon.mo
    2.87 -rm -f /opt/kanon/share/locale/de/LC_MESSAGES/neon.mo
    2.88 -rm -f /opt/kanon/share/locale/de/LC_MESSAGES/subversion.mo
    2.89 -rm -f /opt/kanon/share/locale/es/LC_MESSAGES/subversion.mo
    2.90 -rm -f /opt/kanon/share/locale/fr/LC_MESSAGES/neon.mo
    2.91 -rm -f /opt/kanon/share/locale/fr/LC_MESSAGES/subversion.mo
    2.92 -rm -f /opt/kanon/share/locale/it/LC_MESSAGES/subversion.mo
    2.93 -rm -f /opt/kanon/share/locale/ja/LC_MESSAGES/neon.mo
    2.94 -rm -f /opt/kanon/share/locale/ja/LC_MESSAGES/subversion.mo
    2.95 -rm -f /opt/kanon/share/locale/ko/LC_MESSAGES/subversion.mo
    2.96 -rm -f /opt/kanon/share/locale/nb/LC_MESSAGES/subversion.mo
    2.97 -rm -f /opt/kanon/share/locale/nn/LC_MESSAGES/neon.mo
    2.98 -rm -f /opt/kanon/share/locale/pl/LC_MESSAGES/neon.mo
    2.99 -rm -f /opt/kanon/share/locale/pl/LC_MESSAGES/subversion.mo
   2.100 -rm -f /opt/kanon/share/locale/pt_BR/LC_MESSAGES/subversion.mo
   2.101 -rm -f /opt/kanon/share/locale/ru/LC_MESSAGES/neon.mo
   2.102 -rm -f /opt/kanon/share/locale/sv/LC_MESSAGES/subversion.mo
   2.103 -rm -f /opt/kanon/share/locale/tr/LC_MESSAGES/neon.mo
   2.104 -rm -f /opt/kanon/share/locale/zh_CN/LC_MESSAGES/neon.mo
   2.105 -rm -f /opt/kanon/share/locale/zh_CN/LC_MESSAGES/subversion.mo
   2.106 -rm -f /opt/kanon/share/locale/zh_TW/LC_MESSAGES/subversion.mo
   2.107 -
   2.108 -# share man.
   2.109 -rm -f /opt/kanon/share/man/man1/neon-config.1
   2.110 -rm -f /opt/kanon/share/man/man3/ne_add_request_header.3
   2.111 -rm -f /opt/kanon/share/man/man3/ne_addr_destroy.3
   2.112 -rm -f /opt/kanon/share/man/man3/ne_addr_error.3
   2.113 -rm -f /opt/kanon/share/man/man3/ne_addr_first.3
   2.114 -rm -f /opt/kanon/share/man/man3/ne_addr_next.3
   2.115 -rm -f /opt/kanon/share/man/man3/ne_addr_resolve.3
   2.116 -rm -f /opt/kanon/share/man/man3/ne_addr_result.3
   2.117 -rm -f /opt/kanon/share/man/man3/ne_buffer.3
   2.118 -rm -f /opt/kanon/share/man/man3/ne_buffer_altered.3
   2.119 -rm -f /opt/kanon/share/man/man3/ne_buffer_append.3
   2.120 -rm -f /opt/kanon/share/man/man3/ne_buffer_clear.3
   2.121 -rm -f /opt/kanon/share/man/man3/ne_buffer_concat.3
   2.122 -rm -f /opt/kanon/share/man/man3/ne_buffer_create.3
   2.123 -rm -f /opt/kanon/share/man/man3/ne_buffer_destroy.3
   2.124 -rm -f /opt/kanon/share/man/man3/ne_buffer_finish.3
   2.125 -rm -f /opt/kanon/share/man/man3/ne_buffer_grow.3
   2.126 -rm -f /opt/kanon/share/man/man3/ne_buffer_ncreate.3
   2.127 -rm -f /opt/kanon/share/man/man3/ne_buffer_zappend.3
   2.128 -rm -f /opt/kanon/share/man/man3/ne_calloc.3
   2.129 -rm -f /opt/kanon/share/man/man3/ne_close_connection.3
   2.130 -rm -f /opt/kanon/share/man/man3/ne_forget_auth.3
   2.131 -rm -f /opt/kanon/share/man/man3/ne_get_error.3
   2.132 -rm -f /opt/kanon/share/man/man3/ne_get_request_flag.3
   2.133 -rm -f /opt/kanon/share/man/man3/ne_get_response_header.3
   2.134 -rm -f /opt/kanon/share/man/man3/ne_get_scheme.3
   2.135 -rm -f /opt/kanon/share/man/man3/ne_get_server_hostport.3
   2.136 -rm -f /opt/kanon/share/man/man3/ne_get_session_flag.3
   2.137 -rm -f /opt/kanon/share/man/man3/ne_get_status.3
   2.138 -rm -f /opt/kanon/share/man/man3/ne_has_support.3
   2.139 -rm -f /opt/kanon/share/man/man3/ne_i18n_init.3
   2.140 -rm -f /opt/kanon/share/man/man3/ne_iaddr_cmp.3
   2.141 -rm -f /opt/kanon/share/man/man3/ne_iaddr_free.3
   2.142 -rm -f /opt/kanon/share/man/man3/ne_iaddr_make.3
   2.143 -rm -f /opt/kanon/share/man/man3/ne_iaddr_print.3
   2.144 -rm -f /opt/kanon/share/man/man3/ne_iaddr_typeof.3
   2.145 -rm -f /opt/kanon/share/man/man3/ne_malloc.3
   2.146 -rm -f /opt/kanon/share/man/man3/ne_oom_callback.3
   2.147 -rm -f /opt/kanon/share/man/man3/ne_print_request_header.3
   2.148 -rm -f /opt/kanon/share/man/man3/ne_qtoken.3
   2.149 -rm -f /opt/kanon/share/man/man3/ne_realloc.3
   2.150 -rm -f /opt/kanon/share/man/man3/ne_request_create.3
   2.151 -rm -f /opt/kanon/share/man/man3/ne_request_destroy.3
   2.152 -rm -f /opt/kanon/share/man/man3/ne_request_dispatch.3
   2.153 -rm -f /opt/kanon/share/man/man3/ne_response_header_iterate.3
   2.154 -rm -f /opt/kanon/share/man/man3/ne_session_create.3
   2.155 -rm -f /opt/kanon/share/man/man3/ne_session_destroy.3
   2.156 -rm -f /opt/kanon/share/man/man3/ne_session_proxy.3
   2.157 -rm -f /opt/kanon/share/man/man3/ne_set_connect_timeout.3
   2.158 -rm -f /opt/kanon/share/man/man3/ne_set_error.3
   2.159 -rm -f /opt/kanon/share/man/man3/ne_set_proxy_auth.3
   2.160 -rm -f /opt/kanon/share/man/man3/ne_set_read_timeout.3
   2.161 -rm -f /opt/kanon/share/man/man3/ne_set_request_body_buffer.3
   2.162 -rm -f /opt/kanon/share/man/man3/ne_set_request_body_fd.3
   2.163 -rm -f /opt/kanon/share/man/man3/ne_set_request_body_fd64.3
   2.164 -rm -f /opt/kanon/share/man/man3/ne_set_request_flag.3
   2.165 -rm -f /opt/kanon/share/man/man3/ne_set_server_auth.3
   2.166 -rm -f /opt/kanon/share/man/man3/ne_set_session_flag.3
   2.167 -rm -f /opt/kanon/share/man/man3/ne_set_useragent.3
   2.168 -rm -f /opt/kanon/share/man/man3/ne_shave.3
   2.169 -rm -f /opt/kanon/share/man/man3/ne_sock_exit.3
   2.170 -rm -f /opt/kanon/share/man/man3/ne_sock_init.3
   2.171 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_cmp.3
   2.172 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_export.3
   2.173 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_free.3
   2.174 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_identity.3
   2.175 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_import.3
   2.176 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_issuer.3
   2.177 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_read.3
   2.178 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_signedby.3
   2.179 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_subject.3
   2.180 -rm -f /opt/kanon/share/man/man3/ne_ssl_cert_write.3
   2.181 -rm -f /opt/kanon/share/man/man3/ne_ssl_clicert_decrypt.3
   2.182 -rm -f /opt/kanon/share/man/man3/ne_ssl_clicert_encrypted.3
   2.183 -rm -f /opt/kanon/share/man/man3/ne_ssl_clicert_free.3
   2.184 -rm -f /opt/kanon/share/man/man3/ne_ssl_clicert_name.3
   2.185 -rm -f /opt/kanon/share/man/man3/ne_ssl_clicert_owner.3
   2.186 -rm -f /opt/kanon/share/man/man3/ne_ssl_clicert_read.3
   2.187 -rm -f /opt/kanon/share/man/man3/ne_ssl_dname_cmp.3
   2.188 -rm -f /opt/kanon/share/man/man3/ne_ssl_readable_dname.3
   2.189 -rm -f /opt/kanon/share/man/man3/ne_ssl_set_verify.3
   2.190 -rm -f /opt/kanon/share/man/man3/ne_ssl_trust_cert.3
   2.191 -rm -f /opt/kanon/share/man/man3/ne_ssl_trust_default_ca.3
   2.192 -rm -f /opt/kanon/share/man/man3/ne_status.3
   2.193 -rm -f /opt/kanon/share/man/man3/ne_strdup.3
   2.194 -rm -f /opt/kanon/share/man/man3/ne_strndup.3
   2.195 -rm -f /opt/kanon/share/man/man3/ne_token.3
   2.196 -rm -f /opt/kanon/share/man/man3/ne_version_match.3
   2.197 -rm -f /opt/kanon/share/man/man3/ne_version_string.3
   2.198 -rm -f /opt/kanon/share/man/man3/ne_xml_create.3
   2.199 -rm -f /opt/kanon/share/man/man3/ne_xml_destroy.3
   2.200 -rm -f /opt/kanon/share/man/man3/neon.3
   2.201 -
     3.1 --- a/subversion-16-upgrade.sh	Sat Mar 26 00:28:50 2011 +0900
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,109 +0,0 @@
     3.4 -#!/bin/bash
     3.5 -# -*- coding:utf-8 -*-
     3.6 -
     3.7 -# Upgrade Subversion 1.4 to 1.6 for CentOS 5.x
     3.8 -# This scirpt is experimental.
     3.9 -
    3.10 -export KANON_HOME=/opt/kanon
    3.11 -
    3.12 -function not_supported {
    3.13 -    echo "サポートされていないOSです。"
    3.14 -    echo "現在サポートされいているOSは、"
    3.15 -    echo ""
    3.16 -    echo "  * CentOS 5.x (Experimental)"
    3.17 -    echo ""
    3.18 -    echo "です。"
    3.19 -    exit 1
    3.20 -}
    3.21 -
    3.22 -function check_os {
    3.23 -    if [ ! -f /etc/redhat-release ]
    3.24 -    then
    3.25 -        not_supported
    3.26 -    else
    3.27 -        CHK=`egrep "CentOS release 5|Red Hat Enterprise Linux .* 5" /etc/redhat-release`
    3.28 -        if [ "$CHK" == '' ]
    3.29 -        then
    3.30 -            not_supported
    3.31 -        fi
    3.32 -    fi
    3.33 -}
    3.34 -
    3.35 -check_os
    3.36 -
    3.37 -# remove old subversion packages.
    3.38 -yum -y remove subversion mod_dav_svn
    3.39 -
    3.40 -# Install required packages to build subversion1.6.
    3.41 -yum -y install autoconf libtool apr-devel apr-util-devel openssl-devel httpd-devel
    3.42 -
    3.43 -# download source code and deps.
    3.44 -wget http://subversion.tigris.org/downloads/subversion-1.6.16.tar.bz2
    3.45 -wget http://subversion.tigris.org/downloads/subversion-deps-1.6.16.tar.bz2
    3.46 -tar -jxf subversion-1.6.16.tar.bz2
    3.47 -tar -jxf subversion-deps-1.6.16.tar.bz2
    3.48 -
    3.49 -cd subversion-1.6.16
    3.50 -
    3.51 -# set env.
    3.52 -source ${KANON_HOME}/bin/activate
    3.53 -
    3.54 -sh ./autogen.sh
    3.55 -
    3.56 -./configure \
    3.57 ---prefix=/opt/kanon \
    3.58 ---with-apr=/usr/bin/apr-1-config \
    3.59 ---with-apr-util=/usr/bin/apu-1-config \
    3.60 ---with-apxs=/usr/sbin/apxs
    3.61 -
    3.62 -# Make subversion commands and libs.
    3.63 -make
    3.64 -make install
    3.65 -
    3.66 -# Make python bindings for subversion.
    3.67 -make swig-py
    3.68 -make install-swig-py
    3.69 -
    3.70 -# Remove old python bindings for subversion from kanon's python libs.
    3.71 -KANON_PYTHON_LIB=$KANON_HOME/lib/python2.6/site-packages
    3.72 -rm -rf $KANON_PYTHON_LIB/libsvn*
    3.73 -rm -rf $KANON_PYTHON_LIB/svn*
    3.74 -
    3.75 -# Install new python bindings for subversion.
    3.76 -ln -sf $KANON_HOME/lib/svn-python/libsvn $KANON_PYTHON_LIB/libsvn
    3.77 -ln -sf $KANON_HOME/lib/svn-python/svn $KANON_PYTHON_LIB/svn
    3.78 -
    3.79 -# settings to exclude subverion and mod_dav_svn from yum.conf.
    3.80 -YUM_CONF=/etc/yum.conf
    3.81 -
    3.82 -SVN_PACKAGE="subversion"
    3.83 -MOD_DAV_SVN_PACKAGE="mod_dav_svn"
    3.84 -PACKAGES="${SVN_PACKAGE}, ${MOD_DAV_SVN_PACKAGE}"
    3.85 -
    3.86 -EXCLUDE=`grep "^exclude=" ${YUM_CONF}`
    3.87 -if [ "${EXCLUDE}" = '' ]
    3.88 -then
    3.89 -    NEW_EXCLUDE="exclude=${PACKAGES}"
    3.90 -    echo ${NEW_EXCLUDE} >> ${YUM_CONF}
    3.91 -else
    3.92 -    EXCLUDE_SVN=`echo $EXCLUDE | grep "${SVN_PACKAGE}"`
    3.93 -    EXCLUDE_MOD_DAV_SVN=`echo $EXCLUDE | grep "${MOD_DAV_SVN_PACKAGE}"`
    3.94 -    if [ "${EXCLUDE_SVN}" = '' -a "${EXCLUDE_MOD_DAV_SVN}" = '' ]
    3.95 -    then
    3.96 -        # no exclude subversion and mod_dav_svn.
    3.97 -        NEW_EXCLUDE=${EXCLUDE}", ${PACKAGES}"
    3.98 -    elif [ "${EXCLUDE_SVN}" = '' -a "${EXCLUDE_MOD_DAV_SVN}" != '' ]
    3.99 -    then
   3.100 -        # already exclude mod_dav_svn.
   3.101 -        NEW_EXCLUDE=${EXCLUDE}", ${SVN_PACKAGE}"
   3.102 -    elif [ "${EXCLUDE_SVN}" != '' -a "${EXCLUDE_MOD_DAV_SVN}" = '' ]
   3.103 -    then
   3.104 -        # already exclude subversion.
   3.105 -        NEW_EXCLUDE=${EXCLUDE}", ${MOD_DAV_SVN_PACKAGE}"
   3.106 -    else
   3.107 -        # already exclude subversion and mod_dav_svn.
   3.108 -        exit
   3.109 -    fi
   3.110 -    sed -i -e "s/^exclude=.*/${NEW_EXCLUDE}/" ${YUM_CONF}
   3.111 -fi
   3.112 -