From 3fb2ed64625e2a1ed18b8ef23d69e4fcd066e72f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 17 Oct 2015 16:39:43 -0400 Subject: [PATCH 1/2] Ensure the user has a valid hostname set If the hostname is not set, the debian package install will fail, causing further downstream issues --- bootstrap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 903413d21..96755627b 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -24,6 +24,11 @@ if ! command -v apt-get &>/dev/null; then exit 1 fi +hostname -f > /dev/null 2>&1 || { + echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts" + exit 1 +} + apt-get update -qq > /dev/null which curl > /dev/null || apt-get install -qq -y curl [[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties From 63d1963f192a608210af86187c90cc21955db7a6 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 17 Oct 2015 16:52:52 -0400 Subject: [PATCH 2/2] Fix order of output redirection --- deb.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deb.mk b/deb.mk index 704db7669..62dfac5c2 100644 --- a/deb.mk +++ b/deb.mk @@ -49,7 +49,7 @@ deb-all: deb-herokuish deb-dokku deb-gems deb-plugn deb-sshcommand deb-setup: echo "-> Updating deb repository and installing build requirements" sudo apt-get update -qq > /dev/null - sudo apt-get install -qq -y gcc git ruby1.9.1-dev 2>&1 > /dev/null + sudo apt-get install -qq -y gcc git ruby1.9.1-dev > /dev/null 2>&1 command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc ssh -o StrictHostKeyChecking=no git@github.com || true @@ -127,7 +127,7 @@ deb-plugn: deb-setup echo "-> Copying files into place" mkdir -p /tmp/build/usr/local/bin $(GOPATH) sudo apt-get update -qq > /dev/null - sudo apt-get install -qq -y git golang mercurial 2>&1 > /dev/null + sudo apt-get install -qq -y git golang mercurial > /dev/null 2>&1 export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && cd /tmp/tmp/plugn && make deps export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && cd /tmp/tmp/plugn && go build -o plugn mv /tmp/tmp/plugn/plugn /tmp/build/usr/local/bin/plugn