Lines Matching +full:- +full:- +full:disable +full:- +full:cap +full:- +full:ng
9 # build_scripts_dir The path of the openbmc-build-scripts directory.
32 # BITBAKE_OPTS Set to "-c populate_sdk" or whatever other BitBake options
43 # Default: "openbmc/${distro}:${imgtag}-${target}"
57 # scheduling. Nice values range from -20 (most favorable
76 # | - build
77 # | - tmp
84 # Trace bash processing. Set -e so when a step fails, we fail the build
85 set -xeo pipefail
88 build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
89 http_proxy=${http_proxy:-}
90 WORKSPACE=${WORKSPACE:-${HOME}/${RANDOM}${RANDOM}}
91 num_cpu=${num_cpu:-$(nproc)}
92 UBUNTU_MIRROR=${UBUNTU_MIRROR:-""}
93 ENV_LOCAL_CONF=${ENV_LOCAL_CONF:-""}
94 container_only=${CONTAINER_ONLY:-false}
95 docker_reg=${DOCKER_REG:-"public.ecr.aws/ubuntu"}
98 build_dir=${build_dir:-${WORKSPACE}/build}
99 distro=${distro:-ubuntu}
100 img_tag=${img_tag:-latest}
101 target=${target:-qemuarm}
102 no_tar=${no_tar:-false}
103 nice_priority=${nice_priority:-}
106 obmc_dir=${obmc_dir:-${WORKSPACE}/openbmc}
107 ssc_dir=${ssc_dir:-${HOME}}
108 xtrct_small_copy_dir=${xtrct_small_copy_dir:-deploy/images}
112 bitbake_target="obmc-phosphor-image"
116 if [[ -n "${UBUNTU_MIRROR}" ]]; then
117 …MIRROR="RUN echo \"deb ${UBUNTU_MIRROR} \$(. /etc/os-release && echo \$VERSION_CODENAME) main rest…
118 …echo \"deb ${UBUNTU_MIRROR} \$(. /etc/os-release && echo \$VERSION_CODENAME)-updates main restrict…
119 …echo \"deb ${UBUNTU_MIRROR} \$(. /etc/os-release && echo \$VERSION_CODENAME)-security main restric…
120 …echo \"deb ${UBUNTU_MIRROR} \$(. /etc/os-release && echo \$VERSION_CODENAME)-proposed main restric…
121 …echo \"deb ${UBUNTU_MIRROR} \$(. /etc/os-release && echo \$VERSION_CODENAME)-backports main restri…
128 if [ ! -d "${obmc_dir}" ] && [ "${container_only}" = false ]; then
134 DOCKER_IMAGE_NAME=$(./scripts/build-unit-test-docker)
135 docker run --cap-add=sys_admin --rm=true \
136 --network host \
137 --privileged=true \
138 -u "$USER" \
139 -w "${obmc_dir}" -v "${obmc_dir}:${obmc_dir}" \
140 -t "${DOCKER_IMAGE_NAME}" \
141 "${obmc_dir}"/meta-phosphor/scripts/run-repotest
146 if [ ! -d "${xtrct_path}" ]; then
147 mkdir -p "${xtrct_path}"
152 DISTRO=${DISTRO:-}
161 if [[ -n "${http_proxy}" ]]; then
170 RUN dnf --refresh install -y \
178 gcc-c++ \
183 perl-bignum \
184 perl-Data-Dumper \
185 perl-Thread-Queue \
186 python3-devel \
187 SDL-devel \
197 glibc-langpack-en \
198 glibc-locale-source \
203 RUN localedef -f UTF-8 -i en_US en_US.UTF-8
205 RUN grep -q ${GROUPS[0]} /etc/group || groupadd -g ${GROUPS[0]} ${USER}
206 RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS[0]} ${USER}
215 if [[ -n "${http_proxy}" ]]; then
216 …ho \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy"
227 RUN apt-get update && apt-get install -yy \
228 build-essential \
236 iputils-ping \
237 libdata-dumper-simple-perl \
239 libsdl1.2-dev \
240 libthread-queue-any-perl \
251 RUN locale-gen en_US.UTF-8
252 ENV LANG en_US.UTF-8
254 ENV LC_ALL en_US.UTF-8
260 RUN if id ubuntu > /dev/null 2>&1; then userdel -r ubuntu > /dev/null 2>&1; fi
261 RUN grep -q ${GROUPS[0]} /etc/group || groupadd -g ${GROUPS[0]} ${USER}
262 RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS[0]} ${USER}
272 export PROXY_HOST=${PROXY_HOST/%:[0-9]*}
275 mkdir -p "${WORKSPACE}"
279 bitbake_target="${bitbake_target} obmc-phosphor-debug-tarball"
285 set -xeo pipefail
295 mkdir -p ${WORKSPACE}/bin
298 if [[ -n "${http_proxy}" ]]; then
300 cat > ${WORKSPACE}/bin/git-proxy << \EOF_GIT
308 chmod a+x ${WORKSPACE}/bin/git-proxy
311 lock=${HOME}/build-setup.lock
312 flock \${lock} git config --global core.gitProxy ${WORKSPACE}/bin/git-proxy
313 flock \${lock} git config --global http.proxy ${http_proxy}
315 flock \${lock} mkdir -p ~/.subversion
318 http-proxy-host = ${PROXY_HOST}
319 http-proxy-port = ${PROXY_PORT}
336 if [[ -z "${MACHINE}" ]]; then
342 if [[ -z "${DISTRO}" ]]; then
355 PARALLEL_MAKE = "-j$num_cpu"
367 if [[ -n "${nice_priority}" ]]; then
368 nice -${nice_priority} bitbake -k ${BITBAKE_OPTS} ${bitbake_target}
370 bitbake -k ${BITBAKE_OPTS} ${bitbake_target}
375 mkdir -p ${xtrct_path}/${xtrct_small_copy_dir}
376 …timeout ${xtrct_copy_timeout} cp -r ${build_dir}/${xtrct_small_copy_dir}/* ${xtrct_path}/${xtrct_s…
378 timeout ${xtrct_copy_timeout} cp -r ${build_dir}/* ${xtrct_path}
381 if [[ 0 -ne $? ]]; then
382 echo "Received a non-zero exit code from timeout"
391 img_name=${img_name:-openbmc/${distro}:${img_tag}-${target}}
398 docker build --network=host -t "${img_name}" - <<< "${Dockerfile}"
405 mount_obmc_dir="-v ""${obmc_dir}"":""${obmc_dir}"" "
406 mount_ssc_dir="-v ""${ssc_dir}"":""${ssc_dir}"" "
407 mount_workspace_dir="-v ""${WORKSPACE}"":""${WORKSPACE}"" "
419 # the env to allow the home mount to work (no impact on non-podman systems)
420 export PODMAN_USERNS="keep-id"
423 # shellcheck disable=SC2086 # mount commands word-split purposefully
425 --cap-add=sys_admin \
426 --cap-add=sys_nice \
427 --net=host \
428 --rm=true \
429 -e WORKSPACE="${WORKSPACE}" \
430 -w "${HOME}" \
431 -v "${HOME}:${HOME}" \
432 ${EXTRA_DOCKER_RUN_ARGS:-} \
440 ln -sf "${xtrct_path}/deploy" "${WORKSPACE}/deploy"