Skip to content

Instantly share code, notes, and snippets.

@nicholashoule
Created March 29, 2017 17:55
Show Gist options
  • Save nicholashoule/597545f1d326bed5a0fa05801ed1e0c8 to your computer and use it in GitHub Desktop.
Save nicholashoule/597545f1d326bed5a0fa05801ed1e0c8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Built/tested on:
# NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)"
# libgit2/libgit2
# https://github.com/libgit2/libgit2/releases
# libgit2 is a portable, pure C implementation of the Git core methods
# provided as a re-entrant linkable library with a solid API, allowing
# you to write native speed custom Git applications in any language with bindings.
libgit2='v0.25.0.tar.gz'
libgit2ver='0.25.0'
# Prepare python pip
apt install python-pip -y
pip install --upgrade pip
pip install pyyaml
# Download, make and install pygit2 with HTTPS + SSH support
apt install -y cmake pkg-config libssh2-1-dev libhttp-parser-dev libssl-dev libz-dev
wget "https://github.com/libgit2/libgit2/archive/${libgit2}"
tar xzf ${libgit2} && cd libgit2-${libgit2ver}/
mkdir build && cd build
cmake ..
cmake --build .
make test
cmake --build . --target install
# Install pygit2
pip install cffi
pip install pygit2
# saltstack configuration
# https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
# Testing: (pygit2 = 0.25.0)
# sudo salt-run fileserver.update -l debug 2>&1
# sudo salt --verions-report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment