麒麟Linux上编译subversion

发布时间 2023-06-16 17:39:28作者: Gao科技

麒麟Linux上编译subversion

svn-1.7[1]不支持svn info --show-item=revision获取revision.
svn-1.12开始不能保存密码stackoverflow.

源码编译svn-1.10: https://subversion.apache.org/download.cgi

yum install apr-devel apr-util-devel lz4-devel utf8proc-devel libserf-devel
./configure --prefix=/usr/local --with-serf

麒麟V10软件库中没有libserf-devel, 可以配置对应版本的epel,比如V10使用CENTOS7的epel.

根据configure提示操作

get the sqlite 3.8.11.1 amalgamation from:
https://www.sqlite.org/2015/sqlite-amalgamation-3081101.zip
unpack the archive using unzip and rename the resulting
directory to:
/root/subversion-1.10.7/sqlite-amalgamation

./configure --prefix=/usr/local --with-serf
make
make install

如果svn co没有提示保存密码, 看看svn auth数据, 如果不是Password cache: simple
修改~/.subversion/config, password-stores = simple
修改~/.subversion/config, store-passwords = yes

[1] 可以通过svn info | grep Revision: | awk '{print $2}'. 如果是中文, LANG=C svn info | grep Revision: | awk '{print $2}'
打印当前目录revision: svn info | grep "Last Changed Rev" | awk '{print $4}'