JuangaCovas.info

La página personal de Juan Gabriel Covas

Herramientas de usuario

Herramientas del sitio


linux:howtos:build-svn-from-sources

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
linux:howtos:build-svn-from-sources [02/11/2020 14:08] – [Build Subversion from sources for Linux RedHat, CentOS or Ubuntu, including svn 1.14] Juanga Covaslinux:howtos:build-svn-from-sources [02/01/2024 17:27] (actual) Juanga Covas
Línea 1: Línea 1:
 ====== Build Subversion from sources for Linux RedHat, CentOS or Ubuntu, including svn 1.14 ====== ====== Build Subversion from sources for Linux RedHat, CentOS or Ubuntu, including svn 1.14 ======
  
--- By Juan Gabriel Covas - 2019 - 2020+-- By Juan Gabriel Covas - 2019 - 2024
  
-How to build Subversion / SVN from Sources, on CentOS 7 or Ubuntu 18 / 19, so you can use the latest subversion version. This how-to is based on this blog post: [[http://blog.ashodnakashian.com/2012/11/building-subversion-on-ubuntu-12-10/|Building Subversion on Ubuntu 12.10]] but over time some changes have been made.+How to build Subversion / SVN from Sources (under Rocky Linux 9, CentOS 8, CentOS 7 or Ubuntu 18/19/20, so you can use the latest subversion version. This How-To is based on the following old blog post from 2012: [[http://blog.ashodnakashian.com/2012/11/building-subversion-on-ubuntu-12-10/|Building Subversion on Ubuntu 12.10]] butover timesome changes have been made.
  
-**NOTE:** <wrap hi>This how-to is OK for a subversion client OR updating the binaries of a subversion SERVER that does NOT use Apache or any other stuff.</wrap> Since I'm only interested in ''svn+ssh'' protocol, it's fine for me. Anyway a subversion SERVER requires more setup if you want to use Apachesvn+ssh, etc. which is not the purpose of this document. You can check [[linux:howtos:svn-ssh-ubuntu|my notes on setup a subversion server for svn+ssh]]+**NOTE:** <wrap hi>This how-to is OK for a subversion client OR updating the binaries of a subversion SERVER that does NOT use Apache or any other stuff.</wrap> Since I'm only interested in ''svn+ssh'' protocol, it's fine for me. Anyway a subversion SERVER requires more setup if you want to use Apache or the ''svn+ssh'' protocol, etc. which is not the purpose of this document. You can check [[linux:howtos:svn-ssh-ubuntu|my notes on setup a subversion server for svn+ssh]]
  
 \\ \\
  
-===== CentOS 8 minimal ===== 
  
 +===== Rocky Linux 9: build SVN 1.14 from sources =====
 +
 +Pre-requisites:
 +  yum -y install epel-release
 +
 +  yum install net-tools bind-utils nano wget perl mlocate crontabs cronie rsync openssh-server unzip perl-libwww-perl yum-utils curl psmisc git cpan colordiff pwgen bc perl-LWP-Protocol-https gcc libevent libevent-devel zlib zlib-devel bzip2-devel openssl-devel pcre pcre-devel libmcrypt libmcrypt-devel libjpeg-turbo-utils optipng zlib-devel libuuid-devel gcc make git autoconf automake pkgconfig utf8proc apr apr-devel apr-util apr-util-devel libtool boost python
 +
 +As non-root user (this is important so all tests will pass...)
 +  cd ~; mkdir src; cd src
 +  wget https://dlcdn.apache.org/subversion/subversion-1.14.3.tar.gz
 +  tar xzf subversion-1.14.3.tar.gz
 +  cd subversion-1.14.3
 +
 +  ./get-deps.sh
 +
 +Under Enterprise Linux 9 we must set this env. variable:
 +  $ export LIBTOOL_M4=/usr/share/aclocal
 +
 +Next, autogen:
 +  $ ./autogen.sh
 +  [...]
 +  You can run ./configure now.
 +  [...]
 +
 +Configure...
 +  $ ./configure --with-lz4=internal --with-utf8proc=internal
 +  [...]
 +  config.status: executing svn_private_config.h.tmp commands
 +
 +And make:
 +  $ make -j $(nproc)
 +
 +To check we pass all tests:
 +  $ make check
 +
 +Finally install:  
 +  $ sudo make install
 +  
 +We should have svn client there:
 +  $ svn --version --quiet
 +  1.14.3
 +
 +===== CentOS 8 minimal: build SVN 1.14 from sources =====
 +
 +Compilation tested on CentOS 8 (minimal install, NO stock subversion installed). Updated 2020-11-02
 +
 +Pre-requisites:
   yum -y install epel-release   yum -y install epel-release
  
Línea 17: Línea 63:
 As non-root user: As non-root user:
   cd ~; mkdir src; cd src   cd ~; mkdir src; cd src
-  wget https://apache.brunneis.com/subversion/subversion-1.14.0.tar.gz +  wget https://dlcdn.apache.org/subversion/subversion-1.14.3.tar.gz 
-  tar xzf subversion-1.14.0.tar.gz +  tar xzf subversion-1.14.3.tar.gz 
-  cd subversion-1.14.0+  cd subversion-1.14.3
  
   ./get-deps.sh   ./get-deps.sh
-  + 
 +We have ''python'' executable as ''python2'':
   $ python2 --version   $ python2 --version
   Python 2.7.17   Python 2.7.17
Línea 28: Línea 75:
 Now, to avoid error: ''/usr/bin/env: ‘python’: No such file or directory'' when doing ''autogen'': Now, to avoid error: ''/usr/bin/env: ‘python’: No such file or directory'' when doing ''autogen'':
   $ sudo alternatives --set python /usr/bin/python2   $ sudo alternatives --set python /usr/bin/python2
 +
   $ python --version   $ python --version
   Python 2.7.17   Python 2.7.17
-  + 
 +Under CentOS 8 we must set this env. variable:
   $ export LIBTOOL_M4=/usr/share/aclocal   $ export LIBTOOL_M4=/usr/share/aclocal
-  + 
 +Next, autogen:
   $ ./autogen.sh   $ ./autogen.sh
   [...]   [...]
   You can run ./configure now.   You can run ./configure now.
   [...]   [...]
-  + 
 +Configure...
   $ ./configure --with-lz4=internal --with-utf8proc=internal   $ ./configure --with-lz4=internal --with-utf8proc=internal
   [...]   [...]
   config.status: executing svn_private_config.h.tmp commands   config.status: executing svn_private_config.h.tmp commands
  
-  $ make+And make: 
 +  $ make -j $(nproc)
  
 To check we pass all tests: To check we pass all tests:
Línea 52: Línea 104:
 We should have svn client there: We should have svn client there:
   $ svn --version --quiet   $ svn --version --quiet
-  1.14.0+  1.14.3
      
 +Don't forget to check the Rebuilding from sources notes here: https://juangacovas.info/doku.php/linux/howtos/build-svn-from-sources#note-on-re-building-subversion-from-sources
  
-===== CentOS 7 minimal: Compiling and installing SVN 1.14 from sources =====+\\ 
 + 
 +===== CentOS 7 minimal: compiling SVN 1.14 from sources =====
  
-Compilation tested on CentOS 7 (minimal install, NO stock subversion installed). Updated 2020-07-25+Compilation tested on CentOS 7 (minimal install, NO stock subversion installed). Updated 2024-01-02
  
 Subversion build: success as normal user (no root), under ''/home/user/src'' Subversion build: success as normal user (no root), under ''/home/user/src''
Línea 72: Línea 127:
 Installing subversion from sources: Installing subversion from sources:
   $ cd ~; mkdir src; cd src   $ cd ~; mkdir src; cd src
-  $ wget http://ftp.cixug.es/apache/subversion/subversion-1.14.0.tar.gz +  $ wget https://dlcdn.apache.org/subversion/subversion-1.14.3.tar.gz 
-  $ tar xzf subversion-* +  $ tar xzf subversion-1.14.3 
-  $ cd subversion-+  $ cd subversion-1.14.3
-  $ ./get-deps.sh apr serf zlib sqlite+
   $ ./get-deps.sh   $ ./get-deps.sh
      
 Now, since SVN 1.14.x, we need to make install newer APR tools (stock CentOS 7 version for APR is 1.5 which is old): Now, since SVN 1.14.x, we need to make install newer APR tools (stock CentOS 7 version for APR is 1.5 which is old):
   $ cd apr/; ./buildconf; ./configure; make; sudo make install   $ cd apr/; ./buildconf; ./configure; make; sudo make install
-  $ cd ../apr-util; ./buildconf; ./configure --with-apr=/usr/local/src/subversion-1.14.0/apr; make; sudo make install+  $ cd ../apr-util; ./buildconf; ./configure --with-apr=../apr; make; sudo make install
   $ cd ../apr-util/xml/expat/; ./buildconf.sh; ./configure; make; sudo make install; cd ../../..   $ cd ../apr-util/xml/expat/; ./buildconf.sh; ./configure; make; sudo make install; cd ../../..
  
Línea 91: Línea 145:
   $ ./configure --with-lz4=internal   $ ./configure --with-lz4=internal
   $ ./configure --with-lz4=internal --with-apr=./apr --with-apr-util=./apr-util   $ ./configure --with-lz4=internal --with-apr=./apr --with-apr-util=./apr-util
-  $ make+  $ make -j $(nproc)
 If you want peace of mind, run the tests: If you want peace of mind, run the tests:
   $ make check   $ make check
Línea 98: Línea 152:
 Check version: Check version:
   # svn --version --quiet   # svn --version --quiet
-  1.14.0+  1.14.3
  
-Also be sure to check the final notes at the page bottom, when you need to re-compile a newer version of SVN.+Also be sure to check the final notes at the bottom of this page, when you need to re-compile a newer version of SVN.
  
 \\ \\
 +
 ===== Ubuntu 19 server: Compiling and installing SVN from sources ===== ===== Ubuntu 19 server: Compiling and installing SVN from sources =====
  
Línea 120: Línea 175:
 Download subversion sources: Download subversion sources:
   # cd ~; mkdir src; cd src   # cd ~; mkdir src; cd src
-  # wget http://ftp.cixug.es/apache/subversion/subversion-1.14.0.tar.gz+  # wget https://dlcdn.apache.org/subversion/subversion-1.14.3.tar.gz
   # tar xvzf subversion-*   # tar xvzf subversion-*
-  # cd subversion-1.14.0+  # cd subversion-1.14.3
 Going to compile and install subversion from sources on Ubuntu: Going to compile and install subversion from sources on Ubuntu:
   # ./get-deps.sh apr serf zlib sqlite   # ./get-deps.sh apr serf zlib sqlite
Línea 131: Línea 186:
   # ./autogen.sh   # ./autogen.sh
   # ./configure --with-lz4=internal   # ./configure --with-lz4=internal
-  # make+  # make -j $(nproc)
   # make check   # make check
   # sudo make install   # sudo make install
Línea 142: Línea 197:
 Then it works: Then it works:
   # svn --version --quiet   # svn --version --quiet
-  1.14.0+  1.14.3
  
  
Línea 161: Línea 216:
 After moving the files, ''make'' succeeded. After moving the files, ''make'' succeeded.
  
-~~DISCUSSION|Comments~~ 
linux/howtos/build-svn-from-sources.1604322531.txt.bz2 · Última modificación: 02/11/2020 14:08 por Juanga Covas