Set DevStack install dir to /usr/local by default
Put everything in /usr/local and allow that to be overridden to a user-writable dir and not require sudo. Also set the stx-devstack-update job voting, at this time it only runs on devstack/* changes. Change-Id: If68ff63585690c7f6c17174797723fb6d43d4473 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
b39f383007
commit
fec4ac9302
@ -11,8 +11,7 @@
|
||||
- openstack-tox-py27
|
||||
- openstack-tox-py35
|
||||
- stx-updates-pylint
|
||||
- stx-devstack-update:
|
||||
voting: false
|
||||
- stx-devstack-update
|
||||
gate:
|
||||
jobs:
|
||||
- build-openstack-api-ref
|
||||
|
@ -25,8 +25,14 @@ STX_PATCH_DIR=$STXUPDATE_DIR/cgcs-patch/
|
||||
TSCONFIG_DIR=$STXUPDATE_DIR/tsconfig/
|
||||
|
||||
# STX_INST_DIR should be a non-root-writable place to install build artifacts
|
||||
STX_INST_DIR=${STX_INST_DIR:-$DEST/usr}
|
||||
STX_BIN_DIR=$STX_INST_DIR/bin
|
||||
STX_INST_DIR=${STX_INST_DIR:-/usr/local}
|
||||
STX_BIN_DIR=${STX_BIN_DIR:-$STX_INST_DIR/bin}
|
||||
STX_SBIN_DIR=${STX_SBIN_DIR:-$STX_INST_DIR/sbin}
|
||||
|
||||
# Set up so we don't use sudo for installs when not necessary
|
||||
STX_SUDO="sudo"
|
||||
[[ -w $STX_INST_DIR ]] && STX_SUDO="env"
|
||||
|
||||
PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
|
||||
function install_sw_patch {
|
||||
@ -39,17 +45,17 @@ function install_sw_patch {
|
||||
--single-version-externally-managed
|
||||
popd
|
||||
|
||||
local stx_patch_sbindir=$STX_INST_DIR/sbin
|
||||
local stx_patch_sbindir=$STX_SBIN_DIR
|
||||
local stx_patch_sysconfdir=/etc/
|
||||
sudo install -m 755 -d ${stx_patch_sbindir}
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/bash_completion.d
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/goenabled.d
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/init.d
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/logrotate.d
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/patching
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/patching/patch-scripts
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/pmon.d
|
||||
sudo install -m 500 $STX_PATCH_DIR/bin/sw-patch-agent ${stx_patch_sbindir}/sw-patch-agent
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sbindir}
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/bash_completion.d
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/goenabled.d
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/init.d
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/logrotate.d
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/patching
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/patching/patch-scripts
|
||||
$STX_SUDO install -m 755 -d ${stx_patch_sysconfdir}/pmon.d
|
||||
$STX_SUDO install -m 500 $STX_PATCH_DIR/bin/sw-patch-agent ${stx_patch_sbindir}/sw-patch-agent
|
||||
}
|
||||
|
||||
function install_tsconfig {
|
||||
@ -63,8 +69,8 @@ function install_tsconfig {
|
||||
--install-data=/usr/share \
|
||||
--single-version-externally-managed
|
||||
popd
|
||||
sudo install -d -m 755 $STX_BIN_DIR
|
||||
sudo install -p -D -m 700 $TSCONFIG_DIR/scripts/tsconfig $STX_BIN_DIR/tsconfig
|
||||
$STX_SUDO install -d -m 755 $STX_BIN_DIR
|
||||
$STX_SUDO install -p -D -m 700 $TSCONFIG_DIR/scripts/tsconfig $STX_BIN_DIR/tsconfig
|
||||
}
|
||||
|
||||
function install_update {
|
||||
|
Loading…
Reference in New Issue
Block a user