Skip to content

Instantly share code, notes, and snippets.

@sashkab
Created January 21, 2018 00:06
Show Gist options
  • Save sashkab/f23c745a9fbde1e30ef20501176a3755 to your computer and use it in GitHub Desktop.
Save sashkab/f23c745a9fbde1e30ef20501176a3755 to your computer and use it in GitHub Desktop.
Build latest version of git on RHEL 7

Build latest version of git on RHEL 7

Preparing system to building rpms

  1. Install fedpkg:

    sudo yum install fedpkg
  2. Add yourself into group mock (you might need to re-login to server after this change):

    sudo usermod -a -G mock $USER

Download git

  1. Download git sources:

    fedpkg clone -a git && cd git
    fedpkg sources
  2. Verify sources:

    sha512sum -c sources

    (TODO: gpg --verify)

Build rpm

  1. Create srmp. Use el6 for RHEL6, el7 for RHEL7.

    fedpkg --dist el7 srpm
  2. Build package in mock:

    mock -r epel-7-x86_64 git-2.16.0-1.el7.src.rpm
  3. Install latest version of git from /var/lib/mock/epel-7-x86_64/result/.

This instruction is based on this mailing list post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment