Skip to content

Commit

Permalink
cri-o: build go-md2man from sources
Browse files Browse the repository at this point in the history
Now we should build and install go-md2man from sources instead of
using official repositories since centos removed the package
from its repos on centos 7.6.

Fixes: clearcontainers#963.

Signed-off-by: Salvador Fuentes <[email protected]>
  • Loading branch information
chavafg committed Dec 4, 2018
1 parent c916d9c commit ac6a056
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
22 changes: 11 additions & 11 deletions .ci/install_crio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ cidir=$(dirname "$0")
source "${cidir}/lib.sh"
source /etc/os-release || source /usr/lib/os-release

echo "Install go-md2man"
go_md2man_url=$(get_test_version "externals.go-md2man.url")
go_md2man_version=$(get_test_version "externals.go-md2man.version")
go_md2man_repo=${go_md2man_url/https:\/\/}
go get -d "${go_md2man_repo}"
pushd "$GOPATH/src/${go_md2man_repo}"
git checkout "${go_md2man_version}"
go build
go install
popd

echo "Get CRI-O sources"
kubernetes_sigs_org="github.com/kubernetes-sigs"
ghprbGhRepository="${ghprbGhRepository:-}"
Expand All @@ -38,17 +49,6 @@ then
git checkout "${crio_version}"
fi

# Add link of go-md2man to $GOPATH/bin
GOBIN="$GOPATH/bin"
if [ ! -d "$GOBIN" ]
then
mkdir -p "$GOBIN"
fi

if [ ! -e "${GOBIN}/go-md2man" ]; then
ln -sf $(command -v go-md2man) "$GOBIN"
fi

echo "Get CRI Tools"
critools_repo="${kubernetes_sigs_org}/cri-tools"
go get "$critools_repo" || true
Expand Down
2 changes: 1 addition & 1 deletion .ci/setup_env_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "Install kernel dependencies"
chronic sudo -E yum -y install elfutils-libelf-devel

echo "Install CRI-O dependencies for CentOS"
chronic sudo -E yum install -y glibc-static libglib2.0-devel libseccomp-devel libassuan-devel libgpg-error-devel go-md2man device-mapper-libs \
chronic sudo -E yum install -y glibc-static libglib2.0-devel libseccomp-devel libassuan-devel libgpg-error-devel device-mapper-libs \
btrfs-progs-devel util-linux gpgme-devel

echo "Install bison binary"
Expand Down
2 changes: 1 addition & 1 deletion .ci/setup_env_fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ echo "Install CRI-O dependencies"
chronic sudo -E dnf -y install btrfs-progs-devel device-mapper-devel \
glib2-devel glibc-devel glibc-static gpgme-devel libassuan-devel \
libgpg-error-devel libseccomp-devel libselinux-devel ostree-devel \
pkgconfig go-md2man util-linux
pkgconfig util-linux

echo "Install bison binary"
chronic sudo -E dnf -y install bison
Expand Down
2 changes: 1 addition & 1 deletion .ci/setup_env_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ chronic sudo -E apt install -y libelf-dev

echo "Install CRI-O dependencies for all Ubuntu versions"
chronic sudo -E apt install -y libglib2.0-dev libseccomp-dev libapparmor-dev \
libgpgme11-dev go-md2man thin-provisioning-tools
libgpgme11-dev thin-provisioning-tools

echo "Install bison binary"
chronic sudo -E apt install -y bison
Expand Down
5 changes: 5 additions & 0 deletions versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ externals:
Tool used by the CI to check URLs in documents and code comments.
url: "https://mvdan.cc/xurls/cmd/xurls"
version: "70405f5eab516c9f7b626d803b043415809499a6"

go-md2man:
description: "cri-o dependency used for building documentation"
url: "https://github.com/cpuguy83/go-md2man"
version: "v1.0.8"

0 comments on commit ac6a056

Please sign in to comment.