-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add script to install build requirements for Ubuntu doc/install.md is quite out-of-date and does not align with what's happening in .github/workflows/build.yml Changes - Add build-essential (for make and friends) - Add skopeo/umoci which are needed during build and test - Use Ubuntu's golang PPA (instead of snap); Jammy's golang-go is 1.18 and current go.mod requires 1.20 - Add in the go module prep and docker clone Now, install.md says to just run: sudo ./install-build-deps.sh make stacker Note: the Fedora steps are equally out of date; that'll need another PR. Signed-off-by: Ryan Harper <rharper@woxford.com> * build: Change build workflow to use install-deps script Signed-off-by: Ryan Harper <rharper@woxford.com> --------- Signed-off-by: Ryan Harper <rharper@woxford.com>
- Loading branch information
Showing
3 changed files
with
79 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash | ||
set -o pipefail | ||
set -o errexit | ||
|
||
installdeps_fedora() { | ||
sudo dnf install \ | ||
bats \ | ||
jq \ | ||
lxc-devel \ | ||
libcap-devel \ | ||
libacl-devel | ||
if ! command -v go 2>/dev/null; then | ||
sudo dnf install golang | ||
go version | ||
fi | ||
} | ||
|
||
installdeps_ubuntu() { | ||
sudo add-apt-repository -y ppa:project-machine/squashfuse | ||
sudo apt -yy install \ | ||
bats \ | ||
build-essential \ | ||
cryptsetup-bin \ | ||
jq \ | ||
libacl1-dev \ | ||
libcap-dev \ | ||
libcryptsetup-dev \ | ||
libdevmapper-dev \ | ||
libpam0g-dev \ | ||
libseccomp-dev \ | ||
libselinux1-dev \ | ||
libssl-dev \ | ||
libzstd-dev \ | ||
lxc-dev \ | ||
lxc-utils \ | ||
parallel \ | ||
pkg-config \ | ||
skopeo \ | ||
squashfs-tools \ | ||
squashfuse | ||
if ! command -v go 2>/dev/null; then | ||
sudo apt -yy install golang-go | ||
go version | ||
fi | ||
} | ||
|
||
installdeps_golang() { | ||
go version | ||
GO111MODULE=off go get github.com/opencontainers/umoci/cmd/umoci | ||
make download-tools | ||
make docker-clone | ||
make go-download | ||
} | ||
|
||
. /etc/os-release | ||
|
||
# install platform deps | ||
case $ID_LIKE in | ||
debian|ubuntu) installdeps_ubuntu;; | ||
redhat|fedora) installdeps_fedora;; | ||
*) | ||
echo "Unknown os ID_LIKE value $ID_LIKE" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# install golang deps | ||
installdeps_golang || exit 1 |