Created
May 25, 2020 20:41
-
-
Save lbogdan/364990e2afd2b6d1bcf14ec4920b09de to your computer and use it in GitHub Desktop.
cri-o 1.18.1 .deb build script for ubuntu 18.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# run this inside an Ubuntu 18.04 container | |
set -e | |
set -u | |
set -x | |
DH_GOLANG_DEB=dh-golang_1.48_all.deb | |
BUILD_DIR=cri-o | |
CRIO_SRC=cri-o_1.18.1~1.tar.gz | |
apt-get update | |
apt-get install -y software-properties-common wget | |
# use latest golang (1.14) from the official PPA | |
add-apt-repository -y ppa:longsleep/golang-backports | |
# build deps | |
apt-get install -y dpkg-dev debhelper rsync libgpgme11-dev libseccomp-dev golang libglib2.0-dev go-md2man git | |
# use 20.04 dh-golang | |
[ ! -f $DH_GOLANG_DEB ] && wget "http://archive.ubuntu.com/ubuntu/pool/main/d/dh-golang/$DH_GOLANG_DEB" | |
dpkg -i $DH_GOLANG_DEB | |
[ ! -d $BUILD_DIR] && mkdir $BUILD_DIR | |
cd $BUILD_DIR | |
[ ! -f $CRIO_SRC ] && wget "http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18/xUbuntu_20.04/$CRIO_SRC" | |
tar xfz $CRIO_SRC | |
cd BUILD | |
dpkg-buildpackage -rfakeroot -us -uc -ui -b | |
cd ../.. | |
echo package built: | |
ls -al $BUILD_DIR/*.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment