Ubuntu + Debian build fixes (#2247) (#2248)

This commit is contained in:
amironenko 2016-07-20 17:02:40 -07:00 committed by Teddy Reed
parent 5be180a8f9
commit 575314bf61
5 changed files with 14 additions and 4 deletions

9
tools/deployment/make_linux_package.sh Normal file → Executable file
View File

@ -25,7 +25,8 @@ PACKAGE_NAME="osquery"
if [[ $PACKAGE_VERSION == *"-"* ]]; then
DESCRIPTION="$DESCRIPTION (unstable/latest version)"
fi
OUTPUT_PKG_PATH="$BUILD_DIR/$PACKAGE_NAME-$PACKAGE_VERSION."
OUTPUT_PKG_PATH="$BUILD_DIR/${PACKAGE_NAME}-${PACKAGE_VERSION}."
# Config files
INITD_SRC="$SCRIPT_DIR/osqueryd.initd"
@ -163,6 +164,12 @@ function main() {
FPM="/var/lib/gems/1.8/bin/fpm"
fi
# some tune to stay compliant with Debian package naming convention
if [[ $PACKAGE_TYPE == "deb" ]]; then
DEB_PACKAGE_ARCH=`dpkg --print-architecture`
OUTPUT_PKG_PATH="$BUILD_DIR/${PACKAGE_NAME}_${PACKAGE_VERSION}_${DEB_PACKAGE_ARCH}.deb"
fi
POSTINST_CMD=""
if [[ $OSQUERY_POSTINSTALL != "" ]] && [[ -f $OSQUERY_POSTINSTALL ]]; then
POSTINST_CMD="--after-install $OSQUERY_POSTINSTALL"

View File

@ -96,6 +96,8 @@ function main() {
# Pip may have just been installed.
PIP=`which pip`
sudo $PIP install --upgrade pip
# Previos command may change pip path (/usr/bin/pip to /usr/bin/local/pip)
PIP=`which pip`
sudo $PIP install -r requirements.txt
initialize $OS

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash
function main_debian() {
sudo apt-get update -y --no-install-recommends
sudo apt-get upgrade -y --no-install-recommends
sudo apt-get update -y -q --no-install-recommends
sudo apt-get upgrade -y -q --no-install-recommends
package git-core
package wget

View File

@ -588,7 +588,7 @@ function package() {
log "$1 is already installed. skipping."
else
log "installing $1"
sudo DEBIAN_FRONTEND=noninteractive apt-get install $1 -y --no-install-recommends
sudo DEBIAN_FRONTEND=noninteractive apt-get install $1 -y -q --no-install-recommends
fi
elif [[ $FAMILY = "redhat" ]]; then
if [[ ! -n "$(rpm -V $1)" ]]; then

View File

@ -43,6 +43,7 @@ function main_ubuntu() {
package python-dev
# package linux-headers-generic
package ruby-dev
package ruby1.9.1-dev
package gcc
package doxygen