From 98b52e5b95d12cafa35badb5b49fa17d366fe242 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Fri, 5 Mar 2021 15:28:51 +0100 Subject: [PATCH] Centralize variables Move some common variables to common.sh Change-Id: Iba3a79bc0990d1339392ee81bf599547235b9429 --- tinyipa/build-tinyipa.sh | 18 +++--------------- tinyipa/common.sh | 9 +++++++++ tinyipa/finalise-tinyipa.sh | 7 ------- tinyipa/tc-mirror.sh | 2 ++ 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/tinyipa/build-tinyipa.sh b/tinyipa/build-tinyipa.sh index 506887f..f39f112 100755 --- a/tinyipa/build-tinyipa.sh +++ b/tinyipa/build-tinyipa.sh @@ -3,30 +3,18 @@ set -ex WORKDIR=$(readlink -f $0 | xargs dirname) source ${WORKDIR}/common.sh -BUILDDIR="$WORKDIR/tinyipabuild" -TINYCORE_MIRROR_URL=${TINYCORE_MIRROR_URL:-} -TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false} -TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true} -IRONIC_LIB_SOURCE=${IRONIC_LIB_SOURCE:-} -USE_PYTHON3=${USE_PYTHON3:-True} -TC_RELEASE="12.x" +IRONIC_LIB_SOURCE=${IRONIC_LIB_SOURCE:-} + +TC_RELEASE="12.x" TGT_RELEASE="v1.0.80" QEMU_RELEASE="v4.2.0" LSHW_RELEASE="B.02.18" - BIOSDEVNAME_RELEASE="0.7.2" IPMITOOL_RELASE="1_8_18" -# PYTHON_EXTRA_SOURCES_DIR_LIST is a csv list of python package dirs to include -PYTHON_EXTRA_SOURCES_DIR_LIST=${PYTHON_EXTRA_SOURCES_DIR_LIST:-} - -CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin" CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy" -TC=1001 -STAFF=50 - function clone_single_branch { git clone --branch $3 --depth=1 $1 $2 } diff --git a/tinyipa/common.sh b/tinyipa/common.sh index ddcf0c8..82b3bfb 100755 --- a/tinyipa/common.sh +++ b/tinyipa/common.sh @@ -3,8 +3,17 @@ WORKDIR=$(readlink -f $0 | xargs dirname) source ${WORKDIR}/tc-mirror.sh +BUILDDIR="$WORKDIR/tinyipabuild" + PIP_VERSION="20.2.2" +TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false} +TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true} +USE_PYTHON3=${USE_PYTHON3:-True} + +# PYTHON_EXTRA_SOURCES_DIR_LIST is a csv list of python package dirs to include +PYTHON_EXTRA_SOURCES_DIR_LIST=${PYTHON_EXTRA_SOURCES_DIR_LIST:-} + # Allow an extension to be added to the generated files by specifying # $BRANCH_PATH e.g. export BRANCH_PATH=master results in tinyipa-master.gz etc BRANCH_EXT='' diff --git a/tinyipa/finalise-tinyipa.sh b/tinyipa/finalise-tinyipa.sh index 6511459..71f3a5a 100755 --- a/tinyipa/finalise-tinyipa.sh +++ b/tinyipa/finalise-tinyipa.sh @@ -6,20 +6,13 @@ FINALDIR="$WORKDIR/tinyipafinal" DST_DIR=$FINALDIR source ${WORKDIR}/common.sh -BUILDDIR="$WORKDIR/tinyipabuild" BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-true} -TINYCORE_MIRROR_URL=${TINYCORE_MIRROR_URL:-} INSTALL_SSH=${INSTALL_SSH:-true} AUTHORIZE_SSH=${AUTHORIZE_SSH:-false} SSH_PUBLIC_KEY=${SSH_PUBLIC_KEY:-} PYOPTIMIZE_TINYIPA=${PYOPTIMIZE_TINYIPA:-false} -TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false} -TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true} TINYIPA_UDEV_SETTLE_TIMEOUT=${TINYIPA_UDEV_SETTLE_TIMEOUT:-60} -USE_PYTHON3=${USE_PYTHON3:-True} - -PYTHON_EXTRA_SOURCES_DIR_LIST=${PYTHON_EXTRA_SOURCES_DIR_LIST:-} echo "Finalising tinyipa:" diff --git a/tinyipa/tc-mirror.sh b/tinyipa/tc-mirror.sh index 0cb7068..185f74b 100644 --- a/tinyipa/tc-mirror.sh +++ b/tinyipa/tc-mirror.sh @@ -16,6 +16,8 @@ http://ftp.vim.org/os/Linux/distr/tinycorelinux http://mirrors.163.com/tinycorelinux " +TINYCORE_MIRROR_URL=${TINYCORE_MIRROR_URL:-} + # NOTE(TheJulia): Removed mirrors because they are out # of date # http://distro.ibiblio.org/tinycorelinux ~1.5 months out of sync.