Imported Upstream version 2.5.1
[scm/test.git] / docs / linux-build.md
1 ## Building on Linux
2
3 There are build scripts for recent versions of CentOS- and Debian-flavored
4 Linuxes in `../scripts/{centos,debian}-build`. Both install all prerequisites,
5 then build the client and the man pages in Docker containers for CentOS 7,
6 Debian 8, and Ubuntu 14.04.
7
8 On CentOS 6, the client builds, but not the man pages, because of problems
9 getting the right version of Ruby.
10
11 Earlier versions of CentOS and Debian/Ubuntu have trouble building go, so they
12 are non-starters.
13
14 ## Building a deb
15
16 A debian package can be built by running `dpkg-buildpackage -us -uc` from the
17 root of the repo.  It is currently confirmed to work on Debian jessie and
18 wheezy.  On wheezy it requires `wheezy-backports` versions of `dh-golang`,
19 `git`, and `golang`.
20
21 ## Building an rpm
22
23 An rpm package can be built by running ```./rpm/build_rpms.bsh```. All 
24 dependencies will be downloaded, compiled, and installed for you, provided
25 you have sudo/root permissions. The resulting ./rpm/RPMS/x86_64/git-lfs*.rpm
26 Can be installed using ```yum install``` or distributed. 
27
28 - CentOS 7 - build_rpms.bsh will take care of everything. You only need the
29 git-lfs rpm
30 - CentOS 6 - build_rpms.bsh will take care of everything. You will need to
31 distribute both the git-lfs rpms and the git rpms, as CentOS 6 does not
32 have a current enough version available
33 - CentOS 5 - build_rpms.bsh will take care of everything. You only need the
34 git-lfs rpm. When distributing to CentOS 5, they will need git from the epel
35 repo
36 ```
37 yum install epel-release
38 yum install git
39 ```
40
41 See ./rpm/INSTALL.md for more detail