зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1432765
Linting compliance for docker recipes r=jlund
MozReview-Commit-ID: KbTLTU87hyI --HG-- extra : rebase_source : a1b433b7874cd7dcf3eee3a6c8328b780153a97d
This commit is contained in:
Родитель
4f498d0a19
Коммит
3fb244c631
|
@ -17,7 +17,7 @@ install_debuginfo_for_installed_packages() {
|
|||
# Remove arch suffix
|
||||
print gensub(/\.(i.86|x86_64|noarch)/, "", "", $1)
|
||||
}' \
|
||||
| xargs $debuginfo_install \
|
||||
| xargs "$debuginfo_install" \
|
||||
|| : # ignore errors
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ strlen() {
|
|||
LANG=C
|
||||
byteslen=${#1}
|
||||
LANG=$old_lang
|
||||
echo $byteslen
|
||||
echo "$byteslen"
|
||||
}
|
||||
|
||||
echo "Searching for additional debuginfo packages..."
|
||||
|
@ -47,14 +47,14 @@ libraries=""
|
|||
# argument length limit. arg_max stores the argument limit in
|
||||
# bytes, discounting the $debuginfo_install command plus one
|
||||
# space.
|
||||
arg_max=$(( $(getconf ARG_MAX)-$(strlen $debuginfo_install)-$(strlen " ") ))
|
||||
arg_max=$(( $(getconf ARG_MAX)-$(strlen "$debuginfo_install")-$(strlen " ") ))
|
||||
|
||||
to_debuginfo() {
|
||||
# extracted from debuginfo-install script
|
||||
if [[ $1 == *-rpms ]]; then
|
||||
echo ${1%*-rpms}-debug-rpms
|
||||
echo "${1%*-rpms}-debug-rpms"
|
||||
else
|
||||
echo $1-debuginfo
|
||||
echo "$1-debuginfo"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ get_debuginfo_package() {
|
|||
package="$package $unversioned_package"
|
||||
fi
|
||||
|
||||
echo $package
|
||||
echo "$package"
|
||||
}
|
||||
|
||||
walk_dir() {
|
||||
|
@ -76,8 +76,8 @@ walk_dir() {
|
|||
for i in $1/*; do
|
||||
# if we found a library...
|
||||
if [[ $i == *.so ]]; then
|
||||
lib="$(get_debuginfo_package $(basename $i))"
|
||||
if [ $(strlen "$debuginfo_install $libraries $lib") -ge $arg_max ]; then
|
||||
lib="$(get_debuginfo_package "$(basename "$i")")"
|
||||
if [ "$(strlen "$debuginfo_install $libraries $lib")" -ge $arg_max ]; then
|
||||
$debuginfo_install $libraries > /dev/null
|
||||
libraries=""
|
||||
fi
|
||||
|
@ -91,5 +91,5 @@ for i in /usr/lib /usr/lib64 /lib /lib64; do
|
|||
done
|
||||
|
||||
if [ ${#libraries} -gt 0 ]; then
|
||||
$debuginfo_install $libraries > /dev/null
|
||||
$debuginfo_install "$libraries" > /dev/null
|
||||
fi
|
||||
|
|
|
@ -3,14 +3,19 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
cd /setup
|
||||
cd /setup || exit
|
||||
|
||||
# shellcheck source=taskcluster/docker/recipes/common.sh
|
||||
. /setup/common.sh
|
||||
# shellcheck source=taskcluster/docker/recipes/install-mercurial.sh
|
||||
. /setup/install-mercurial.sh
|
||||
# shellcheck source=taskcluster/docker/recipes/install-make.sh
|
||||
. /setup/install-make.sh
|
||||
# shellcheck source=taskcluster/docker/recipes/install-cmake.sh
|
||||
. /setup/install-cmake.sh
|
||||
|
||||
if [ -f /setup/install-debug-symbols.sh ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /setup/install-debug-symbols.sh
|
||||
fi
|
||||
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
cd /setup
|
||||
cd /setup || exit
|
||||
|
||||
# shellcheck source=taskcluster/docker/recipes/common.sh
|
||||
. /setup/common.sh
|
||||
# shellcheck source=taskcluster/docker/recipes/install-mercurial.sh
|
||||
. /setup/install-mercurial.sh
|
||||
|
||||
rm -rf /setup
|
||||
|
|
|
@ -15,7 +15,8 @@ tooltool_fetch <<'EOF'
|
|||
}
|
||||
]
|
||||
EOF
|
||||
cd cmake-3.7.1
|
||||
./bootstrap && make install
|
||||
cd ..
|
||||
(
|
||||
cd cmake-3.7.1 || exit
|
||||
./bootstrap && make install
|
||||
)
|
||||
rm -rf cmake-3.7.1
|
||||
|
|
|
@ -16,12 +16,13 @@ tooltool_fetch <<'EOF'
|
|||
}
|
||||
]
|
||||
EOF
|
||||
cd make-4.0
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
(
|
||||
cd make-4.0 || exit
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
# The build system will find `gmake` ahead of `make`, so make sure it finds
|
||||
# the version we just installed.
|
||||
ln -s /usr/local/bin/make /usr/local/bin/gmake
|
||||
cd ..
|
||||
ln -s /usr/local/bin/make /usr/local/bin/gmake
|
||||
)
|
||||
rm -rf make-4.0
|
||||
|
|
|
@ -9,9 +9,12 @@ set -e
|
|||
|
||||
# Detect OS.
|
||||
if [ -f /etc/lsb-release ]; then
|
||||
# Disabled so linting works on Mac
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/lsb-release
|
||||
|
||||
if [ "${DISTRIB_ID}" = "Ubuntu" -a "${DISTRIB_RELEASE}" = "16.04" ]; then
|
||||
if [ "${DISTRIB_ID}" = "Ubuntu" ] && [ "${DISTRIB_RELEASE}" = "16.04" ]
|
||||
then
|
||||
HG_DEB=1
|
||||
HG_DIGEST=458746bd82b4732c72c611f1041f77a47a683bc75ff3f6ab7ed86ea394f48d94cd7e2d3d1d5b020906318a9a24bea27401a3a63d7e645514dbc2cb581621977f
|
||||
HG_SIZE=193710
|
||||
|
@ -20,7 +23,8 @@ if [ -f /etc/lsb-release ]; then
|
|||
HG_COMMON_DIGEST=8074efbfff974f0bbdd0c3be3d272cc7a634456921e04db31369fbec1c9256ddaf44bdbe120f6f33113d2be9324a1537048028ebaaf205c6659e476a757358fd
|
||||
HG_COMMON_SIZE=2097892
|
||||
HG_COMMON_FILENAME=mercurial-common_4.4.2_all.deb
|
||||
elif [ "${DISTRIB_ID}" = "Ubuntu" -a "${DISTRIB_RELEASE}" = "12.04" ]; then
|
||||
elif [ "${DISTRIB_ID}" = "Ubuntu" ] && [ "${DISTRIB_RELEASE}" = "12.04" ]
|
||||
then
|
||||
echo "Ubuntu 12.04 not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -28,6 +32,8 @@ if [ -f /etc/lsb-release ]; then
|
|||
CERT_PATH=/etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
elif [ -f /etc/os-release ]; then
|
||||
# Disabled so linting works on Mac
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/os-release
|
||||
|
||||
if [ "${ID}" = "debian" ]; then
|
||||
|
@ -48,7 +54,7 @@ elif [ -f /etc/os-release ]; then
|
|||
CERT_PATH=/etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
elif [ -f /etc/centos-release ]; then
|
||||
CENTOS_VERSION=`rpm -q --queryformat '%{VERSION}' centos-release`
|
||||
CENTOS_VERSION="$(rpm -q --queryformat '%{VERSION}' centos-release)"
|
||||
if [ "${CENTOS_VERSION}" = "6" ]; then
|
||||
if [ -f /usr/bin/pip2.7 ]; then
|
||||
PIP_PATH=/usr/bin/pip2.7
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -ve
|
||||
|
||||
test `whoami` == 'root'
|
||||
test "$(whoami)" == 'root'
|
||||
|
||||
mkdir -p /setup
|
||||
cd /setup
|
||||
|
@ -87,17 +87,20 @@ apt_packages+=('python-pip')
|
|||
apt-get update
|
||||
# This allows ubuntu-desktop to be installed without human interaction
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -y -f ${apt_packages[@]}
|
||||
apt-get install -y -f "${apt_packages[@]}"
|
||||
|
||||
dpkg-reconfigure locales
|
||||
|
||||
# shellcheck source=taskcluster/docker/recipes/common.sh
|
||||
. /setup/common.sh
|
||||
# shellcheck source=taskcluster/docker/recipes/install-mercurial.sh
|
||||
. /setup/install-mercurial.sh
|
||||
|
||||
pip install --upgrade pip
|
||||
|
||||
pip install virtualenv
|
||||
|
||||
# shellcheck source=taskcluster/docker/recipes/install-node.sh
|
||||
. /setup/install-node.sh
|
||||
|
||||
# Install custom-built Debian packages. These come from a set of repositories
|
||||
|
@ -176,4 +179,4 @@ cd /
|
|||
rm -rf /setup ~/.ccache ~/.cache ~/.npm
|
||||
apt-get clean
|
||||
apt-get autoclean
|
||||
rm -f $0
|
||||
rm -f "$0"
|
||||
|
|
Загрузка…
Ссылка в новой задаче